Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755440Ab0LOUyU (ORCPT ); Wed, 15 Dec 2010 15:54:20 -0500 Received: from mga02.intel.com ([134.134.136.20]:12677 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755423Ab0LOUyR (ORCPT ); Wed, 15 Dec 2010 15:54:17 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.59,351,1288594800"; d="scan'208";a="584089043" Message-ID: <4D092AF9.9050802@intel.com> Date: Wed, 15 Dec 2010 12:54:17 -0800 From: John Fastabend User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.13) Gecko/20101207 Thunderbird/3.1.7 MIME-Version: 1.0 To: "Yu, Fenghua" CC: "David S. Miller" , Eric Dumazet , "Tang, Xinan" , Junchang Wang , netdev , linux-kernel Subject: Re: [PATCH 3/3] drivers/net/ixgbe/ixgbe_main.c: get tx queue mapping specified in socket References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1758 Lines: 47 On 12/15/2010 12:02 PM, Yu, Fenghua wrote: > From: Fenghua Yu > > 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 > Signed-off-by: Junchang Wang > Signed-off-by: Xinan Tang > --- > 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. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/