Subject: Re: [PATCH net-next 1/3] flow_offload: allow user to offload tc action to net device

From: Simon Horman <[email-masked]>
Date: Tue, 3 Aug 2021 13:31:00 +0200

On Tue, Aug 03, 2021 at 07:05:52AM -0400, Jamal Hadi Salim wrote:
> On 2021-07-22 5:19 a.m., Simon Horman wrote:
> 
> Triggered by my observation on 2/3 went back and looked at this again to
> see if we have same problem with notification on REPLACE case (I think
> we do) but here's another comment:
> 
> > +EXPORT_SYMBOL(tcf_action_offload_cmd);
> > +
> >   /* Returns numbers of initialized actions or negative error. */
> >   int tcf_action_init(struct net *net, struct tcf_proto *tp, struct nlattr *nla,
> > @@ -1514,6 +1544,9 @@ static int tcf_action_add(struct net *net, struct nlattr *nla,
> >   		return ret;
> >   	ret = tcf_add_notify(net, n, actions, portid, attr_size, extack);
> > +	/* offload actions to hardware if possible */
> > +	tcf_action_offload_cmd(actions, extack);
> > +
> 
> Above seems to be unconditional whether hw update is requested or not?
> The comment says the right thing ("if possible") but the code
> should have checked some sort of skip_sw check?

Jamal, we are going around in circles.

As we have already discussed, this patchset does not add support for
skip_sw (or skip_hw) for actions.