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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <dbcb476d-9bfd-42bd-bef8-8085baa05063@redhat.com>
Date: Tue, 27 May 2025 12:06:40 +0200
From: Paolo Abeni <pabeni@...hat.com>
To: Gur Stavi <gur.stavi@...wei.com>
Cc: netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
 "David S. Miller" <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>,
 Jakub Kicinski <kuba@...nel.org>, Simon Horman <horms@...nel.org>,
 Fan Gong <gongfan1@...wei.com>
Subject: Re: [PATCH net-next v2 1/3] queue_api: add subqueue variant
 netif_subqueue_sent

On 5/22/25 8:54 AM, Gur Stavi wrote:
> diff --git a/include/net/netdev_queues.h b/include/net/netdev_queues.h
> index ba2eaf39089b..7b6656ee549f 100644
> --- a/include/net/netdev_queues.h
> +++ b/include/net/netdev_queues.h
> @@ -294,6 +294,14 @@ netdev_txq_completed_mb(struct netdev_queue *dev_queue,
>  		netif_txq_try_stop(_txq, get_desc, start_thrs);		\
>  	})
>  
> +#define netif_subqueue_sent(dev, idx, bytes)				\
> +	({								\
> +		struct netdev_queue *_txq;				\
> +									\
> +		_txq = netdev_get_tx_queue(dev, idx);			\
> +		netdev_tx_sent_queue(_txq, bytes);			\
> +	})

The above could be (and should be) a static inline function. Note that
(most of) the existing queue API helper are macros to allow quering the
tx ring without using indirect calls/function pointers.

Thanks,

Paolo


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ