[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <cab7b508-37af-09f4-a55e-69e89d29373c@kernel.org>
Date: Wed, 18 Oct 2023 09:08:03 -0600
From: David Ahern <dsahern@...nel.org>
To: Heng Guo <heng.guo@...driver.com>, davem@...emloft.net,
edumazet@...gle.com, kuba@...nel.org, pabeni@...hat.com
Cc: netdev@...r.kernel.org, filip.pudak@...driver.com, kun.song@...driver.com
Subject: Re: [PATCH net-next V2] net: fix IPSTATS_MIB_OUTPKGS increment in
OutForwDatagrams.
On 10/17/23 7:06 PM, Heng Guo wrote:
> diff --git a/net/mpls/af_mpls.c b/net/mpls/af_mpls.c
> index 1af29af65388..15988e5a745b 100644
> --- a/net/mpls/af_mpls.c
> +++ b/net/mpls/af_mpls.c
> @@ -141,14 +141,14 @@ void mpls_stats_inc_outucastpkts(struct net_device *dev,
> tx_packets,
> tx_bytes);
> } else if (skb->protocol == htons(ETH_P_IP)) {
> - IP_UPD_PO_STATS(dev_net(dev), IPSTATS_MIB_OUT, skb->len);
> + IP_INC_STATS(dev_net(dev), IPSTATS_MIB_OUTREQUESTS);
> #if IS_ENABLED(CONFIG_IPV6)
> } else if (skb->protocol == htons(ETH_P_IPV6)) {
> struct inet6_dev *in6dev = __in6_dev_get(dev);
>
> if (in6dev)
> - IP6_UPD_PO_STATS(dev_net(dev), in6dev,
> - IPSTATS_MIB_OUT, skb->len);
> + IP6_INC_STATS(dev_net(dev), in6dev,
> + IPSTATS_MIB_OUTREQUESTS);
> #endif
> }
> }
mpls_stats_inc_outucastpkts is called for both forward and local output
use cases.
Powered by blists - more mailing lists