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] [thread-next>] [day] [month] [year] [list]
Message-ID: <68e37f9d-0f75-4c59-83db-dfa51af7443c@intel.com>
Date: Wed, 31 Jul 2024 10:59:25 +0200
From: Wojciech Drewek <wojciech.drewek@...el.com>
To: Heiner Kallweit <hkallweit1@...il.com>, Realtek linux nic maintainers
	<nic_swsd@...ltek.com>, Paolo Abeni <pabeni@...hat.com>, Jakub Kicinski
	<kuba@...nel.org>, David Miller <davem@...emloft.net>, Eric Dumazet
	<edumazet@...gle.com>
CC: "netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: Re: [PATCH net] r8169: don't increment tx_dropped in case of
 NETDEV_TX_BUSY



On 30.07.2024 21:51, Heiner Kallweit wrote:
> The skb isn't consumed in case of NETDEV_TX_BUSY, therefore don't
> increment the tx_dropped counter.
> 
> Fixes: 188f4af04618 ("r8169: use NETDEV_TX_{BUSY/OK}")
> Cc: stable@...r.kernel.org
> Suggested-by: Jakub Kicinski <kuba@...nel.org>
> Signed-off-by: Heiner Kallweit <hkallweit1@...il.com>
> ---

Reviewed-by: Wojciech Drewek <wojciech.drewek@...el.com>

>  drivers/net/ethernet/realtek/r8169_main.c | 8 ++------
>  1 file changed, 2 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/net/ethernet/realtek/r8169_main.c b/drivers/net/ethernet/realtek/r8169_main.c
> index 714d2e804..3507c2e28 100644
> --- a/drivers/net/ethernet/realtek/r8169_main.c
> +++ b/drivers/net/ethernet/realtek/r8169_main.c
> @@ -4349,7 +4349,8 @@ static netdev_tx_t rtl8169_start_xmit(struct sk_buff *skb,
>  	if (unlikely(!rtl_tx_slots_avail(tp))) {
>  		if (net_ratelimit())
>  			netdev_err(dev, "BUG! Tx Ring full when queue awake!\n");
> -		goto err_stop_0;
> +		netif_stop_queue(dev);
> +		return NETDEV_TX_BUSY;
>  	}
>  
>  	opts[1] = rtl8169_tx_vlan_tag(skb);
> @@ -4405,11 +4406,6 @@ static netdev_tx_t rtl8169_start_xmit(struct sk_buff *skb,
>  	dev_kfree_skb_any(skb);
>  	dev->stats.tx_dropped++;
>  	return NETDEV_TX_OK;
> -
> -err_stop_0:
> -	netif_stop_queue(dev);
> -	dev->stats.tx_dropped++;
> -	return NETDEV_TX_BUSY;
>  }
>  
>  static unsigned int rtl_last_frag_len(struct sk_buff *skb)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ