linux/drivers/net
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
..
appletalk Annotate hardware config module parameters in drivers/net/appletalk/ 2017-04-20 12:02:32 +01:00
arcnet arcnet: com20020-pci: add support for PCIFB2 card 2017-06-29 15:26:14 -04:00
bonding Bonding: Convert multiple netdev_info messages to netdev_dbg 2017-06-29 12:21:37 -04:00
caif net: add netlink_ext_ack argument to rtnl_link_ops.changelink 2017-06-26 23:13:22 -04:00
can net: add netlink_ext_ack argument to rtnl_link_ops.validate 2017-06-26 23:13:22 -04:00
cris net/{mii, smsc}: Make mii_ethtool_get_link_ksettings and smc_netdev_get_ecmd return void 2017-06-05 11:00:42 -04:00
dsa net: dsa: mv88e6xxx: fix error code in mv88e6390_serdes_power() 2017-06-25 11:42:33 -04:00
ethernet net/mlx4_en: Do not allocate redundant TX queues when TC is disabled 2017-06-29 15:56:15 -04:00
fddi format-security: move static strings to const 2017-05-08 17:15:14 -07:00
fjes networking: introduce and use skb_put_data() 2017-06-16 11:48:37 -04:00
hamradio networking: add and use skb_put_u8() 2017-06-16 11:48:40 -04:00
hippi networking: make skb_push & __skb_push return void pointers 2017-06-16 11:48:40 -04:00
hyperv hv_netvsc: Fix the carrier state error when data path is off 2017-06-22 13:30:37 -04:00
ieee802154 networking: introduce and use skb_put_data() 2017-06-16 11:48:37 -04:00
ipvlan net: add netlink_ext_ack argument to rtnl_link_ops.validate 2017-06-26 23:13:22 -04:00
irda networking: introduce and use skb_put_data() 2017-06-16 11:48:37 -04:00
phy net: phy: smsc: fix buffer overflow in memcpy 2017-06-22 11:12:31 -04:00
plip
ppp net: add netlink_ext_ack argument to rtnl_link_ops.validate 2017-06-26 23:13:22 -04:00
slip networking: introduce and use skb_put_data() 2017-06-16 11:48:37 -04:00
team net: add netlink_ext_ack argument to rtnl_link_ops.validate 2017-06-26 23:13:22 -04:00
usb r8152: correct the definition 2017-06-21 11:32:57 -04:00
vmxnet3 vmxnet3: ensure that adapter is in proper state during force_close 2017-05-12 12:23:52 -04:00
wan networking: make skb_pull & friends return void pointers 2017-06-16 11:48:39 -04:00
wimax networking: make skb_push & __skb_push return void pointers 2017-06-16 11:48:40 -04:00
wireless wireless-drivers-next patches for 4.13 2017-06-25 14:45:34 -04:00
xen-netback
Kconfig VSOCK: Add vsockmon device 2017-04-24 12:35:56 -04:00
LICENSE.SRC
Makefile VSOCK: Add vsockmon device 2017-04-24 12:35:56 -04:00
Space.c
dummy.c net: add netlink_ext_ack argument to rtnl_link_ops.validate 2017-06-26 23:13:22 -04:00
eql.c
geneve.c net: add netlink_ext_ack argument to rtnl_link_ops.validate 2017-06-26 23:13:22 -04:00
gtp.c net: add netlink_ext_ack argument to rtnl_link_ops.validate 2017-06-26 23:13:22 -04:00
ifb.c net: add netlink_ext_ack argument to rtnl_link_ops.validate 2017-06-26 23:13:22 -04:00
loopback.c net: Fix inconsistent teardown and release of private netdev state. 2017-06-07 15:53:24 -04:00
macsec.c net: add netlink_ext_ack argument to rtnl_link_ops.validate 2017-06-26 23:13:22 -04:00
macvlan.c net: add netlink_ext_ack argument to rtnl_link_ops.validate 2017-06-26 23:13:22 -04:00
macvtap.c net: add netlink_ext_ack argument to rtnl_link_ops.newlink 2017-06-26 23:13:21 -04:00
mdio.c
mii.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
netconsole.c netconsole: Remove duplicate "netconsole: " logging prefix 2017-06-13 12:57:40 -04:00
nlmon.c net: add netlink_ext_ack argument to rtnl_link_ops.validate 2017-06-26 23:13:22 -04:00
ntb_netdev.c
rionet.c
sb1000.c
sungem_phy.c drivers/net/sungem: add const to mii_phy_ops structures 2017-06-08 15:32:47 -04:00
tap.c tap: support receiving skb from msg_control 2017-05-18 10:07:41 -04:00
tun.c net: add netlink_ext_ack argument to rtnl_link_ops.validate 2017-06-26 23:13:22 -04:00
veth.c net: add netlink_ext_ack argument to rtnl_link_ops.validate 2017-06-26 23:13:22 -04:00
virtio_net.c bpf: virtio_net: Report bpf_prog ID during XDP_QUERY_PROG 2017-06-16 11:58:36 -04:00
vrf.c net: add netlink_ext_ack argument to rtnl_link_ops.validate 2017-06-26 23:13:22 -04:00
vsockmon.c net: Fix inconsistent teardown and release of private netdev state. 2017-06-07 15:53:24 -04:00
vxlan.c vxlan: fix incorrect nlattr access in MTU check 2017-06-27 14:40:35 -04:00
xen-netfront.c xen-netfront: avoid crashing on resume after a failure in talk_to_netback() 2017-05-11 21:38:50 -04:00