From mboxrd@z Thu Jan 1 00:00:00 1970 From: Cong Wang Subject: Re: [PATCH net-next v3 4/5] net/tc: introduce TC_ACT_REINJECT. Date: Tue, 24 Jul 2018 13:50:44 -0700 Message-ID: References: <3c20787be0fd5d64728ffed46ae0a7dff10d7e05.1532437050.git.pabeni@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Cc: Linux Kernel Network Developers , Jamal Hadi Salim , Jiri Pirko , Daniel Borkmann , Marcelo Ricardo Leitner , Eyal Birger , David Miller To: Paolo Abeni Return-path: Received: from mail-pl0-f65.google.com ([209.85.160.65]:45934 "EHLO mail-pl0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388787AbeGXV7M (ORCPT ); Tue, 24 Jul 2018 17:59:12 -0400 Received: by mail-pl0-f65.google.com with SMTP id j8-v6so2209748pll.12 for ; Tue, 24 Jul 2018 13:50:57 -0700 (PDT) In-Reply-To: Sender: netdev-owner@vger.kernel.org List-ID: 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.