Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f7105d63 authored by David S. Miller's avatar David S. Miller
Browse files

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

parent 0c8dfc83
Loading
Loading
Loading
Loading
+7 −0
Original line number Original line Diff line number Diff line
@@ -1729,6 +1729,13 @@ static u16 simple_tx_hash(struct net_device *dev, struct sk_buff *skb)
		goto out;
		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) {
	switch (skb->protocol) {
	case htons(ETH_P_IP):
	case htons(ETH_P_IP):
		if (!(ip_hdr(skb)->frag_off & htons(IP_MF | IP_OFFSET)))
		if (!(ip_hdr(skb)->frag_off & htons(IP_MF | IP_OFFSET)))