|
@@ -371,34 +371,6 @@ __u32 skb_get_hash_perturb(const struct sk_buff *skb, u32 perturb)
|
|
}
|
|
}
|
|
EXPORT_SYMBOL(skb_get_hash_perturb);
|
|
EXPORT_SYMBOL(skb_get_hash_perturb);
|
|
|
|
|
|
-/*
|
|
|
|
- * Returns a Tx hash based on the given packet descriptor a Tx queues' number
|
|
|
|
- * to be used as a distribution range.
|
|
|
|
- */
|
|
|
|
-u16 __skb_tx_hash(const struct net_device *dev, struct sk_buff *skb,
|
|
|
|
- unsigned int num_tx_queues)
|
|
|
|
-{
|
|
|
|
- u32 hash;
|
|
|
|
- u16 qoffset = 0;
|
|
|
|
- u16 qcount = num_tx_queues;
|
|
|
|
-
|
|
|
|
- if (skb_rx_queue_recorded(skb)) {
|
|
|
|
- hash = skb_get_rx_queue(skb);
|
|
|
|
- while (unlikely(hash >= num_tx_queues))
|
|
|
|
- hash -= num_tx_queues;
|
|
|
|
- return hash;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- if (dev->num_tc) {
|
|
|
|
- u8 tc = netdev_get_prio_tc_map(dev, skb->priority);
|
|
|
|
- qoffset = dev->tc_to_txq[tc].offset;
|
|
|
|
- qcount = dev->tc_to_txq[tc].count;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- return (u16) reciprocal_scale(skb_get_hash(skb), qcount) + qoffset;
|
|
|
|
-}
|
|
|
|
-EXPORT_SYMBOL(__skb_tx_hash);
|
|
|
|
-
|
|
|
|
u32 __skb_get_poff(const struct sk_buff *skb, void *data,
|
|
u32 __skb_get_poff(const struct sk_buff *skb, void *data,
|
|
const struct flow_keys *keys, int hlen)
|
|
const struct flow_keys *keys, int hlen)
|
|
{
|
|
{
|