All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Hariprasad Kelam <hkelam@marvell.com>
Cc: <netdev@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	Sunil Goutham <sgoutham@marvell.com>,
	Geetha sowjanya <gakula@marvell.com>,
	"Subbaraya Sundeep" <sbhatta@marvell.com>,
	Bharat Bhushan <bbhushan2@marvell.com>,
	"Andrew Lunn" <andrew+netdev@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	"Eric Dumazet" <edumazet@google.com>,
	Paolo Abeni <pabeni@redhat.com>,
	Tomasz Duszynski <tduszynski@marvell.com>,
	Simon Horman <horms@kernel.org>
Subject: Re: [net PatchV4] Octeontx2-vf: Fix max packet length errors
Date: Fri, 25 Jul 2025 14:39:14 -0700	[thread overview]
Message-ID: <20250725143914.696316b8@kernel.org> (raw)
In-Reply-To: <20250724070623.2354509-1-hkelam@marvell.com>

On Thu, 24 Jul 2025 12:36:22 +0530 Hariprasad Kelam wrote:
> @@ -2165,6 +2166,8 @@ static netdev_tx_t otx2_xmit(struct sk_buff *skb, struct net_device *netdev)
>  	/* Check for minimum and maximum packet length */
>  	if (skb->len <= ETH_HLEN ||
>  	    (!skb_shinfo(skb)->gso_size && skb->len > pf->tx_max_pktlen)) {
> +		dev_stats = &pf->hw.dev_stats;
> +		dev_stats->tx_discards++;
>  		dev_kfree_skb(skb);
>  		return NETDEV_TX_OK;
>  	}

This is a multi-queue device and the counter is per device.
The counter should really be an atomic_long_t, to avoid races.
-- 
pw-bot: cr

      reply	other threads:[~2025-07-25 21:39 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-24  7:06 [net PatchV4] Octeontx2-vf: Fix max packet length errors Hariprasad Kelam
2025-07-25 21:39 ` Jakub Kicinski [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250725143914.696316b8@kernel.org \
    --to=kuba@kernel.org \
    --cc=andrew+netdev@lunn.ch \
    --cc=bbhushan2@marvell.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=gakula@marvell.com \
    --cc=hkelam@marvell.com \
    --cc=horms@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=sbhatta@marvell.com \
    --cc=sgoutham@marvell.com \
    --cc=tduszynski@marvell.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.