This is a note to let you know that I've just added the patch titled

    net/mlx4_core: Set number of msix vectors under SRIOV mode to firmware 
defaults

to the 3.4-stable tree which can be found at:
    
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     
net-mlx4_core-set-number-of-msix-vectors-under-sriov-mode-to-firmware-defaults.patch
and it can be found in the queue-3.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.


>From 49c8f8f71dc9d141ed847e5a25caa745d91dc928 Mon Sep 17 00:00:00 2001
From: Or Gerlitz <[email protected]>
Date: Thu, 17 Jan 2013 05:30:43 +0000
Subject: net/mlx4_core: Set number of msix vectors under SRIOV mode to firmware 
defaults


From: Or Gerlitz <[email protected]>

[ Upstream commit ca4c7b35f75492de7fbf5ee95be07481c348caee ]

The lines

        if (mlx4_is_mfunc(dev)) {
                nreq = 2;
        } else {

which hard code the number of requested msi-x vectors under multi-function
mode to two can be removed completely, since the firmware sets num_eqs and
reserved_eqs appropriately Thus, the code line:

        nreq = min_t(int, dev->caps.num_eqs - dev->caps.reserved_eqs, nreq);

is by itself sufficient and correct for all cases. Currently, for mfunc
mode num_eqs = 32 and reserved_eqs = 28, hence four vectors will be enabled.

This triples (one vector is used for the async events and commands EQ) the
horse power provided for processing of incoming packets on netdev RSS scheme,
IO initiators/targets commands processing flows, etc.

Reviewed-by: Jack Morgenstein <[email protected]>
Signed-off-by: Amir Vadai <[email protected]>
Signed-off-by: Or Gerlitz <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
 drivers/net/ethernet/mellanox/mlx4/main.c |   11 ++---------
 1 file changed, 2 insertions(+), 9 deletions(-)

--- a/drivers/net/ethernet/mellanox/mlx4/main.c
+++ b/drivers/net/ethernet/mellanox/mlx4/main.c
@@ -1526,15 +1526,8 @@ static void mlx4_enable_msi_x(struct mlx
        int i;
 
        if (msi_x) {
-               /* In multifunction mode each function gets 2 msi-X vectors
-                * one for data path completions anf the other for asynch events
-                * or command completions */
-               if (mlx4_is_mfunc(dev)) {
-                       nreq = 2;
-               } else {
-                       nreq = min_t(int, dev->caps.num_eqs -
-                                    dev->caps.reserved_eqs, nreq);
-               }
+               nreq = min_t(int, dev->caps.num_eqs - dev->caps.reserved_eqs,
+                            nreq);
 
                entries = kcalloc(nreq, sizeof *entries, GFP_KERNEL);
                if (!entries)


Patches currently in stable-queue which might be from [email protected] are

queue-3.4/net-mlx4_core-set-number-of-msix-vectors-under-sriov-mode-to-firmware-defaults.patch
queue-3.4/net-mlx4_en-fix-bridged-vswitch-configuration-for-non-sriov-mode.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to