Skip to contentSkip to conversation

: net: If SKB has attached socket, use socket's hash for TX queue selection.

PATCH In review David Miller 1 participant 1 message Jan 28, 2009

Subsystems (2)
lore
Share & tools
lore

David Miller

author maintainer
#0 lore raw

PATCH 3/4 : net: If SKB has attached socket, use socket's hash for TX queue selection.

---
 net/core/dev.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
net/core/dev.c +7 -0
index b21ad0b..cb8caa9 100644
@@ -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)))
Signature · 1 line
1.6.1.15.g159c88