Skip to content

default maximal number of RSS queues in mq drivers

Yuval Mintz netdev 1 version Applied

Status from this message: Applied to net-next, thanks a lot.

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest11 patches 3 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/11net-next: Add netif_get_num_default_rss_queuesinclude/linux/netdevice.h net/core/dev.c+14 -00 replies
2/11mlx4: set maximal number of default RSS queuesdrivers/net/ethernet/mellanox/mlx4/main.c+3 -20 replies
3/11vxge: set maximal number of default RSS queuesdrivers/net/ethernet/neterion/vxge/vxge-main.c+2 -10 replies
4/11qlge: set maximal number of default RSS queuesdrivers/net/ethernet/qlogic/qlge/qlge_main.c+1 -10 replies
5/11cxgb3: set maximal number of default RSS queuesdrivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c+1 -10 replies
6/11cxgb4: set maximal number of default RSS queuesdrivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c+2 -20 replies
7/11myri10ge: set maximal number of default RSS queuesdrivers/net/ethernet/myricom/myri10ge/myri10ge.c+1 -10 replies
8/11tg3: set maximal number of default RSS queuesdrivers/net/ethernet/broadcom/tg3.c+1 -10 replies
9/11bnx2: set maximal number of default RSS queuesdrivers/net/ethernet/broadcom/bnx2.c+1 -10 replies
10/11bnx2x: set maximal number of default RSS queuesdrivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h+2 -10 replies
11/11be2net: set maximal number of default RSS queuesdrivers/net/ethernet/emulex/benet/be_main.c+6 -40 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH net-next 00/11] default maximal number of RSS queues in mq drivers

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 <[email protected]>
Cc Or Gerlitz <[email protected]>
Cc Jon Mason <[email protected]>
Cc Anirban Chakraborty <[email protected]>
Cc Jitendra Kalsaria <[email protected]>
Cc Ron Mercer <[email protected]>
Cc Jeff Kirsher <[email protected]>
Cc Jon Mason <[email protected]>
Cc Andrew Gallatin <[email protected]>
Cc Sathya Perla <[email protected]>
Cc Subbu Seetharaman <[email protected]>
Cc Ajit Khaparde <[email protected]>
Cc Matt Carlson <[email protected]>
Cc Michael Chan <[email protected]>
Cc Eric Dumazet <[email protected]>
Cc Ben Hutchings <[email protected]>