* [PATCH net-next 00/11] default maximal number of RSS queues in mq drivers
@ 2012-07-01 13:18 Yuval Mintz
2012-07-01 13:18 ` [PATCH net-next 01/11] net-next: Add netif_get_num_default_rss_queues Yuval Mintz
` (12 more replies)
0 siblings, 13 replies; 15+ messages in thread
From: Yuval Mintz @ 2012-07-01 13:18 UTC (permalink / raw)
To: davem, netdev
Cc: eilong, Yuval Mintz, Divy Le Ray, Or Gerlitz, Jon Mason,
Anirban Chakraborty, Jitendra Kalsaria, Ron Mercer, Jeff Kirsher,
Jon Mason, Andrew Gallatin, Sathya Perla, Subbu Seetharaman,
Ajit Khaparde, Matt Carlson, Michael Chan, Eric Dumazet,
Ben Hutchings
Different vendors support different number of RSS queues by default. Today,
there exists an ethtool API through which users can change the number of
channels their driver supports; This enables us to pursue the goal of using
a default number of RSS queues in various multi-queue drivers.
This patch intendeds to achieve the above default, by upper-limiting the number
of interrupts multi-queue drivers request (by default, not via the new API)
with correlation to the number of cpus on the machine.
After examining multi-queue drivers that call alloc_etherdev_mq[s],
it became evident that most drivers allocate their devices using hard-coded
values. Changing those defaults directly will most likely cause a regression.
However, (most) multi-queue driver look at the number of online cpus when
requesting for interrupts. We assume that the number of interrupts the
driver manages to request is propagated across the driver, and the number
of RSS queues it configures is based upon it.
This patch modifies said logic - if the number of cpus is large enough, use
a smaller default value instead. This serves 2 main purposes:
1. A step forward unity in the number of RSS queues of various drivers.
2. It prevents wasteful requests for memory on machines with many cpus.
Notice no testing was made on this patch (other than on the bnx2x driver)
except for compilation test. This patch is based on RFC:
http://marc.info/?l=linux-netdev&m=134062509310404&w=2
Drivers identified as multi-queue, handled in this patch:
* mellanox mlx4
* neterion vxge
* qlogic qlge
* chelsio cxgb3, cxgb4
* myricom myri10ge
* emulex benet
* broadcom tg3, bnx2, bnx2x
The guys at Intel requested to change their drivers' behaviour on their own,
in order to support ethtool's [g|s]et_channels. Thus, igb, igbx2, and igbxevf
were not handled in this patch.
Driver identified as multi-queue, no reference to number of online cpus found,
and thus unhandled in this patch:
* neterion s2io
* marvell mv643xx
* freescale gianfar
* ibm ehea
* ti cpmac
* sun niu
* sfc efx
* chelsio cxgb4vf
Cheers,
Yuval Mintz
Cc: Divy Le Ray <divy@chelsio.com>
Cc: Or Gerlitz <ogerlitz@mellanox.com>
Cc: Jon Mason <jdmason@kudzu.us>
Cc: Anirban Chakraborty <anirban.chakraborty@qlogic.com>
Cc: Jitendra Kalsaria <jitendra.kalsaria@qlogic.com>
Cc: Ron Mercer <ron.mercer@qlogic.com>
Cc: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Cc: Jon Mason <mason@myri.com>
Cc: Andrew Gallatin <gallatin@myri.com>
Cc: Sathya Perla <sathya.perla@emulex.com>
Cc: Subbu Seetharaman <subbu.seetharaman@emulex.com>
Cc: Ajit Khaparde <ajit.khaparde@emulex.com>
Cc: Matt Carlson <mcarlson@broadcom.com>
Cc: Michael Chan <mchan@broadcom.com>
Cc: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Ben Hutchings <bhutchings@solarflare.com>
^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH net-next 01/11] net-next: Add netif_get_num_default_rss_queues
2012-07-01 13:18 [PATCH net-next 00/11] default maximal number of RSS queues in mq drivers Yuval Mintz
@ 2012-07-01 13:18 ` Yuval Mintz
2012-07-01 13:18 ` [PATCH net-next 02/11] mlx4: set maximal number of default RSS queues Yuval Mintz
` (11 subsequent siblings)
12 siblings, 0 replies; 15+ messages in thread
From: Yuval Mintz @ 2012-07-01 13:18 UTC (permalink / raw)
To: davem, netdev; +Cc: eilong, Yuval Mintz
Most multi-queue networking driver consider the number of online cpus when
configuring RSS queues.
This patch adds a wrapper to the number of cpus, setting an upper limit on the
number of cpus a driver should consider (by default) when allocating resources
for his queues.
Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
---
include/linux/netdevice.h | 3 +++
net/core/dev.c | 11 +++++++++++
2 files changed, 14 insertions(+), 0 deletions(-)
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 2c2ecea..ab0251d 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -2119,6 +2119,9 @@ static inline int netif_copy_real_num_queues(struct net_device *to_dev,
#endif
}
+#define DEFAULT_MAX_NUM_RSS_QUEUES (8)
+extern int netif_get_num_default_rss_queues(void);
+
/* Use this variant when it is known for sure that it
* is executing from hardware interrupt context or with hardware interrupts
* disabled.
diff --git a/net/core/dev.c b/net/core/dev.c
index ed674e2..69f7a1a 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -1793,6 +1793,17 @@ int netif_set_real_num_rx_queues(struct net_device *dev, unsigned int rxq)
EXPORT_SYMBOL(netif_set_real_num_rx_queues);
#endif
+/* netif_get_num_default_rss_queues - default number of RSS queues
+ *
+ * This routine should set an upper limit on the number of RSS queues
+ * used by default by multiqueue devices.
+ */
+int netif_get_num_default_rss_queues()
+{
+ return min_t(int, DEFAULT_MAX_NUM_RSS_QUEUES, num_online_cpus());
+}
+EXPORT_SYMBOL(netif_get_num_default_rss_queues);
+
static inline void __netif_reschedule(struct Qdisc *q)
{
struct softnet_data *sd;
--
1.7.9.rc2
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH net-next 02/11] mlx4: set maximal number of default RSS queues
2012-07-01 13:18 [PATCH net-next 00/11] default maximal number of RSS queues in mq drivers Yuval Mintz
2012-07-01 13:18 ` [PATCH net-next 01/11] net-next: Add netif_get_num_default_rss_queues Yuval Mintz
@ 2012-07-01 13:18 ` Yuval Mintz
2012-07-01 13:18 ` [PATCH net-next 03/11] vxge: " Yuval Mintz
` (10 subsequent siblings)
12 siblings, 0 replies; 15+ messages in thread
From: Yuval Mintz @ 2012-07-01 13:18 UTC (permalink / raw)
To: davem, netdev; +Cc: eilong, Yuval Mintz, Or Gerlitz
Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Cc: Or Gerlitz <ogerlitz@mellanox.com>
---
drivers/net/ethernet/mellanox/mlx4/main.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/mellanox/mlx4/main.c b/drivers/net/ethernet/mellanox/mlx4/main.c
index a0313de..14d9c76 100644
--- a/drivers/net/ethernet/mellanox/mlx4/main.c
+++ b/drivers/net/ethernet/mellanox/mlx4/main.c
@@ -41,6 +41,7 @@
#include <linux/slab.h>
#include <linux/io-mapping.h>
#include <linux/delay.h>
+#include <linux/netdevice.h>
#include <linux/mlx4/device.h>
#include <linux/mlx4/doorbell.h>
@@ -1539,8 +1540,8 @@ static void mlx4_enable_msi_x(struct mlx4_dev *dev)
struct mlx4_priv *priv = mlx4_priv(dev);
struct msix_entry *entries;
int nreq = min_t(int, dev->caps.num_ports *
- min_t(int, num_online_cpus() + 1, MAX_MSIX_P_PORT)
- + MSIX_LEGACY_SZ, MAX_MSIX);
+ min_t(int, netif_get_num_default_rss_queues() + 1,
+ MAX_MSIX_P_PORT) + MSIX_LEGACY_SZ, MAX_MSIX);
int err;
int i;
--
1.7.9.rc2
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH net-next 03/11] vxge: set maximal number of default RSS queues
2012-07-01 13:18 [PATCH net-next 00/11] default maximal number of RSS queues in mq drivers Yuval Mintz
2012-07-01 13:18 ` [PATCH net-next 01/11] net-next: Add netif_get_num_default_rss_queues Yuval Mintz
2012-07-01 13:18 ` [PATCH net-next 02/11] mlx4: set maximal number of default RSS queues Yuval Mintz
@ 2012-07-01 13:18 ` Yuval Mintz
2012-07-01 13:18 ` [PATCH net-next 04/11] qlge: " Yuval Mintz
` (9 subsequent siblings)
12 siblings, 0 replies; 15+ messages in thread
From: Yuval Mintz @ 2012-07-01 13:18 UTC (permalink / raw)
To: davem, netdev; +Cc: eilong, Yuval Mintz, Jon Mason
Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Cc: Jon Mason <jdmason@kudzu.us>
---
drivers/net/ethernet/neterion/vxge/vxge-main.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/drivers/net/ethernet/neterion/vxge/vxge-main.c b/drivers/net/ethernet/neterion/vxge/vxge-main.c
index 2578eb1..2fd1edb 100644
--- a/drivers/net/ethernet/neterion/vxge/vxge-main.c
+++ b/drivers/net/ethernet/neterion/vxge/vxge-main.c
@@ -3687,7 +3687,8 @@ static int __devinit vxge_config_vpaths(
return 0;
if (!driver_config->g_no_cpus)
- driver_config->g_no_cpus = num_online_cpus();
+ driver_config->g_no_cpus =
+ netif_get_num_default_rss_queues();
driver_config->vpath_per_dev = driver_config->g_no_cpus >> 1;
if (!driver_config->vpath_per_dev)
--
1.7.9.rc2
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH net-next 04/11] qlge: set maximal number of default RSS queues
2012-07-01 13:18 [PATCH net-next 00/11] default maximal number of RSS queues in mq drivers Yuval Mintz
` (2 preceding siblings ...)
2012-07-01 13:18 ` [PATCH net-next 03/11] vxge: " Yuval Mintz
@ 2012-07-01 13:18 ` Yuval Mintz
2012-07-01 13:18 ` [PATCH net-next 05/11] cxgb3: " Yuval Mintz
` (8 subsequent siblings)
12 siblings, 0 replies; 15+ messages in thread
From: Yuval Mintz @ 2012-07-01 13:18 UTC (permalink / raw)
To: davem, netdev
Cc: eilong, Yuval Mintz, Anirban Chakraborty, Jitendra Kalsaria,
Ron Mercer
Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Cc: Anirban Chakraborty <anirban.chakraborty@qlogic.com>
Cc: Jitendra Kalsaria <jitendra.kalsaria@qlogic.com>
Cc: Ron Mercer <ron.mercer@qlogic.com>
---
drivers/net/ethernet/qlogic/qlge/qlge_main.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/net/ethernet/qlogic/qlge/qlge_main.c b/drivers/net/ethernet/qlogic/qlge/qlge_main.c
index 09d8d33..3c3499d 100644
--- a/drivers/net/ethernet/qlogic/qlge/qlge_main.c
+++ b/drivers/net/ethernet/qlogic/qlge/qlge_main.c
@@ -4649,7 +4649,7 @@ static int __devinit qlge_probe(struct pci_dev *pdev,
int err = 0;
ndev = alloc_etherdev_mq(sizeof(struct ql_adapter),
- min(MAX_CPUS, (int)num_online_cpus()));
+ min(MAX_CPUS, netif_get_num_default_rss_queues()));
if (!ndev)
return -ENOMEM;
--
1.7.9.rc2
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH net-next 05/11] cxgb3: set maximal number of default RSS queues
2012-07-01 13:18 [PATCH net-next 00/11] default maximal number of RSS queues in mq drivers Yuval Mintz
` (3 preceding siblings ...)
2012-07-01 13:18 ` [PATCH net-next 04/11] qlge: " Yuval Mintz
@ 2012-07-01 13:18 ` Yuval Mintz
2012-07-01 13:18 ` [PATCH net-next 06/11] cxgb4: " Yuval Mintz
` (7 subsequent siblings)
12 siblings, 0 replies; 15+ messages in thread
From: Yuval Mintz @ 2012-07-01 13:18 UTC (permalink / raw)
To: davem, netdev; +Cc: eilong, Yuval Mintz, Divy Le Ray
Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Cc: Divy Le Ray <divy@chelsio.com>
---
drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c b/drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c
index abb6ce7..9b08749 100644
--- a/drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c
+++ b/drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c
@@ -3050,7 +3050,7 @@ static struct pci_error_handlers t3_err_handler = {
static void set_nqsets(struct adapter *adap)
{
int i, j = 0;
- int num_cpus = num_online_cpus();
+ int num_cpus = netif_get_num_default_rss_queues();
int hwports = adap->params.nports;
int nqsets = adap->msix_nvectors - 1;
--
1.7.9.rc2
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH net-next 06/11] cxgb4: set maximal number of default RSS queues
2012-07-01 13:18 [PATCH net-next 00/11] default maximal number of RSS queues in mq drivers Yuval Mintz
` (4 preceding siblings ...)
2012-07-01 13:18 ` [PATCH net-next 05/11] cxgb3: " Yuval Mintz
@ 2012-07-01 13:18 ` Yuval Mintz
2012-07-01 13:18 ` [PATCH net-next 07/11] myri10ge: " Yuval Mintz
` (6 subsequent siblings)
12 siblings, 0 replies; 15+ messages in thread
From: Yuval Mintz @ 2012-07-01 13:18 UTC (permalink / raw)
To: davem, netdev; +Cc: eilong, Yuval Mintz, Divy Le Ray
Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Cc: Divy Le Ray <divy@chelsio.com>
---
drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
index e1f96fb..5ed49af 100644
--- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
+++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
@@ -3493,8 +3493,8 @@ static void __devinit cfg_queues(struct adapter *adap)
*/
if (n10g)
q10g = (MAX_ETH_QSETS - (adap->params.nports - n10g)) / n10g;
- if (q10g > num_online_cpus())
- q10g = num_online_cpus();
+ if (q10g > netif_get_num_default_rss_queues())
+ q10g = netif_get_num_default_rss_queues();
for_each_port(adap, i) {
struct port_info *pi = adap2pinfo(adap, i);
--
1.7.9.rc2
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH net-next 07/11] myri10ge: set maximal number of default RSS queues
2012-07-01 13:18 [PATCH net-next 00/11] default maximal number of RSS queues in mq drivers Yuval Mintz
` (5 preceding siblings ...)
2012-07-01 13:18 ` [PATCH net-next 06/11] cxgb4: " Yuval Mintz
@ 2012-07-01 13:18 ` Yuval Mintz
2012-07-01 13:18 ` [PATCH net-next 08/11] tg3: " Yuval Mintz
` (5 subsequent siblings)
12 siblings, 0 replies; 15+ messages in thread
From: Yuval Mintz @ 2012-07-01 13:18 UTC (permalink / raw)
To: davem, netdev; +Cc: eilong, Yuval Mintz, Jon Mason
Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Cc: Jon Mason <mason@myri.com>
---
drivers/net/ethernet/myricom/myri10ge/myri10ge.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/net/ethernet/myricom/myri10ge/myri10ge.c b/drivers/net/ethernet/myricom/myri10ge/myri10ge.c
index 90153fc..fa85cf1 100644
--- a/drivers/net/ethernet/myricom/myri10ge/myri10ge.c
+++ b/drivers/net/ethernet/myricom/myri10ge/myri10ge.c
@@ -3775,7 +3775,7 @@ static void myri10ge_probe_slices(struct myri10ge_priv *mgp)
mgp->num_slices = 1;
msix_cap = pci_find_capability(pdev, PCI_CAP_ID_MSIX);
- ncpus = num_online_cpus();
+ ncpus = netif_get_num_default_rss_queues();
if (myri10ge_max_slices == 1 || msix_cap == 0 ||
(myri10ge_max_slices == -1 && ncpus < 2))
--
1.7.9.rc2
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH net-next 08/11] tg3: set maximal number of default RSS queues
2012-07-01 13:18 [PATCH net-next 00/11] default maximal number of RSS queues in mq drivers Yuval Mintz
` (6 preceding siblings ...)
2012-07-01 13:18 ` [PATCH net-next 07/11] myri10ge: " Yuval Mintz
@ 2012-07-01 13:18 ` Yuval Mintz
2012-07-01 13:18 ` [PATCH net-next 09/11] bnx2: " Yuval Mintz
` (4 subsequent siblings)
12 siblings, 0 replies; 15+ messages in thread
From: Yuval Mintz @ 2012-07-01 13:18 UTC (permalink / raw)
To: davem, netdev; +Cc: eilong, Yuval Mintz, Matt Carlson
Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Cc: Matt Carlson <mcarlson@broadcom.com>
---
drivers/net/ethernet/broadcom/tg3.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/net/ethernet/broadcom/tg3.c b/drivers/net/ethernet/broadcom/tg3.c
index e47ff8b..6cbab03 100644
--- a/drivers/net/ethernet/broadcom/tg3.c
+++ b/drivers/net/ethernet/broadcom/tg3.c
@@ -9908,7 +9908,7 @@ static bool tg3_enable_msix(struct tg3 *tp)
int i, rc;
struct msix_entry msix_ent[tp->irq_max];
- tp->irq_cnt = num_online_cpus();
+ tp->irq_cnt = netif_get_num_default_rss_queues();
if (tp->irq_cnt > 1) {
/* We want as many rx rings enabled as there are cpus.
* In multiqueue MSI-X mode, the first MSI-X vector
--
1.7.9.rc2
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH net-next 09/11] bnx2: set maximal number of default RSS queues
2012-07-01 13:18 [PATCH net-next 00/11] default maximal number of RSS queues in mq drivers Yuval Mintz
` (7 preceding siblings ...)
2012-07-01 13:18 ` [PATCH net-next 08/11] tg3: " Yuval Mintz
@ 2012-07-01 13:18 ` Yuval Mintz
2012-07-01 13:18 ` [PATCH net-next 10/11] bnx2x: " Yuval Mintz
` (3 subsequent siblings)
12 siblings, 0 replies; 15+ messages in thread
From: Yuval Mintz @ 2012-07-01 13:18 UTC (permalink / raw)
To: davem, netdev; +Cc: eilong, Yuval Mintz, Michael Chan
Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Cc: Michael Chan <mchan@broadcom.com>
---
drivers/net/ethernet/broadcom/bnx2.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/net/ethernet/broadcom/bnx2.c b/drivers/net/ethernet/broadcom/bnx2.c
index 9eb7624..1901da1 100644
--- a/drivers/net/ethernet/broadcom/bnx2.c
+++ b/drivers/net/ethernet/broadcom/bnx2.c
@@ -6250,7 +6250,7 @@ bnx2_enable_msix(struct bnx2 *bp, int msix_vecs)
static int
bnx2_setup_int_mode(struct bnx2 *bp, int dis_msi)
{
- int cpus = num_online_cpus();
+ int cpus = netif_get_num_default_rss_queues();
int msix_vecs;
if (!bp->num_req_rx_rings)
--
1.7.9.rc2
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH net-next 10/11] bnx2x: set maximal number of default RSS queues
2012-07-01 13:18 [PATCH net-next 00/11] default maximal number of RSS queues in mq drivers Yuval Mintz
` (8 preceding siblings ...)
2012-07-01 13:18 ` [PATCH net-next 09/11] bnx2: " Yuval Mintz
@ 2012-07-01 13:18 ` Yuval Mintz
2012-07-01 13:19 ` [PATCH net-next 11/11] be2net: " Yuval Mintz
` (2 subsequent siblings)
12 siblings, 0 replies; 15+ messages in thread
From: Yuval Mintz @ 2012-07-01 13:18 UTC (permalink / raw)
To: davem, netdev; +Cc: eilong, Yuval Mintz
Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
---
drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h
index daa894b..53659f3 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h
@@ -822,7 +822,8 @@ static inline int bnx2x_calc_num_queues(struct bnx2x *bp)
{
return num_queues ?
min_t(int, num_queues, BNX2X_MAX_QUEUES(bp)) :
- min_t(int, num_online_cpus(), BNX2X_MAX_QUEUES(bp));
+ min_t(int, netif_get_num_default_rss_queues(),
+ BNX2X_MAX_QUEUES(bp));
}
static inline void bnx2x_clear_sge_mask_next_elems(struct bnx2x_fastpath *fp)
--
1.7.9.rc2
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH net-next 11/11] be2net: set maximal number of default RSS queues
2012-07-01 13:18 [PATCH net-next 00/11] default maximal number of RSS queues in mq drivers Yuval Mintz
` (9 preceding siblings ...)
2012-07-01 13:18 ` [PATCH net-next 10/11] bnx2x: " Yuval Mintz
@ 2012-07-01 13:19 ` Yuval Mintz
2012-07-01 15:01 ` [PATCH net-next 00/11] default maximal number of RSS queues in mq drivers Or Gerlitz
2012-07-05 10:07 ` David Miller
12 siblings, 0 replies; 15+ messages in thread
From: Yuval Mintz @ 2012-07-01 13:19 UTC (permalink / raw)
To: davem, netdev
Cc: eilong, Yuval Mintz, Sathya Perla, Subbu Seetharaman,
Ajit Khaparde
Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Cc: Sathya Perla <sathya.perla@emulex.com>
Cc: Subbu Seetharaman <subbu.seetharaman@emulex.com>
Cc: Ajit Khaparde <ajit.khaparde@emulex.com>
---
drivers/net/ethernet/emulex/benet/be_main.c | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/drivers/net/ethernet/emulex/benet/be_main.c b/drivers/net/ethernet/emulex/benet/be_main.c
index edce7af..2141bd7 100644
--- a/drivers/net/ethernet/emulex/benet/be_main.c
+++ b/drivers/net/ethernet/emulex/benet/be_main.c
@@ -2172,12 +2172,14 @@ static void be_msix_disable(struct be_adapter *adapter)
static uint be_num_rss_want(struct be_adapter *adapter)
{
+ u32 num = 0;
if ((adapter->function_caps & BE_FUNCTION_CAPS_RSS) &&
!sriov_want(adapter) && be_physfn(adapter) &&
- !be_is_mc(adapter))
- return (adapter->be3_native) ? BE3_MAX_RSS_QS : BE2_MAX_RSS_QS;
- else
- return 0;
+ !be_is_mc(adapter)) {
+ num = (adapter->be3_native) ? BE3_MAX_RSS_QS : BE2_MAX_RSS_QS;
+ num = min_t(u32, num, (u32)netif_get_num_default_rss_queues());
+ }
+ return num;
}
static void be_msix_enable(struct be_adapter *adapter)
--
1.7.9.rc2
^ permalink raw reply related [flat|nested] 15+ messages in thread
* Re: [PATCH net-next 00/11] default maximal number of RSS queues in mq drivers
2012-07-01 13:18 [PATCH net-next 00/11] default maximal number of RSS queues in mq drivers Yuval Mintz
` (10 preceding siblings ...)
2012-07-01 13:19 ` [PATCH net-next 11/11] be2net: " Yuval Mintz
@ 2012-07-01 15:01 ` Or Gerlitz
2012-07-02 4:55 ` Yuval Mintz
2012-07-05 10:07 ` David Miller
12 siblings, 1 reply; 15+ messages in thread
From: Or Gerlitz @ 2012-07-01 15:01 UTC (permalink / raw)
To: Yuval Mintz
Cc: davem, netdev, eilong, Divy Le Ray, Jon Mason,
Anirban Chakraborty, Jitendra Kalsaria, Ron Mercer, Jeff Kirsher,
Jon Mason, Andrew Gallatin, Sathya Perla, Subbu Seetharaman,
Ajit Khaparde, Matt Carlson, Michael Chan, Eric Dumazet,
Ben Hutchings
On 7/1/2012 4:18 PM, Yuval Mintz wrote:
> Different vendors support different number of RSS queues by default. Today,
> there exists an ethtool API through which users can change the number of
> channels their driver supports; This enables us to pursue the goal of using
> a default number of RSS queues in various multi-queue drivers.
Yuval,
I assume this posting is actually v3 of "[RFC net-next (v2) 00/14]
default maximal number of RSS queues in mq drivers" see
http://marc.info/?l=linux-netdev&m=134062509310404&w=2?
correct? so what has been changed along v0/v1/v2 --> v3? It would be
very helpful to follow
if you make sure to mark the patches that makes Vn with "PATCH net-next
Vn" and specify the changes
from Vn-1, Vn-2...V1, V0.
Or.
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH net-next 00/11] default maximal number of RSS queues in mq drivers
2012-07-01 15:01 ` [PATCH net-next 00/11] default maximal number of RSS queues in mq drivers Or Gerlitz
@ 2012-07-02 4:55 ` Yuval Mintz
0 siblings, 0 replies; 15+ messages in thread
From: Yuval Mintz @ 2012-07-02 4:55 UTC (permalink / raw)
To: Or Gerlitz
Cc: davem, netdev, eilong, Divy Le Ray, Jon Mason,
Anirban Chakraborty, Jitendra Kalsaria, Ron Mercer, Jeff Kirsher,
Jon Mason, Andrew Gallatin, Sathya Perla, Subbu Seetharaman,
Ajit Khaparde, Matt Carlson, Michael Chan, Eric Dumazet,
Ben Hutchings
> I assume this posting is actually v3 of "[RFC net-next (v2) 00/14] default maximal number of RSS queues in mq drivers" see http://marc.info/?l=linux-netdev&m=134062509310404&w=2?
>
Of course you are correct - the fact that it's based on that RFC is stated
explicitly in PATCH 0 of this series.
> correct? so what has been changed along v0/v1/v2 --> v3? It would be very helpful to follow
> if you make sure to mark the patches that makes Vn with "PATCH net-next Vn" and specify the changes
> from Vn-1, Vn-2...V1, V0.
Certainly -
Changes from RFC v2:
- Removed changes for igb, igbxe, and igxbevf drivers.
Changes from RFC v1:
- Use 'netif_get_num_default_rss_queues()' wrapper function instead
of using a hard-coded define value directly.
- Corrected be2net implementation of this fix.
Cheers,
Yuval
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH net-next 00/11] default maximal number of RSS queues in mq drivers
2012-07-01 13:18 [PATCH net-next 00/11] default maximal number of RSS queues in mq drivers Yuval Mintz
` (11 preceding siblings ...)
2012-07-01 15:01 ` [PATCH net-next 00/11] default maximal number of RSS queues in mq drivers Or Gerlitz
@ 2012-07-05 10:07 ` David Miller
12 siblings, 0 replies; 15+ messages in thread
From: David Miller @ 2012-07-05 10:07 UTC (permalink / raw)
To: yuvalmin
Cc: netdev, eilong, divy, ogerlitz, jdmason, anirban.chakraborty,
jitendra.kalsaria, ron.mercer, jeffrey.t.kirsher, mason, gallatin,
sathya.perla, subbu.seetharaman, ajit.khaparde, mcarlson, mchan,
eric.dumazet, bhutchings
From: "Yuval Mintz" <yuvalmin@broadcom.com>
Date: Sun, 1 Jul 2012 16:18:49 +0300
> Different vendors support different number of RSS queues by default. Today,
> there exists an ethtool API through which users can change the number of
> channels their driver supports; This enables us to pursue the goal of using
> a default number of RSS queues in various multi-queue drivers.
>
> This patch intendeds to achieve the above default, by upper-limiting the number
> of interrupts multi-queue drivers request (by default, not via the new API)
> with correlation to the number of cpus on the machine.
Applied to net-next, thanks a lot.
^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2012-07-05 10:07 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-01 13:18 [PATCH net-next 00/11] default maximal number of RSS queues in mq drivers Yuval Mintz
2012-07-01 13:18 ` [PATCH net-next 01/11] net-next: Add netif_get_num_default_rss_queues Yuval Mintz
2012-07-01 13:18 ` [PATCH net-next 02/11] mlx4: set maximal number of default RSS queues Yuval Mintz
2012-07-01 13:18 ` [PATCH net-next 03/11] vxge: " Yuval Mintz
2012-07-01 13:18 ` [PATCH net-next 04/11] qlge: " Yuval Mintz
2012-07-01 13:18 ` [PATCH net-next 05/11] cxgb3: " Yuval Mintz
2012-07-01 13:18 ` [PATCH net-next 06/11] cxgb4: " Yuval Mintz
2012-07-01 13:18 ` [PATCH net-next 07/11] myri10ge: " Yuval Mintz
2012-07-01 13:18 ` [PATCH net-next 08/11] tg3: " Yuval Mintz
2012-07-01 13:18 ` [PATCH net-next 09/11] bnx2: " Yuval Mintz
2012-07-01 13:18 ` [PATCH net-next 10/11] bnx2x: " Yuval Mintz
2012-07-01 13:19 ` [PATCH net-next 11/11] be2net: " Yuval Mintz
2012-07-01 15:01 ` [PATCH net-next 00/11] default maximal number of RSS queues in mq drivers Or Gerlitz
2012-07-02 4:55 ` Yuval Mintz
2012-07-05 10:07 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).