Message ID | 20230517110232.29349-7-jhs@mojatatu.com (mailing list archive) |
---|---|
State | RFC |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | Introducing P4TC | expand |
On Wed, May 17, 2023 at 07:02:11AM -0400, Jamal Hadi Salim wrote: > @@ -115,7 +115,8 @@ struct tc_action_ops { > struct tcf_result *); /* called under RCU BH lock*/ > int (*dump)(struct sk_buff *, struct tc_action *, int, int); > void (*cleanup)(struct tc_action *); > - int (*lookup)(struct net *net, struct tc_action **a, u32 index); > + int (*lookup)(struct net *net, const struct tc_action_ops *ops, > + struct tc_action **a, u32 index); > int (*init)(struct net *net, struct nlattr *nla, > struct nlattr *est, struct tc_action **act, > struct tcf_proto *tp, > diff --git a/net/sched/act_api.c b/net/sched/act_api.c > index ba0315e686bf..788127329d96 100644 > --- a/net/sched/act_api.c > +++ b/net/sched/act_api.c > @@ -728,7 +728,7 @@ int __tcf_idr_search(struct net *net, const struct tc_action_ops *ops, > struct tc_action_net *tn = net_generic(net, ops->net_id); > > if (unlikely(ops->lookup)) > - return ops->lookup(net, a, index); > + return ops->lookup(net, ops, a, index); Interesting. I could swear that this patch would break the build if only up to this patch was applied (like in a git bisect), but then, currently no action is defining this method. :D Marcelo
On Fri, Jun 2, 2023 at 3:43 PM Marcelo Ricardo Leitner <mleitner@redhat.com> wrote: > > On Wed, May 17, 2023 at 07:02:11AM -0400, Jamal Hadi Salim wrote: > > @@ -115,7 +115,8 @@ struct tc_action_ops { > > struct tcf_result *); /* called under RCU BH lock*/ > > int (*dump)(struct sk_buff *, struct tc_action *, int, int); > > void (*cleanup)(struct tc_action *); > > - int (*lookup)(struct net *net, struct tc_action **a, u32 index); > > + int (*lookup)(struct net *net, const struct tc_action_ops *ops, > > + struct tc_action **a, u32 index); > > int (*init)(struct net *net, struct nlattr *nla, > > struct nlattr *est, struct tc_action **act, > > struct tcf_proto *tp, > > diff --git a/net/sched/act_api.c b/net/sched/act_api.c > > index ba0315e686bf..788127329d96 100644 > > --- a/net/sched/act_api.c > > +++ b/net/sched/act_api.c > > @@ -728,7 +728,7 @@ int __tcf_idr_search(struct net *net, const struct tc_action_ops *ops, > > struct tc_action_net *tn = net_generic(net, ops->net_id); > > > > if (unlikely(ops->lookup)) > > - return ops->lookup(net, a, index); > > + return ops->lookup(net, ops, a, index); > > Interesting. I could swear that this patch would break the build if > only up to this patch was applied (like in a git bisect), but then, > currently no action is defining this method. :D > We test every patch individually for compile for git bisect reasons, so it would be hard to find one that escapes our process ;-> cheers, jamal
diff --git a/include/net/act_api.h b/include/net/act_api.h index cc392b994844..a0f443990f27 100644 --- a/include/net/act_api.h +++ b/include/net/act_api.h @@ -115,7 +115,8 @@ struct tc_action_ops { struct tcf_result *); /* called under RCU BH lock*/ int (*dump)(struct sk_buff *, struct tc_action *, int, int); void (*cleanup)(struct tc_action *); - int (*lookup)(struct net *net, struct tc_action **a, u32 index); + int (*lookup)(struct net *net, const struct tc_action_ops *ops, + struct tc_action **a, u32 index); int (*init)(struct net *net, struct nlattr *nla, struct nlattr *est, struct tc_action **act, struct tcf_proto *tp, diff --git a/net/sched/act_api.c b/net/sched/act_api.c index ba0315e686bf..788127329d96 100644 --- a/net/sched/act_api.c +++ b/net/sched/act_api.c @@ -728,7 +728,7 @@ int __tcf_idr_search(struct net *net, const struct tc_action_ops *ops, struct tc_action_net *tn = net_generic(net, ops->net_id); if (unlikely(ops->lookup)) - return ops->lookup(net, a, index); + return ops->lookup(net, ops, a, index); return tcf_idr_search(tn, a, index); }