linux-stable/drivers/net/ethernet
Inbar Karmy ec327f7a43 net/mlx4_en: Do not allocate redundant TX queues when TC is disabled
Currently the number of TX queues that are allocated doesn't depend
on the number of TCs, the module always loads with max num of UP
per channel.
In order to prevent the allocation of unnecessary memory, the
module will load with minimum number of UPs per channel, and the
user will be able to control the number of TX queues per channel
by changing the number of TC to 8 using the tc command.
The variable num_up will hold the information about the current
number of UPs.
Due to the change, needed to remove the lines that set the value of
UP to be different than zero in the func "mlx4_en_select_queue",
since now the num of TX queues that are allocated is only one per channel
in default.
In order not to force the UP to be zero in case of only one TC, added
a condition before forcing it in the func "mlx4_en_fill_qp_context".

Tested:
After the module is loaded with minimum number of UP per channel, to
increase num of TCs to 8, use:
tc qdisc add dev ens8 root mqprio num_tc 8
In order to decrease the number of TCs to minimum number of UP per channel,
use:
tc qdisc del dev ens8 root

Signed-off-by: Inbar Karmy <inbark@mellanox.com>
Signed-off-by: Tariq Toukan <tariqt@mellanox.com>
Cc: Tarick Bedeir <tarick@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2017-06-29 15:56:15 -04:00
..
3com networking: introduce and use skb_put_data() 2017-06-16 11:48:37 -04:00
8390
adaptec
adi
aeroflex networking: introduce and use skb_put_data() 2017-06-16 11:48:37 -04:00
agere networking: introduce and use skb_put_data() 2017-06-16 11:48:37 -04:00
alacritech
allwinner networking: make skb_put & friends return void pointers 2017-06-16 11:48:39 -04:00
alteon
altera
amazon net: ena: update ena driver to version 1.2.0 2017-06-23 14:15:11 -04:00
amd amd-xgbe: fix spelling mistake: "avialable" -> "available" 2017-06-29 15:35:50 -04:00
apm net: phy: Make phy_ethtool_ksettings_get return void 2017-06-13 12:59:06 -04:00
apple networking: introduce and use skb_put_data() 2017-06-16 11:48:37 -04:00
aquantia Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2017-06-15 11:59:32 -04:00
arc
atheros net: atl1c: fix spelling mistake: "droppted" -> "dropped" 2017-06-29 12:24:26 -04:00
aurora networking: introduce and use skb_put_data() 2017-06-16 11:48:37 -04:00
broadcom net: bcmgenet: Remove special handling of "internal" phy-mode 2017-06-23 15:06:43 -04:00
brocade
cadence net: macb: add fixed-link node support 2017-06-25 15:21:43 -04:00
calxeda
cavium cavium: thunder: Remove duplicate "netdev->name" logging output 2017-06-29 12:25:33 -04:00
chelsio cxgb4: Use Firmware params to get buffer-group map 2017-06-23 14:22:39 -04:00
cirrus networking: introduce and use skb_put_data() 2017-06-16 11:48:37 -04:00
cisco enic: Fix format truncation warning 2017-06-20 15:24:53 -04:00
davicom networking: make skb_put & friends return void pointers 2017-06-16 11:48:39 -04:00
dec networking: introduce and use skb_put_data() 2017-06-16 11:48:37 -04:00
dlink
emulex
ezchip
faraday net/{mii, smsc}: Make mii_ethtool_get_link_ksettings and smc_netdev_get_ecmd return void 2017-06-05 11:00:42 -04:00
freescale net: freescale: gianfar : constify dev_pm_ops structures. 2017-06-29 15:48:51 -04:00
fujitsu
hisilicon Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2017-06-21 17:35:22 -04:00
hp networking: make skb_put & friends return void pointers 2017-06-16 11:48:39 -04:00
i825xx networking: introduce and use skb_put_data() 2017-06-16 11:48:37 -04:00
ibm net: ibm: ibmveth: constify dev_pm_ops structures. 2017-06-29 15:48:49 -04:00
intel i40e: don't hold RTNL lock for the entire reset 2017-06-20 18:17:12 -07:00
marvell net: mvpp2: remove mvpp2_pool_refill() 2017-06-22 13:42:56 -04:00
mediatek net-next: mediatek: set the rx_queue to 0 2017-06-20 13:40:35 -04:00
mellanox net/mlx4_en: Do not allocate redundant TX queues when TC is disabled 2017-06-29 15:56:15 -04:00
micrel networking: make skb_put & friends return void pointers 2017-06-16 11:48:39 -04:00
microchip
moxa
myricom
natsemi
neterion net: s2io: remove useless variable in fill_rx_buffers 2017-06-15 14:15:13 -04:00
netronome nfp: flower: add Kconfig for flower app 2017-06-27 15:48:50 -04:00
nuvoton net/{mii, smsc}: Make mii_ethtool_get_link_ksettings and smc_netdev_get_ecmd return void 2017-06-05 11:00:42 -04:00
nvidia
nxp net: manual clean code which call skb_put_[data:zero] 2017-06-20 13:30:15 -04:00
oki-semi net/{mii, smsc}: Make mii_ethtool_get_link_ksettings and smc_netdev_get_ecmd return void 2017-06-05 11:00:42 -04:00
packetengines net: manual clean code which call skb_put_[data:zero] 2017-06-20 13:30:15 -04:00
pasemi
qlogic qed*: Rename qed_roce_if.h to qed_rdma_if.h 2017-06-21 15:32:59 -04:00
qualcomm net: qcom/emac: add support for emulation systems 2017-06-25 11:44:29 -04:00
rdc
realtek net/{mii, smsc}: Make mii_ethtool_get_link_ksettings and smc_netdev_get_ecmd return void 2017-06-05 11:00:42 -04:00
renesas net: phy: Make phy_ethtool_ksettings_get return void 2017-06-13 12:59:06 -04:00
rocker rocker: Remove support bridge bypass FDB 2017-06-08 14:16:30 -04:00
samsung
seeq
sfc Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2017-06-21 17:35:22 -04:00
sgi net/{mii, smsc}: Make mii_ethtool_get_link_ksettings and smc_netdev_get_ecmd return void 2017-06-05 11:00:42 -04:00
silan networking: introduce and use skb_put_data() 2017-06-16 11:48:37 -04:00
sis net/{mii, smsc}: Make mii_ethtool_get_link_ksettings and smc_netdev_get_ecmd return void 2017-06-05 11:00:42 -04:00
smsc net: smc91x: constify dev_pm_ops structures. 2017-06-29 15:48:50 -04:00
stmicro net: stmmac: Add additional registers for dwmac1000_dma ethtool 2017-06-29 12:49:54 -04:00
sun networking: make skb_push & __skb_push return void pointers 2017-06-16 11:48:40 -04:00
synopsys
tehuti
ti net: ethernet: ti: netcp_ethss: use cpts to check if packet needs timestamping 2017-06-29 12:28:57 -04:00
tile
toshiba networking: make skb_push & __skb_push return void pointers 2017-06-16 11:48:40 -04:00
tundra net/{mii, smsc}: Make mii_ethtool_get_link_ksettings and smc_netdev_get_ecmd return void 2017-06-05 11:00:42 -04:00
via net/{mii, smsc}: Make mii_ethtool_get_link_ksettings and smc_netdev_get_ecmd return void 2017-06-05 11:00:42 -04:00
wiznet
xilinx
xircom
xscale
dnet.c networking: make skb_put & friends return void pointers 2017-06-16 11:48:39 -04:00
dnet.h
ec_bhf.c networking: introduce and use skb_put_data() 2017-06-16 11:48:37 -04:00
ethoc.c net: ethoc: enable NAPI before poll may be scheduled 2017-06-06 16:22:51 -04:00
fealnx.c networking: introduce and use skb_put_data() 2017-06-16 11:48:37 -04:00
jme.c net/{mii, smsc}: Make mii_ethtool_get_link_ksettings and smc_netdev_get_ecmd return void 2017-06-05 11:00:42 -04:00
jme.h
Kconfig
korina.c net/{mii, smsc}: Make mii_ethtool_get_link_ksettings and smc_netdev_get_ecmd return void 2017-06-05 11:00:42 -04:00
lantiq_etop.c
Makefile
netx-eth.c