[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <55913edd-4bea-4056-8fd8-75e5bb97f6c6@intel.com>
Date: Wed, 23 Aug 2023 16:57:03 -0700
From: "Nambiar, Amritha" <amritha.nambiar@...el.com>
To: Jakub Kicinski <kuba@...nel.org>
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 8/22/2023 5:40 PM, Jakub Kicinski wrote:
> 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 ?
>
Okay, I'll submit a separate patch to move struct netdev_queue out of
netdevice.h to a new header before this.
>> 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