Subject: Re: [PATCH v2 net-next 2/2] tc: make ingress and egress qdiscs consistent

From: Daniel Borkmann <[email-masked]>
Date: Wed, 08 Apr 2015 18:54:32 +0200

On 04/08/2015 06:44 PM, Alexei Starovoitov wrote:
> On 4/8/15 9:32 AM, David Miller wrote:
>> From: Alexei Starovoitov <[email-masked]>
>> 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.