On Wed, Aug 30, 2017 at 2:48 PM, Daniel Borkmann <[email protected]> wrote:
> On 08/30/2017 11:30 PM, Cong Wang wrote:
> [...]
>>
>> Note, we still can NOT totally get rid of those class lookup in
>> ->enqueue() because cgroup and flow filters have no way to determine
>> the classid at setup time, they still have to go through dynamic lookup.
>
> [...]
>>
>> ---
>> include/net/sch_generic.h | 1 +
>> net/sched/cls_basic.c | 9 +++++++
>> net/sched/cls_bpf.c | 9 +++++++
>
>
> Same is for cls_bpf as well, so bind_class wouldn't work there
> either as we could return dynamic classids. bind_class cannot
> be added here, too.
I think you are probably right, but the following code is
misleading there:
if (tb[TCA_BPF_CLASSID]) {
prog->res.classid = nla_get_u32(tb[TCA_BPF_CLASSID]);
tcf_bind_filter(tp, &prog->res, base);
}
If the classid is dynamic, why this tb[TCA_BPF_CLASSID]?