From 322a114fe0b29b063c6577e4a946680efc30bab0 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Sat, 21 Mar 2009 13:39:26 -0700 Subject: [PATCH] --- yaml --- r: 135353 b: refs/heads/master c: 9247744e5eaa29aecee5342a0c8694187a6aadcd h: refs/heads/master i: 135351: 33c7d2037d4ced1bf43543a775f790b2851f8823 v: v3 --- [refs] | 2 +- trunk/include/linux/skbuff.h | 9 ++++++--- trunk/net/core/dev.c | 3 ++- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/[refs] b/[refs] index 620f96c43027..2d829b9dc38f 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 1f1900f935e810d01c716fa2aaf8c9d25caa4151 +refs/heads/master: 9247744e5eaa29aecee5342a0c8694187a6aadcd diff --git a/trunk/include/linux/skbuff.h b/trunk/include/linux/skbuff.h index 1fbab2ae613c..bb1981fd60f3 100644 --- a/trunk/include/linux/skbuff.h +++ b/trunk/include/linux/skbuff.h @@ -1969,7 +1969,7 @@ static inline void skb_set_queue_mapping(struct sk_buff *skb, u16 queue_mapping) skb->queue_mapping = queue_mapping; } -static inline u16 skb_get_queue_mapping(struct sk_buff *skb) +static inline u16 skb_get_queue_mapping(const struct sk_buff *skb) { return skb->queue_mapping; } @@ -1984,16 +1984,19 @@ static inline void skb_record_rx_queue(struct sk_buff *skb, u16 rx_queue) skb->queue_mapping = rx_queue + 1; } -static inline u16 skb_get_rx_queue(struct sk_buff *skb) +static inline u16 skb_get_rx_queue(const struct sk_buff *skb) { return skb->queue_mapping - 1; } -static inline bool skb_rx_queue_recorded(struct sk_buff *skb) +static inline bool skb_rx_queue_recorded(const struct sk_buff *skb) { return (skb->queue_mapping != 0); } +extern u16 skb_tx_hash(const struct net_device *dev, + const struct sk_buff *skb); + #ifdef CONFIG_XFRM static inline struct sec_path *skb_sec_path(struct sk_buff *skb) { diff --git a/trunk/net/core/dev.c b/trunk/net/core/dev.c index ca212acd3348..fdb9973b82a6 100644 --- a/trunk/net/core/dev.c +++ b/trunk/net/core/dev.c @@ -1725,7 +1725,7 @@ int dev_hard_start_xmit(struct sk_buff *skb, struct net_device *dev, static u32 skb_tx_hashrnd; -static u16 skb_tx_hash(struct net_device *dev, struct sk_buff *skb) +u16 skb_tx_hash(const struct net_device *dev, const struct sk_buff *skb) { u32 hash; @@ -1740,6 +1740,7 @@ static u16 skb_tx_hash(struct net_device *dev, struct sk_buff *skb) return (u16) (((u64) hash * dev->real_num_tx_queues) >> 32); } +EXPORT_SYMBOL(skb_tx_hash); static struct netdev_queue *dev_pick_tx(struct net_device *dev, struct sk_buff *skb)