Skip to content

Commit

Permalink
packet: doc: add documentation for VLAN TPID delivery
Browse files Browse the repository at this point in the history
Introduce TP_STATUS_VLAN_TPID_VALID bit into the documentation.

Signed-off-by: Atzm Watanabe <atzm@stratosphere.co.jp>
Acked-by: Daniel Borkmann <dborkman@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Atzm Watanabe authored and David S. Miller committed Dec 21, 2013
1 parent ac0917f commit ac7686b
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions Documentation/networking/packet_mmap.txt
Original file line number Diff line number Diff line change
Expand Up @@ -517,15 +517,20 @@ where 'tpacket_version' can be TPACKET_V1 (default), TPACKET_V2, TPACKET_V3.
TPACKET_V1:
- Default if not otherwise specified by setsockopt(2)
- RX_RING, TX_RING available
- VLAN metadata information available for packets
(TP_STATUS_VLAN_VALID)

TPACKET_V1 --> TPACKET_V2:
- Made 64 bit clean due to unsigned long usage in TPACKET_V1
structures, thus this also works on 64 bit kernel with 32 bit
userspace and the like
- Timestamp resolution in nanoseconds instead of microseconds
- RX_RING, TX_RING available
- VLAN metadata information available for packets
(TP_STATUS_VLAN_VALID, TP_STATUS_VLAN_TPID_VALID),
in the tpacket2_hdr structure:
- TP_STATUS_VLAN_VALID bit being set into the tp_status field indicates
that the tp_vlan_tci field has valid VLAN TCI value
- TP_STATUS_VLAN_TPID_VALID bit being set into the tp_status field
indicates that the tp_vlan_tpid field has valid VLAN TPID value
- How to switch to TPACKET_V2:
1. Replace struct tpacket_hdr by struct tpacket2_hdr
2. Query header len and save
Expand Down

0 comments on commit ac7686b

Please sign in to comment.