On Mon 18 Feb 2019 at 19:27, Cong Wang <[email protected]> wrote:
> On Wed, Feb 13, 2019 at 11:47 PM Vlad Buslov <[email protected]> wrote:
>>
>> Set TCF_PROTO_OPS_DOIT_UNLOCKED for flower classifier to indicate that its
>> ops callbacks don't require caller to hold rtnl lock.
>
> So, if this means RTNL is gone for all cls_flower changes, why
> do I still see rtnl_lock() in cls_flower.c after all your patches in
> this set?
It doesn't say that rtnl lock is gone, what it says is that caller
doesn't have to obtain rtnl lock before calling flower ops callbacks.
>
> For instance:
>
> 366 static void fl_destroy_filter_work(struct work_struct *work)
> 367 {
> 368 struct cls_fl_filter *f = container_of(to_rcu_work(work),
> 369 struct cls_fl_filter, rwork);
> 370
> 371 rtnl_lock();
> 372 __fl_destroy_filter(f);
> 373 rtnl_unlock();
> 374 }
This shouldn't be needed. Thanks for spotting it.
>
> and...
>
> 382 if (!rtnl_held)
> 383 rtnl_lock();
>
> ...
>
> 1436 if (!rtnl_held)
> 1437 rtnl_lock();
Drivers assume rtnl lock, so flower obtains it before calling offloads
API.
>
>
> Please explain in your changelog, otherwise it is very confusing.
Sorry for not making this stuff clear. I will expand cover letter with
more details.
>
> Thanks.