* [PATCH 3/4]: net: If SKB has attached socket, use socket's hash for TX queue selection.
@ 2009-01-28 0:40 David Miller
0 siblings, 0 replies; only message in thread
From: David Miller @ 2009-01-28 0:40 UTC (permalink / raw)
To: netdev
Signed-off-by: David S. Miller <davem@davemloft.net>
---
net/core/dev.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/net/core/dev.c b/net/core/dev.c
index b21ad0b..cb8caa9 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -1729,6 +1729,13 @@ static u16 simple_tx_hash(struct net_device *dev, struct sk_buff *skb)
goto out;
}
+ if (skb->sk && skb->sk->sk_hash) {
+ u32 val = skb->sk->sk_hash;
+
+ hash = jhash_1word(val, simple_tx_hashrnd);
+ goto out;
+ }
+
switch (skb->protocol) {
case htons(ETH_P_IP):
if (!(ip_hdr(skb)->frag_off & htons(IP_MF | IP_OFFSET)))
--
1.6.1.15.g159c88
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2009-01-28 0:40 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-28 0:40 [PATCH 3/4]: net: If SKB has attached socket, use socket's hash for TX queue selection David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).