Re: [PATCH net-next 2/2] erspan: skip the platform specific sub-header of ERSPAN type III
From: Ido Schimmel
Date: Tue Oct 20 2026 - 13:27:15 EST
On Sun, Oct 18, 2026 at 05:02:36PM +0800, Haishuang Yan wrote:
> The ERSPAN type III header has an O flag, which tells whether an
> optional platform specific sub-header of 8 octets follows it. The
> ERSPAN payload starts after that sub-header when the flag is set [1].
>
> Linux never sets the flag on transmit, but it ignores it on receive
> too. When a peer sends the sub-header, its 8 bytes are passed up as the
> start of the mirrored Ethernet frame, so the frame is corrupted.
>
> Pull the sub-header as well when the O flag is set. The collect_md
> metadata still only carries the fixed part of the type III header.
>
> [1] https://datatracker.ietf.org/doc/html/draft-foschiano-erspan-03
>
> Signed-off-by: Haishuang Yan <yanhaishuang@xxxxxxxxxxxxxxxxxxxx>
The cover letter says this was tested with hand-built packets. Do you
have a device that actually sends the sub-header? If not, then I don't
see a reason to add more dead code to this driver which nobody seems to
care about given the lack of reviews.