diff options
author | Vladislav Zolotarov <vladz@broadcom.com> | 2010-12-13 09:27:10 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-12-17 00:15:53 +0300 |
commit | a3d22a68d752ccc1a01bb0a64dd70b7a98bf9e23 (patch) | |
tree | e51c231b29d8e285acb8196b6b893c718febd2b1 /include/linux/netdevice.h | |
parent | d33e455337ea2c71d09d7f4367d6ad6dd32b6965 (diff) | |
download | linux-a3d22a68d752ccc1a01bb0a64dd70b7a98bf9e23.tar.xz |
bnx2x: Take the distribution range definition out of skb_tx_hash()
Move the calcualation of the Tx hash for a given hash range into a separate
function and define the skb_tx_hash(), which calculates a Tx hash for a
[0; dev->real_num_tx_queues - 1] hash values range, using this
function (__skb_tx_hash()).
Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/netdevice.h')
-rw-r--r-- | include/linux/netdevice.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index d31bc3c94717..445e6825f8eb 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h @@ -1747,6 +1747,16 @@ static inline void netif_wake_subqueue(struct net_device *dev, u16 queue_index) __netif_schedule(txq->qdisc); } +/* + * Returns a Tx hash for the given packet when dev->real_num_tx_queues is used + * as a distribution range limit for the returned value. + */ +static inline u16 skb_tx_hash(const struct net_device *dev, + const struct sk_buff *skb) +{ + return __skb_tx_hash(dev, skb, dev->real_num_tx_queues); +} + /** * netif_is_multiqueue - test if device has multiple transmit queues * @dev: network device |