From: Atzm Watanabe Subject: [PATCH] packet: doc: add documentation for VLAN TPID delivery Date: Fri, 20 Dec 2013 23:12:20 +0900 Message-ID: <8738ln7gsb.wl%atzm@stratosphere.co.jp> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII To: netdev@vger.kernel.org Return-path: Received: from mail-yh0-f41.google.com ([209.85.213.41]:43904 "EHLO mail-yh0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751771Ab3LTOji (ORCPT ); Fri, 20 Dec 2013 09:39:38 -0500 Received: by mail-yh0-f41.google.com with SMTP id f11so633963yha.14 for ; Fri, 20 Dec 2013 06:39:37 -0800 (PST) Received: from sayva.stratosphere.co.jp ([2001:240:2001:2901:ea40:f2ff:fe10:9f2a]) by mx.google.com with ESMTPSA id q44sm11546049yhg.10.2013.12.20.06.31.24 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 20 Dec 2013 06:31:25 -0800 (PST) Sender: netdev-owner@vger.kernel.org List-ID: Introduce TP_STATUS_VLAN_TPID_VALID bit into the documentation. Signed-off-by: Atzm Watanabe --- In the PACKET_MMAP, TP_STATUS_VLAN_VALID seems to be not available in the V1, so I moved it into the V2. Documentation/networking/packet_mmap.txt | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Documentation/networking/packet_mmap.txt b/Documentation/networking/packet_mmap.txt index 4288ffa..723bf3d 100644 --- a/Documentation/networking/packet_mmap.txt +++ b/Documentation/networking/packet_mmap.txt @@ -517,8 +517,6 @@ 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 @@ -526,6 +524,13 @@ TPACKET_V1 --> TPACKET_V2: 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 -- 1.8.1.5