All of lore.kernel.org
 help / color / mirror / Atom feed
From: John Fastabend <john.r.fastabend@intel.com>
To: "Yu, Fenghua" <fenghua.yu@intel.com>
Cc: "David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <eric.dumazet@gmail.com>,
	"Tang, Xinan" <xinan.tang@intel.com>,
	Junchang Wang <junchangwang@gmail.com>,
	netdev <netdev@vger.kernel.org>,
	linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 3/3] drivers/net/ixgbe/ixgbe_main.c: get tx queue mapping specified in socket
Date: Wed, 15 Dec 2010 12:54:17 -0800	[thread overview]
Message-ID: <4D092AF9.9050802@intel.com> (raw)
In-Reply-To: <e37daf1b95d0e61008c69298db5520d6b97acdba.1292405004.git.fenghua.yu@intel.com>

On 12/15/2010 12:02 PM, Yu, Fenghua wrote:
> From: Fenghua Yu <fenghua.yu@intel.com>
> 
> Instead of using calculated tx queue mapping, this patch selects tx queue mapping
> which is specified in socket.
> 
> By doing this, tx queue mapping can be bigger than the number of cores and
> stressfully use multiqueue TSS. Or application can specify some of cores/queues
> to send packets and implement flexible load balance policies.
> 
> Signed-off-by: Fenghua Yu <fenghua.yu@intel.com>
> Signed-off-by: Junchang Wang <junchangwang@gmail.com>
> Signed-off-by: Xinan Tang <xinan.tang@intel.com>
> ---
>  drivers/net/ixgbe/ixgbe_main.c |    9 ++++++++-
>  1 files changed, 8 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c
> index eee0b29..4d98928 100644
> --- a/drivers/net/ixgbe/ixgbe_main.c
> +++ b/drivers/net/ixgbe/ixgbe_main.c
> @@ -6255,7 +6255,14 @@ static int ixgbe_maybe_stop_tx(struct net_device *netdev,
>  static u16 ixgbe_select_queue(struct net_device *dev, struct sk_buff *skb)
>  {
>  	struct ixgbe_adapter *adapter = netdev_priv(dev);
> -	int txq = smp_processor_id();
> +	int txq;
> +
> +	txq = sk_tx_queue_get(skb->sk);
> +
> +	if (txq >= 0 && txq < dev->real_num_tx_queues)
> +		return txq;
> +
> +	txq = smp_processor_id();
>  #ifdef IXGBE_FCOE
>  	__be16 protocol;
>  

We are trying to remove stuff from select_queue not add it. I believe however you solve this problem should be generic and not specific to ixgbe.

Thanks,
John.

      reply	other threads:[~2010-12-15 20:54 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-15 20:02 [PATCH 0/3] Kernel interfaces for multiqueue aware socket Fenghua Yu
2010-12-15 20:02 ` Fenghua Yu
2010-12-15 20:02 ` [PATCH 1/3] " Fenghua Yu
2010-12-15 20:02   ` Fenghua Yu
2010-12-15 20:48   ` Eric Dumazet
2010-12-15 20:56     ` Eric Dumazet
2010-12-16  1:14     ` Fenghua Yu
2010-12-16  1:23       ` Stephen Hemminger
2010-12-16  1:28       ` Changli Gao
2010-12-16  2:43         ` Dimitris Michailidis
2010-12-17  6:22         ` Junchang Wang
2010-12-17  6:50           ` Eric Dumazet
2010-12-16  4:44       ` Eric Dumazet
2010-12-17  6:12         ` Junchang Wang
2010-12-16  1:52     ` Junchang Wang
2010-12-16  5:00       ` Eric Dumazet
2010-12-17  6:15         ` Junchang Wang
2010-12-15 20:52   ` John Fastabend
2010-12-15 20:02 ` [PATCH 2/3] net/packet/af_packet.c: implement multiqueue aware socket in af_apcket Fenghua Yu
2010-12-15 20:02   ` Fenghua Yu
2010-12-15 20:02 ` [PATCH 3/3] drivers/net/ixgbe/ixgbe_main.c: get tx queue mapping specified in socket Fenghua Yu
2010-12-15 20:02   ` Fenghua Yu
2010-12-15 20:54   ` John Fastabend [this message]

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=4D092AF9.9050802@intel.com \
    --to=john.r.fastabend@intel.com \
    --cc=davem@davemloft.net \
    --cc=eric.dumazet@gmail.com \
    --cc=fenghua.yu@intel.com \
    --cc=junchangwang@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=xinan.tang@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.