From: "Yuval Mintz" <yuvalmin@broadcom.com>
To: "Alexander Duyck" <alexander.h.duyck@intel.com>
Cc: eilong@broadcom.com, davem@davemloft.net, netdev@vger.kernel.org,
"Jeff Kirsher" <jeffrey.t.kirsher@intel.com>,
"John Fastabend" <john.r.fastabend@intel.com>
Subject: Re: [RFC net-next (v2) 12/14] ixgbe: set maximal number of default RSS queues
Date: Tue, 26 Jun 2012 14:08:44 +0300 [thread overview]
Message-ID: <4FE9983C.2060006@broadcom.com> (raw)
In-Reply-To: <4FE8B019.4030807@intel.com>
>> How about this:
>> diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_lib.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_lib.c
>> index af1a531..23a8609 100644
>> --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_lib.c
>> +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_lib.c
>> @@ -277,6 +277,8 @@ static inline bool ixgbe_set_rss_queues(struct ixgbe_adapter *adapter)
>> bool ret = false;
>> struct ixgbe_ring_feature *f = &adapter->ring_feature[RING_F_RSS];
>>
>> + f->indices = min_t(int, netif_get_num_default_rss_queues(), f->indices);
>> +
>> if (adapter->flags & IXGBE_FLAG_RSS_ENABLED) {
>> f->mask = 0xF;
>> adapter->num_rx_queues = f->indices;
>> @@ -302,7 +304,9 @@ static inline bool ixgbe_set_fdir_queues(struct ixgbe_adapter *adapter)
>> bool ret = false;
>> struct ixgbe_ring_feature *f_fdir = &adapter->ring_feature[RING_F_FDIR];
>>
>> - f_fdir->indices = min_t(int, num_online_cpus(), f_fdir->indices);
>> + f_fdir->indices = min_t(int, netif_get_num_default_rss_queues(),
>> + f_fdir->indices);
>> +
>> f_fdir->mask = 0;
>>
>> /*
>> @@ -339,8 +343,7 @@ static inline bool ixgbe_set_fcoe_queues(struct ixgbe_adapter *adapter)
>> if (!(adapter->flags & IXGBE_FLAG_FCOE_ENABLED))
>> return false;
>>
>> - f->indices = min_t(int, num_online_cpus(), f->indices);
>> -
>> + f->indices = min_t(int, f->indices, netif_get_num_default_rss_queues());
>> adapter->num_rx_queues = 1;
>> adapter->num_tx_queues = 1;
>>
> This makes much more sense, but still needs a few minor changes.
Well, what about this one:
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_lib.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_lib.c
index af1a531..0dd1e51 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_lib.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_lib.c
@@ -277,6 +277,7 @@ static inline bool ixgbe_set_rss_queues(struct ixgbe_adapter *adapter)
bool ret = false;
struct ixgbe_ring_feature *f = &adapter->ring_feature[RING_F_RSS];
+ f->indices = min_t(int, netif_get_num_default_rss_queues(), f->indices);
if (adapter->flags & IXGBE_FLAG_RSS_ENABLED) {
f->mask = 0xF;
adapter->num_rx_queues = f->indices;
@@ -376,7 +377,7 @@ static inline bool ixgbe_set_dcb_queues(struct ixgbe_adapter *adapter)
/* Map queue offset and counts onto allocated tx queues */
per_tc_q = min_t(unsigned int, dev->num_tx_queues / tcs, DCB_QUEUE_CAP);
- q = min_t(int, num_online_cpus(), per_tc_q);
+ q = min_t(int, netif_get_num_default_rss_queues(), per_tc_q);
for (i = 0; i < tcs; i++) {
netdev_set_tc_queue(dev, i, q, offset);
next prev parent reply other threads:[~2012-06-26 11:10 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-25 11:45 [RFC net-next (v2) 00/14] default maximal number of RSS queues in mq drivers Yuval Mintz
2012-06-25 11:45 ` [RFC net-next (v2) 01/14] net-next: Add netif_get_num_default_rss_queues Yuval Mintz
2012-06-25 11:45 ` [RFC net-next (v2) 02/14] mlx4: set maximal number of default RSS queues Yuval Mintz
2012-06-25 11:45 ` [RFC net-next (v2) 03/14] vxge: " Yuval Mintz
2012-06-25 11:45 ` [RFC net-next (v2) 04/14] qlge: " Yuval Mintz
2012-06-25 11:45 ` [RFC net-next (v2) 05/14] cxgb3: " Yuval Mintz
2012-06-25 11:45 ` [RFC net-next (v2) 06/14] cxgb4: " Yuval Mintz
2012-06-25 11:45 ` [RFC net-next (v2) 07/14] myri10ge: " Yuval Mintz
2012-06-25 11:45 ` [RFC net-next (v2) 08/14] tg3: " Yuval Mintz
2012-06-25 11:45 ` [RFC net-next (v2) 09/14] bnx2: " Yuval Mintz
2012-06-25 11:45 ` [RFC net-next (v2) 10/14] bnx2x: " Yuval Mintz
2012-06-25 11:45 ` [RFC net-next (v2) 11/14] igb: " Yuval Mintz
2012-06-25 17:31 ` Vick, Matthew
2012-06-25 18:20 ` Eilon Greenstein
2012-06-25 18:38 ` Ben Hutchings
2012-06-25 11:45 ` [RFC net-next (v2) 12/14] ixgbe: " Yuval Mintz
2012-06-25 15:44 ` Alexander Duyck
2012-06-25 17:53 ` Eilon Greenstein
2012-06-25 18:38 ` Alexander Duyck
2012-06-25 18:44 ` Ben Hutchings
2012-06-25 21:03 ` Alexander Duyck
2012-06-26 11:08 ` Yuval Mintz [this message]
2012-06-26 15:55 ` Alexander Duyck
2012-06-26 18:23 ` Eilon Greenstein
2012-06-25 11:45 ` [RFC net-next (v2) 13/14] be2net: " Yuval Mintz
2012-06-25 11:45 ` [RFC net-next (v2) 14/14] ixgbevf: " Yuval Mintz
2012-06-25 15:45 ` Alexander Duyck
2012-06-25 15:53 ` Eilon Greenstein
2012-06-25 16:33 ` Alexander Duyck
2012-06-25 18:28 ` Eilon Greenstein
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=4FE9983C.2060006@broadcom.com \
--to=yuvalmin@broadcom.com \
--cc=alexander.h.duyck@intel.com \
--cc=davem@davemloft.net \
--cc=eilong@broadcom.com \
--cc=jeffrey.t.kirsher@intel.com \
--cc=john.r.fastabend@intel.com \
--cc=netdev@vger.kernel.org \
/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.