lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250725143914.696316b8@kernel.org>
Date: Fri, 25 Jul 2025 14:39:14 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Hariprasad Kelam <hkelam@...vell.com>
Cc: <netdev@...r.kernel.org>, <linux-kernel@...r.kernel.org>, Sunil Goutham
 <sgoutham@...vell.com>, Geetha sowjanya <gakula@...vell.com>, "Subbaraya
 Sundeep" <sbhatta@...vell.com>, Bharat Bhushan <bbhushan2@...vell.com>,
 "Andrew Lunn" <andrew+netdev@...n.ch>, "David S. Miller"
 <davem@...emloft.net>, "Eric Dumazet" <edumazet@...gle.com>, Paolo Abeni
 <pabeni@...hat.com>, Tomasz Duszynski <tduszynski@...vell.com>, Simon
 Horman <horms@...nel.org>
Subject: Re: [net PatchV4] Octeontx2-vf: Fix max packet length errors

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ