lkml.org 
[lkml]   [2022]   [Sep]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    Date
    SubjectRe: [PATCH net-next 01/22] net: sched: act_api: implement generic walker and search for tc action
    On Fri, Sep 2, 2022 at 7:22 AM Zhengchao Shao <shaozhengchao@huawei.com> wrote:
    >
    > Being able to get tc_action_net by using net_id stored in tc_action_ops
    > and execute the generic walk/search function, add __tcf_generic_walker()
    > and __tcf_idr_search() helpers.
    >

    These are nice cleanups.
    Can you please run all tdc tests for all changes you are making to
    the tc subsystem? Maybe do a kindness and add more tests.

    Just small opinions below. Otherwise you can add my ACK.

    > Signed-off-by: Zhengchao Shao <shaozhengchao@huawei.com>
    > ---
    > include/net/act_api.h | 1 +
    > net/sched/act_api.c | 48 +++++++++++++++++++++++++++++++++++++------
    > 2 files changed, 43 insertions(+), 6 deletions(-)
    >
    > diff --git a/include/net/act_api.h b/include/net/act_api.h
    > index 9cf6870b526e..a79d6e58519e 100644
    \

    > @@ -926,7 +945,8 @@ int tcf_register_action(struct tc_action_ops *act,
    > struct tc_action_ops *a;
    > int ret;
    >
    > - if (!act->act || !act->dump || !act->init || !act->walk || !act->lookup)
    > + if (!act->act || !act->dump || !act->init ||
    > + (!act->net_id && (!act->walk || !act->lookup)))

    I can understand net_id, but why && (!act->walk || !act->lookup) ?
    Assumedly they are now optional, no?


    > + if (ops->walk) {
    > + err = ops->walk(net, skb, &dcb, RTM_DELACTION, ops, extack);
    > + } else {
    > + err = __tcf_generic_walker(net, skb, &dcb, RTM_DELACTION, ops, extack);
    > + }

    Bikeshed mod: those braces.

    cheers,
    jamal

    \
     
     \ /
      Last update: 2022-09-02 16:28    [W:2.774 / U:1.128 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site