Skip to content

packet: deliver VLAN TPID to userspace

Atzm Watanabe netdev 5 versions – In review

Get series with b4
b4 am 87haa77fe3.wl%[email protected]

Versions newest first · linked by author and title

  1. v4 Latest3 patches 5 repliesIn review
  2. v33 patches 11 repliesSuperseded
  3. v21 patch 4 repliesSuperseded
Earlier versions · 2
VersionPostedPatchesRepliesStatus
v1 posting 2/21 patch6 repliesSuperseded
v1 posting 1/21 patch6 repliesSuperseded

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3packet: make aligned size of struct tpacket{2,3}_hdr clearnet/packet/af_packet.c+7 -01 reply
2/3packet: fill the gap of TPACKET_ALIGNMENT with zerosinclude/uapi/linux/if_packet.h net/packet/af_packet.c+4 -21 reply
3/3packet: deliver VLAN TPID to userspaceinclude/uapi/linux/if_packet.h net/packet/af_packet.c+24 -142 replies

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by.

PatchDaniel Borkmann
1/3A-b
2/3A-b
3/3A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v4 thread

Cover letter [PATCH v4 0/3] packet: deliver VLAN TPID to userspace

This patchset enables userspace to get VLAN TPID as well as the VLAN TCI.

After the 802.1AD support, userspace packet receivers (packet dumper, software switch, and the like) need how to know VLAN TPID in order to reconstruct original tagged frame.

v4: Simply use sizeof(tp_padding) for zeroing the padding bytes,
commented by David Laight.
Use __u16 for tp_vlan_tpid in tpacket_hdr_variant1, commented by Daniel Borkmann.

v3: Add a definition which indicates whether tp_vlan_tpid is valid.
Explicitly define pad bytes for tpacket{2,3}_hdr and pick the area for tp_vlan_tpid from the definition. Commented by David Laight.

v2: Add BUILD_BUG_ON() to make current aligned size of
struct tpacket{2,3}_hdr clear. Commented by Ben Hutchings.

Atzm Watanabe (3):
packet: make aligned size of struct tpacket{2,3}_hdr clear
packet: fill the gap of TPACKET_ALIGNMENT with zeros
packet: deliver VLAN TPID to userspace

 include/uapi/linux/if_packet.h | 23 ++++++++++++++---------
 net/packet/af_packet.c         | 24 +++++++++++++++++++-----
 2 files changed, 33 insertions(+), 14 deletions(-)
Signature · 1 line
1.8.1.5