From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Abeni Subject: Re: [PATCH net-next v3 5/5] act_mirred: use TC_ACT_REINJECT when possible Date: Wed, 25 Jul 2018 12:14:32 +0200 Message-ID: <3b2edafe358d1015a143b1fa0cf49b180e962c88.camel@redhat.com> References: <612f6fb5b0cdddcbbc2d99f65b148b7f3b8b9a27.1532437050.git.pabeni@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Cc: Linux Kernel Network Developers , Jamal Hadi Salim , Jiri Pirko , Daniel Borkmann , Marcelo Ricardo Leitner , Eyal Birger , David Miller To: Cong Wang Return-path: Received: from mx3-rdu2.redhat.com ([66.187.233.73]:57974 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728679AbeGYLZf (ORCPT ); Wed, 25 Jul 2018 07:25:35 -0400 In-Reply-To: Sender: netdev-owner@vger.kernel.org List-ID: On Tue, 2018-07-24 at 14:15 -0700, Cong Wang wrote: > On Tue, Jul 24, 2018 at 1:07 PM Paolo Abeni wrote: > > + > > + /* let's the caller reinject the packet, if possible */ > > + if (skb_at_tc_ingress(skb)) { > > + res->ingress = want_ingress; > > + res->qstats = this_cpu_ptr(m->common.cpu_qstats); > > + return TC_ACT_REINJECT; > > + } > > Looks good to me, but here we no longer return user-specified > return value here, I am sure it is safe for TC_ACT_STOLEN, but > I am not sure if it is safe for other values, like TC_ACT_RECLASSIFY. I can make it safer, using the no clone path only if tcf_action is TC_ACT_STOLEN. That will still cover the relevant use-cases. Will do that in v4. Cheers, Paolo