From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Hemminger Subject: Re: [PATCH 1/3] vlan: Do not support clearing VLAN_FLAG_REORDER_HDR Date: Mon, 23 May 2011 14:00:48 -0700 Message-ID: <20110523140048.777fb378@nehalam> References: <1302241713-3637-1-git-send-email-jpirko@redhat.com> <20110412.141645.112604563.davem@davemloft.net> <20110521072925.GA2588@jirka.orion> <4DD7BB61.9050200@gmail.com> <4DD87C25.4030701@gmail.com> <20110522062915.GA2611@jirka.orion> <4DD97A44.2020708@candelatech.com> <4DD9F81D.6070806@candelatech.com> <4DDA8C42.3090009@candelatech.com> <4DDAB72B.9050101@gmail.com> <4DDAC26C.2070601@candelatech.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: Nicolas de =?UTF-8?B?UGVzbG/DvGFu?= , "Eric W. Biederman" , David Miller , Jiri Pirko , Changli Gao , netdev@vger.kernel.org, kaber@trash.net, fubar@us.ibm.com, eric.dumazet@gmail.com, andy@greyhouse.net, Jesse Gross To: Ben Greear Return-path: Received: from smtp1.linux-foundation.org ([140.211.169.13]:57800 "EHLO smtp1.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1030231Ab1EWVBq (ORCPT ); Mon, 23 May 2011 17:01:46 -0400 In-Reply-To: <4DDAC26C.2070601@candelatech.com> Sender: netdev-owner@vger.kernel.org List-ID: > Well, yes..unless perhaps when the REORDER_HDR flag is enabled. > > As for when the tag is added/removed, as long as we don't end up doing > a remove and then an add (in software), and as long as the pkt is correct > going to user-space, it doesn't matter to me. > > It would be lame to remove it in software and then re-add it, > unless absolutely required for some reason. IMHO the REORDER_HDR flag was a design mistake. It means supporting two different API's for the application. For a packet capture application it means the format of the packet will be different based on how the VLAN was created. And the vlan was created outside the application. If there was a requirement to support both formats, then it should be a property of the AF_PACKET socket. The application can then do an setsockopt() to control the format of the data. The issue is for things like mmap/AF_PACKET the re-inserted form will be slower since data has to be copied.