[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <53FDA112.3090005@redhat.com>
Date: Wed, 27 Aug 2014 11:12:50 +0200
From: Daniel Borkmann <dborkman@...hat.com>
To: Tom Herbert <therbert@...gle.com>
CC: David Miller <davem@...emloft.net>,
Linux Netdev List <netdev@...r.kernel.org>
Subject: Re: [PATCH net-next] net: add skb_get_tx_queue() helper
On 08/27/2014 01:51 AM, Tom Herbert wrote:
> On Tue, Aug 26, 2014 at 2:06 PM, Daniel Borkmann <dborkman@...hat.com> wrote:
>> Replace occurences of skb_get_queue_mapping() and follow-up
>> netdev_get_tx_queue() with an actual helper function.
>>
>> Signed-off-by: Daniel Borkmann <dborkman@...hat.com>
>> ---
>> include/linux/netdevice.h | 8 ++++++++
>> net/core/netpoll.c | 2 +-
>> net/core/pktgen.c | 4 +---
>> net/packet/af_packet.c | 4 +---
>> net/sched/sch_generic.c | 6 ++++--
>> 5 files changed, 15 insertions(+), 9 deletions(-)
>>
>> diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
>> index 039b237..200ee4f 100644
>> --- a/include/linux/netdevice.h
>> +++ b/include/linux/netdevice.h
>> @@ -1747,6 +1747,14 @@ struct netdev_queue *netdev_get_tx_queue(const struct net_device *dev,
>> return &dev->_tx[index];
>> }
>>
>> +static inline struct netdev_queue *skb_get_tx_queue(const struct net_device *dev,
>> + const struct sk_buff *skb)
>> +{
>> + u16 index = skb_get_queue_mapping(skb);
>> +
>> + return netdev_get_tx_queue(dev, index);
>> +}
>> +
> return netdev_get_tx_queue(dev, skb_get_queue_mapping(skb));
>
> if you want to be a little more concise.
That's fine by me too, lets keep it a one-liner.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists