From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
To: davem@davemloft.net, jeff@garzik.org
Cc: peter.p.waskiewicz.jr@intel.com, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: [PATCH 2/2] net: Fix consumers of skb->queue_mapping to use lower 8 bits
Date: Tue, 24 Jun 2008 16:28:12 -0700 [thread overview]
Message-ID: <20080624232719.11654.97193.stgit@localhost.localdomain> (raw)
In-Reply-To: <20080624232545.11654.65805.stgit@localhost.localdomain>
From: PJ Waskiewicz <peter.p.waskiewicz.jr@intel.com>
This patch will cause the consumers of skb->queue_mapping to only use the
lower 8 bits, so drivers can use the upper 8 bits for CPU index.
Signed-off-by: PJ Waskiewicz <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
drivers/net/ixgbe/ixgbe_main.c | 2 +-
include/linux/skbuff.h | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c
index 0d37c90..7b39394 100644
--- a/drivers/net/ixgbe/ixgbe_main.c
+++ b/drivers/net/ixgbe/ixgbe_main.c
@@ -3244,7 +3244,7 @@ static int ixgbe_xmit_frame(struct sk_buff *skb, struct net_device *netdev)
unsigned int nr_frags = skb_shinfo(skb)->nr_frags;
len -= skb->data_len;
#ifdef CONFIG_NETDEVICES_MULTIQUEUE
- r_idx = (adapter->num_tx_queues - 1) & skb->queue_mapping;
+ r_idx = (adapter->num_tx_queues - 1) & (skb->queue_mapping & 0xff);
#endif
tx_ring = &adapter->tx_ring[r_idx];
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index 299ec4b..0246827 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -1672,14 +1672,14 @@ static inline void skb_init_secmark(struct sk_buff *skb)
static inline void skb_set_queue_mapping(struct sk_buff *skb, u16 queue_mapping)
{
#ifdef CONFIG_NETDEVICES_MULTIQUEUE
- skb->queue_mapping = queue_mapping;
+ skb->queue_mapping = (queue_mapping & 0xff);
#endif
}
static inline u16 skb_get_queue_mapping(struct sk_buff *skb)
{
#ifdef CONFIG_NETDEVICES_MULTIQUEUE
- return skb->queue_mapping;
+ return (skb->queue_mapping & 0xff);
#else
return 0;
#endif
@@ -1688,7 +1688,7 @@ static inline u16 skb_get_queue_mapping(struct sk_buff *skb)
static inline void skb_copy_queue_mapping(struct sk_buff *to, const struct sk_buff *from)
{
#ifdef CONFIG_NETDEVICES_MULTIQUEUE
- to->queue_mapping = from->queue_mapping;
+ to->queue_mapping = (from->queue_mapping & 0xff);
#endif
}
next prev parent reply other threads:[~2008-06-24 23:28 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-24 23:27 [PATCH 1/2] net: Add the CPU id to skb->queue_mapping's upper 8 bits Jeff Kirsher
2008-06-24 23:28 ` Jeff Kirsher [this message]
2008-06-24 23:37 ` David Miller
2008-06-25 18:31 ` Waskiewicz Jr, Peter P
2008-06-25 23:37 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080624232719.11654.97193.stgit@localhost.localdomain \
--to=jeffrey.t.kirsher@intel.com \
--cc=davem@davemloft.net \
--cc=jeff@garzik.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=peter.p.waskiewicz.jr@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox