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] [thread-next>] [day] [month] [year] [list]
Date: Tue, 22 Aug 2023 17:40:22 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Amritha Nambiar <amritha.nambiar@...el.com>
Cc: netdev@...r.kernel.org, davem@...emloft.net, sridhar.samudrala@...el.com
Subject: Re: [net-next PATCH v2 4/9] net: Move kernel helpers for queue
 index outside sysfs

On Mon, 21 Aug 2023 16:25:31 -0700 Amritha Nambiar wrote:
> +static inline
> +unsigned int get_netdev_queue_index(struct netdev_queue *queue)
> +{
> +	struct net_device *dev = queue->dev;
> +	unsigned int i;
> +
> +	i = queue - dev->_tx;
> +	DEBUG_NET_WARN_ON_ONCE(i >= dev->num_tx_queues);
> +
> +	return i;
> +}

If this is needed let's move it to a new header -
include/net/netdev_tx_queue.h ?

>  static inline struct netdev_queue *skb_get_tx_queue(const struct net_device *dev,
>  						    const struct sk_buff *skb)
>  {
> diff --git a/include/net/netdev_rx_queue.h b/include/net/netdev_rx_queue.h
> index 66bda0dfe71c..ac58fa7c2532 100644
> --- a/include/net/netdev_rx_queue.h
> +++ b/include/net/netdev_rx_queue.h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ