summaryrefslogtreecommitdiffstats
path: root/include/linux/skbuff.h
diff options
context:
space:
mode:
authorStephen Hemminger2009-03-21 21:39:26 +0100
committerDavid S. Miller2009-03-21 21:39:26 +0100
commit9247744e5eaa29aecee5342a0c8694187a6aadcd (patch)
tree74ccf6e63f2a8192502f432376b1f68136ace8b1 /include/linux/skbuff.h
parentatm: lec use dev_change_mtu (diff)
downloadkernel-qcow2-linux-9247744e5eaa29aecee5342a0c8694187a6aadcd.tar.gz
kernel-qcow2-linux-9247744e5eaa29aecee5342a0c8694187a6aadcd.tar.xz
kernel-qcow2-linux-9247744e5eaa29aecee5342a0c8694187a6aadcd.zip
skb: expose and constify hash primitives
Some minor changes to queue hashing: 1. Use const on accessor functions 2. Export skb_tx_hash for use in drivers (see ixgbe) Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/skbuff.h')
-rw-r--r--include/linux/skbuff.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index 1fbab2ae613c..bb1981fd60f3 100644
--- a/include/linux/skbuff.h
+++ b/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)
{