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 10:29:13 +0200 Message-ID: <6a9fd3c8f861c203c7e12a2a2e477796c5e093d5.camel@redhat.com> References: <3c20787be0fd5d64728ffed46ae0a7dff10d7e05.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 , Jiri Pirko , Daniel Borkmann , Marcelo Ricardo Leitner , Eyal Birger , David Miller To: Cong Wang , Jamal Hadi Salim Return-path: Received: from mx3-rdu2.redhat.com ([66.187.233.73]:44586 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728222AbeGYJjw (ORCPT ); Wed, 25 Jul 2018 05:39:52 -0400 In-Reply-To: Sender: netdev-owner@vger.kernel.org List-ID: On Tue, 2018-07-24 at 13:50 -0700, Cong Wang wrote: > On Tue, Jul 24, 2018 at 1:38 PM Cong Wang wrote: > > > > On Tue, Jul 24, 2018 at 1:07 PM Paolo Abeni wrote: > > > +static inline void skb_tc_reinject(struct sk_buff *skb, struct tcf_result *res) > > > +{ > > > + struct gnet_stats_queue *stats = res->qstats; > > > + int ret; > > > + > > > + if (res->ingress) > > > + ret = netif_receive_skb(skb); > > > + else > > > + ret = dev_queue_xmit(skb); > > > + if (ret && stats) > > > + qstats_overlimit_inc(res->qstats); > > > > Why increasing overlimit? Overlimit is typically increased > > by traffic shapers to indicate there is no bandwidth to send > > out the packet. > > > > I fail to understand why overlimit is increased in your case > > here. I guess you want to increase 'drops' instead. > > Hmm, actually the current mirred code increases overlimit too. > But I still don't think it makes sense. Yep, I chose to increment 'overlimits' to preserve the current mirred semantic. AFAICS, that was first introduced with: commit 8919bc13e8d92c5b082c5c0321567383a071f5bc Author: Jamal Hadi Salim Date: Mon Aug 15 05:25:40 2011 +0000 net_sched: fix port mirror/redirect stats reporting Likely increasing 'drops' would be "better", but I'm unsure we can change this established behavior without affecting some user. Anyway, I'm fine either way. Please advice. Cheers, Paolo