From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Borkmann Subject: Re: [PATCH v2 net-next 2/2] tc: make ingress and egress qdiscs consistent Date: Wed, 08 Apr 2015 18:54:32 +0200 Message-ID: <55255D48.7040408@iogearbox.net> References: <55252FEF.40201@iogearbox.net> <55253289.8020306@mojatatu.com> <552556BC.8020108@plumgrid.com> <20150408.123208.890310178000649038.davem@davemloft.net> <55255AE0.2060606@plumgrid.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Cc: David Miller , jhs@mojatatu.com, jiri@resnulli.us, tgraf@suug.ch, netdev@vger.kernel.org To: Alexei Starovoitov Return-path: Received: from www62.your-server.de ([213.133.104.62]:54912 "EHLO www62.your-server.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754348AbbDHQyn (ORCPT ); Wed, 8 Apr 2015 12:54:43 -0400 In-Reply-To: <55255AE0.2060606@plumgrid.com> Sender: netdev-owner@vger.kernel.org List-ID: On 04/08/2015 06:44 PM, Alexei Starovoitov wrote: > On 4/8/15 9:32 AM, David Miller wrote: >> From: Alexei Starovoitov >> Date: Wed, 08 Apr 2015 09:26:36 -0700 >> >>> My preference is to add 'needs_l2' flag to ingress qdisc. >> >> The problem is that needs_l2 is not property of individual qdisc, >> but conditionally 1 or more things sitting behind it. >> >> You can mix u32 and bpf classifiers. One wants need_L2 another >> does not, and you therefore cannot handle this problem in this >> manner. > > that is still ok. > I'm proposing multiple flags. One for ingress qdisc and another > flag for all cls/acts whether they care about l2 or not. > Then when cls is attached to ingress_with_l2 we will check whether > this cls is ready or not. > so cls_bpf will have flag L2_ONLY > whereas cls_u32 will be L2 | L3 > and 50% of other cls/acts will be L2 | L3 > some cls/acts will be L3 only until they're fixed. > > The users will create ingress qdisc with 'needs_l2' flag only > when they need to attach cls_bpf to it. All existing users > won't notice the change. I think that could work, it would also allow for keeping compat with the existing users.