[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20210803144615.GA17597@corigine.com>
Date: Tue, 3 Aug 2021 16:46:19 +0200
From: Simon Horman <simon.horman@...igine.com>
To: Jamal Hadi Salim <jhs@...atatu.com>
Cc: Vlad Buslov <vladbu@...dia.com>,
David Miller <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>,
Cong Wang <xiyou.wangcong@...il.com>,
Jiri Pirko <jiri@...lanox.com>, netdev@...r.kernel.org,
oss-drivers@...igine.com, Baowen Zheng <baowen.zheng@...igine.com>,
Louis Peens <louis.peens@...igine.com>,
Ido Schimmel <idosch@...dia.com>,
Jiri Pirko <jiri@...nulli.us>, Roopa Prabhu <roopa@...dia.com>
Subject: Re: [PATCH net-next 1/3] flow_offload: allow user to offload tc
action to net device
On Tue, Aug 03, 2021 at 09:01:45AM -0400, Jamal Hadi Salim wrote:
> On 2021-08-03 8:31 a.m., Simon Horman wrote:
> > On Tue, Aug 03, 2021 at 07:45:13AM -0400, Jamal Hadi Salim wrote:
>
>
> > Thanks, I will look into this. But it would make my life slightly easier if
> >
> > a) You could be more specific about what portion of cls_api you are
> > referring to.
> > b) Constrained comments to a topic to a single sub-thread.
> >
>
> Context, this was on the comment i made on 2/3 here:
>
> -----
> - ret = tcf_del_notify(net, n, actions, portid, attr_size, extack);
> + tcf_action_offload_cmd_pre(actions, FLOW_ACT_DESTROY, extack,
> &fl_act);
> + ret = tcf_del_notify(net, n, actions, portid, attr_size, extack,
> &fallback_num);
> + tcf_action_offload_del_post(fl_act, actions, extack, fallback_num);
> if (ret)
> goto err;
> ----
>
> where a notification goes to user space to say "success" but hardware
> update fails.
>
> If you look at fl_change() which does the offload you'll see that it
> returns err on any of sw or hw failure (depending on request).
> Notification of success is done in cls_api.c - example for
> creating/replacing with this snippet:
>
> ---
> err = tp->ops->change(net, skb, tp, cl, t->tcm_handle, tca, &fh,
> flags, extack);
> if (err == 0) {
> tfilter_notify(net, skb, n, tp, block, q, parent, fh,
> RTM_NEWTFILTER, false, rtnl_held);
> tfilter_put(tp, fh);
> /* q pointer is NULL for shared blocks */
> if (q)
> q->flags &= ~TCQ_F_CAN_BYPASS;
> }
> ---
Thanks for the context Jamal, much appreciated.
Powered by blists - more mailing lists