From: Atzm Watanabe Subject: [PATCH v3 0/3] packet: Deliver VLAN TPID to userspace Date: Mon, 16 Dec 2013 17:12:01 +0900 Message-ID: <87r49d6wq6.wl%atzm@stratosphere.co.jp> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Cc: "Stephen Hemminger" , "Ben Hutchings" , "David Miller" , "Daniel Borkmann" , "David Laight" To: netdev@vger.kernel.org Return-path: Received: from mail-yh0-f46.google.com ([209.85.213.46]:61586 "EHLO mail-yh0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752305Ab3LPIQ6 (ORCPT ); Mon, 16 Dec 2013 03:16:58 -0500 Received: by mail-yh0-f46.google.com with SMTP id l109so3433333yhq.33 for ; Mon, 16 Dec 2013 00:16:58 -0800 (PST) Sender: netdev-owner@vger.kernel.org List-ID: 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. Since v3 is rework, I've modified changelog which is not appropriate. 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 | 22 +++++++++++++--------- net/packet/af_packet.c | 25 ++++++++++++++++++++----- 2 files changed, 33 insertions(+), 14 deletions(-) -- 1.8.1.5