From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Abeni Subject: Re: [PATCH net-next v3 4/5] net/tc: introduce TC_ACT_REINJECT. Date: Wed, 25 Jul 2018 15:55:10 +0200 Message-ID: <00dcbc6fd16e3e409e445244ca61ec0421296c85.camel@redhat.com> References: <3c20787be0fd5d64728ffed46ae0a7dff10d7e05.1532437050.git.pabeni@redhat.com> <2bf4fbfd-abe2-7d3b-a4f8-42805b7760c5@mojatatu.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Cc: Cong Wang , Jiri Pirko , Daniel Borkmann , Marcelo Ricardo Leitner , Eyal Birger , "David S. Miller" , Shmulik Ladkani To: Jamal Hadi Salim , netdev@vger.kernel.org Return-path: Received: from mx3-rdu2.redhat.com ([66.187.233.73]:39996 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728998AbeGYPHA (ORCPT ); Wed, 25 Jul 2018 11:07:00 -0400 In-Reply-To: <2bf4fbfd-abe2-7d3b-a4f8-42805b7760c5@mojatatu.com> Sender: netdev-owner@vger.kernel.org List-ID: Hi, On Wed, 2018-07-25 at 08:16 -0400, Jamal Hadi Salim wrote: > +Cc Shmulik > > Paolo - please also run the tdc tests (and add anymore if you > feel they dont do coverage to your changes) I run successfully tdc tests on a patched before posting. I plan to rerun them before posting the v4. > On 24/07/18 04:06 PM, Paolo Abeni wrote: > > This is similar TC_ACT_REDIRECT, but with a slightly different > > semantic: > > - on ingress the mirred skbs are passed to the target device > > network stack without any additional check not scrubbing. > > - the rcu-protected stats provided via the tcf_result struct > > are updated on error conditions. > > > > This new tcfa_action value is not exposed to the user-space > > and can be used only internally by clsact. > > > > v1 -> v2: do not touch TC_ACT_REDIRECT code path, introduce > > a new action type instead > > > > v2 -> v3: > > - rename the new action value TC_ACT_REINJECT, update the > > helper accordingly > > - take care of uncloned reinjected packets in XDP generic > > hook > > > > Signed-off-by: Paolo Abeni > > --- > > include/net/pkt_cls.h | 3 +++ > > include/net/sch_generic.h | 19 +++++++++++++++++++ > > net/core/dev.c | 6 +++++- > > 3 files changed, 27 insertions(+), 1 deletion(-) > > > > diff --git a/include/net/pkt_cls.h b/include/net/pkt_cls.h > > index 2081e4219f81..36ccfe2a303a 100644 > > --- a/include/net/pkt_cls.h > > +++ b/include/net/pkt_cls.h > > @@ -7,6 +7,9 @@ > > #include > > #include > > > > +/* TC action not accessible from user space */ > > +#define TC_ACT_REINJECT (TC_ACT_VALUE_MAX + 1) > > Lets say in the future we add a new opcode. > Will old kernel, new iproute2 (new value) work? It will works as it currently does in similar situation: opcode unknown to the kernel are treated as TC_ACT_UNSPEC even now. Cheers, Paolo