aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/skbuff.h
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2009-01-27 19:22:11 -0500
committerDavid S. Miller <davem@davemloft.net>2009-01-27 19:22:11 -0500
commitd5a9e24afb4ab38110ebb777588ea0bd0eacbd0a (patch)
tree819b2f875a9a1835aa92e051460ddcfe53e9e00f /include/linux/skbuff.h
parenta73efd0a8552927ebe5dff84936f7fdac4f7e314 (diff)
net: Allow RX queue selection to seed TX queue hashing.
The idea is that drivers which implement multiqueue RX pre-seed the SKB by recording the RX queue selected by the hardware. If such a seed is found on TX, we'll use that to select the outgoing TX queue. This helps get more consistent load balancing on router and firewall loads. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/skbuff.h')
-rw-r--r--include/linux/skbuff.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index cf2cb50f77d1..a2c2378a9c58 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -1904,6 +1904,21 @@ static inline void skb_copy_queue_mapping(struct sk_buff *to, const struct sk_bu
1904 to->queue_mapping = from->queue_mapping; 1904 to->queue_mapping = from->queue_mapping;
1905} 1905}
1906 1906
1907static inline void skb_record_rx_queue(struct sk_buff *skb, u16 rx_queue)
1908{
1909 skb->queue_mapping = rx_queue + 1;
1910}
1911
1912static inline u16 skb_get_rx_queue(struct sk_buff *skb)
1913{
1914 return skb->queue_mapping - 1;
1915}
1916
1917static inline bool skb_rx_queue_recorded(struct sk_buff *skb)
1918{
1919 return (skb->queue_mapping != 0);
1920}
1921
1907#ifdef CONFIG_XFRM 1922#ifdef CONFIG_XFRM
1908static inline struct sec_path *skb_sec_path(struct sk_buff *skb) 1923static inline struct sec_path *skb_sec_path(struct sk_buff *skb)
1909{ 1924{