[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[hurd] 18/26: commit d5a9e24afb4ab38110ebb777588ea0bd0eacbd0a
From: |
Samuel Thibault |
Subject: |
[hurd] 18/26: commit d5a9e24afb4ab38110ebb777588ea0bd0eacbd0a |
Date: |
Tue, 22 Sep 2015 21:51:48 +0000 |
This is an automated email from the git hooks/post-receive script.
sthibault pushed a commit to branch dde
in repository hurd.
commit fb2f0c2c5588ef66debb1e9eaa61f0fce0e50230
Author: David S. Miller <address@hidden>
Date: Tue Jan 27 16:22:11 2009 -0800
commit d5a9e24afb4ab38110ebb777588ea0bd0eacbd0a
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 <address@hidden>
---
libdde_linux26/contrib/include/linux/skbuff.h | 15 +++++++++++++++
libdde_linux26/lib/src/net/core/dev.c | 8 ++++++++
2 files changed, 23 insertions(+)
diff --git a/libdde_linux26/contrib/include/linux/skbuff.h
b/libdde_linux26/contrib/include/linux/skbuff.h
index 6e8450c..745f615 100644
--- a/libdde_linux26/contrib/include/linux/skbuff.h
+++ b/libdde_linux26/contrib/include/linux/skbuff.h
@@ -1903,6 +1903,21 @@ static inline void skb_copy_queue_mapping(struct sk_buff
*to, const struct sk_bu
to->queue_mapping = from->queue_mapping;
}
+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)
+{
+ return skb->queue_mapping - 1;
+}
+
+static inline bool skb_rx_queue_recorded(struct sk_buff *skb)
+{
+ return (skb->queue_mapping != 0);
+}
+
#ifdef CONFIG_XFRM
static inline struct sec_path *skb_sec_path(struct sk_buff *skb)
{
diff --git a/libdde_linux26/lib/src/net/core/dev.c
b/libdde_linux26/lib/src/net/core/dev.c
index 1f065fa..3c3a1d1 100644
--- a/libdde_linux26/lib/src/net/core/dev.c
+++ b/libdde_linux26/lib/src/net/core/dev.c
@@ -1731,6 +1731,13 @@ static u16 simple_tx_hash(struct net_device *dev, struct
sk_buff *skb)
simple_tx_hashrnd_initialized = 1;
}
+ if (skb_rx_queue_recorded(skb)) {
+ u32 val = skb_get_rx_queue(skb);
+
+ 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)))
@@ -1768,6 +1775,7 @@ static u16 simple_tx_hash(struct net_device *dev, struct
sk_buff *skb)
hash = jhash_3words(addr1, addr2, ports, simple_tx_hashrnd);
+out:
return (u16) (((u64) hash * dev->real_num_tx_queues) >> 32);
}
--
Alioth's /usr/local/bin/git-commit-notice on
/srv/git.debian.org/git/pkg-hurd/hurd.git
- [hurd] branch dde updated (ebaa9e1 -> 8e94601), Samuel Thibault, 2015/09/22
- [hurd] 07/26: Fix build, Samuel Thibault, 2015/09/22
- [hurd] 02/26: commit 260d703adc5f275e3ba7ddff6e2e0217bc613b35, Samuel Thibault, 2015/09/22
- [hurd] 01/26: commit dc1f8bf68b311b1537cb65893430b6796118498a, Samuel Thibault, 2015/09/22
- [hurd] 10/26: Add ethoc.h, Samuel Thibault, 2015/09/22
- [hurd] 13/26: udpate ethtool.h, Samuel Thibault, 2015/09/22
- [hurd] 11/26: Cherry-pick phy.h updates, Samuel Thibault, 2015/09/22
- [hurd] 05/26: commit 0c27922e4933ceb86644f4a9b1af212ffe5aad75, Samuel Thibault, 2015/09/22
- [hurd] 16/26: Add devres.c, Samuel Thibault, 2015/09/22
- [hurd] 18/26: commit d5a9e24afb4ab38110ebb777588ea0bd0eacbd0a,
Samuel Thibault <=
- [hurd] 24/26: Merge remote-tracking branch 'incubator/dde' into dde-upstream, Samuel Thibault, 2015/09/22
- [hurd] 08/26: commit 042a53a9e437feaf2230dd2cadcecfae9c7bfe05, Samuel Thibault, 2015/09/22
- [hurd] 22/26: Install missing queue.h, Samuel Thibault, 2015/09/22
- [hurd] 12/26: update pci_ids, Samuel Thibault, 2015/09/22
- [hurd] 17/26: Add pr_cont, Samuel Thibault, 2015/09/22
- [hurd] 26/26: Move files, Samuel Thibault, 2015/09/22
- [hurd] 14/26: update workqueue.h, Samuel Thibault, 2015/09/22
- [hurd] 25/26: Merge branch 'dde-upstream' into dde, Samuel Thibault, 2015/09/22
- [hurd] 23/26: Fix build with gcc 5, Samuel Thibault, 2015/09/22
- [hurd] 15/26: commit 9d21493b4beb8f918ba248032fefa393074a5e2b, Samuel Thibault, 2015/09/22