linux/drivers/net/ethernet
Parav Pandit 45d252ca80 net/mlx5e: Enable users to change VF/PF representors carrier state
Currently PF and VF representor netdevice carrier is always controlled
by controlling the representor netdevice device state as up/down.

Representor netdevice state change undergoes one or more txq/rxq
destroy/create commands to firmware, skb and its rx buffer allocation,
health reporters creation and more.

Due to this limitation users do not have the ability to just change
the carrier of the non uplink representors without modifying the
device state.

In one use case when the eswitch physical port carrier is down/up,
user needs to update the VF link state to same as physical port
carrier.

Example of updating VF representor carrier state:
$ ip link set enp0s8f0npf0vf0 carrier off
$ ip link set enp0s8f0npf0vf0 carrier on

This enhancement results into VF link state change which is
represented by the VF representor netdevice carrier.

This enables users to modify the representor carrier without modifying
the representor netdevice state.

A simple test is run using [1] to calculate the time difference between
updating carrier vs updating device state (to update just the carrier)
with one VF to simulate 255 VFs.

Time taken to update the carrier using device up/down:
$ time ./calculate.sh dev enp0s8f0npf0vf0
real    0m30.913s
user    0m0.200s
sys     0m11.168s

Time taken to update just the carrier using carrier iproute2 command:
$ time ./calculate.sh carrier enp0s8f0npf0vf0
real    0m2.142s
user    0m0.160s
sys     0m2.021s

Test shows that its better to use carrier on/off user interface to notify
link up/down event to VF compare to device up/down interface, because
carrier user interface delivers the same event 15 times faster.

[1] https://github.com/paravmellanox/myscripts/blob/master/calculate_carrier_time.sh

Signed-off-by: Parav Pandit <parav@mellanox.com>
Acked-by: Jiri Pirko <jiri@mellanox.com>
Reviewed-by: Roi Dayan <roid@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
2020-08-03 10:13:49 -07:00
..
3com typhoon: use generic power management 2020-07-01 12:58:33 -07:00
8390 ne2k-pci: Use netif_msg_init to initialize msg_enable bits 2020-07-17 19:04:06 -07:00
adaptec starfire: use generic power management 2020-07-01 12:58:33 -07:00
aeroflex Replace HTTP links with HTTPS ones: GRETH 10/100/1G Ethernet MAC device driver 2020-07-07 15:44:27 -07:00
agere net: ethernet: et131x: Remove redundant register read 2020-07-17 18:48:15 -07:00
alacritech
allwinner
alteon net: alteon: Avoid some useless memset 2020-07-17 12:57:59 -07:00
altera
amazon net: ena: support new LLQ acceleration mode 2020-07-21 15:59:04 -07:00
amd xgbe: convert to new udp_tunnel_nic infra 2020-07-14 17:04:27 -07:00
apm
apple
aquantia Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2020-07-25 17:49:04 -07:00
arc
atheros net: ag71xx: add missed clk_disable_unprepare in error path of probe 2020-07-20 18:37:38 -07:00
aurora
broadcom bnxt_en: Remove superfluous memset() 2020-07-30 17:41:05 -07:00
brocade bna: bfi.h: Avoid the use of one-element array 2020-07-22 18:12:11 -07:00
cadence Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2020-07-25 17:49:04 -07:00
calxeda
cavium liquidio: Replace vmalloc with kmalloc in octeon_register_dispatch_fn() 2020-07-30 17:40:11 -07:00
chelsio Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2020-07-25 17:49:04 -07:00
cirrus
cisco enic: convert to new udp_tunnel_nic infra 2020-07-14 17:04:27 -07:00
cortina Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2020-08-02 01:02:12 -07:00
davicom
dec
dlink net: sundance: Replace HTTP links with HTTPS ones 2020-07-15 17:41:34 -07:00
emulex be2net: convert to new udp_tunnel_nic infra 2020-07-14 17:04:27 -07:00
ezchip
faraday
freescale Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2020-07-25 17:49:04 -07:00
fujitsu
google
hisilicon Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2020-08-02 01:02:12 -07:00
huawei hinic: add log in exception handling processes 2020-07-28 17:22:03 -07:00
i825xx
ibm ibmvnic: Fix IRQ mapping disposal in error path 2020-07-29 15:35:55 -07:00
intel Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2020-08-02 01:02:12 -07:00
marvell Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2020-08-02 01:02:12 -07:00
mediatek Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2020-08-02 01:02:12 -07:00
mellanox net/mlx5e: Enable users to change VF/PF representors carrier state 2020-08-03 10:13:49 -07:00
micrel ksz884x: switch from 'pci_' to 'dma_' API 2020-07-14 15:10:29 -07:00
microchip lan743x: remove redundant initialization of variable current_head_index 2020-07-22 17:55:35 -07:00
moxa
mscc Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2020-08-02 01:02:12 -07:00
myricom ethernet: myri10ge: use generic power management 2020-07-20 18:01:07 -07:00
natsemi natsemi: use generic power management 2020-07-01 12:58:33 -07:00
neterion Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2020-07-25 17:49:04 -07:00
netronome nfp: convert to new udp_tunnel_nic infra 2020-07-14 17:04:27 -07:00
ni net: nixge: fix potential memory leak in nixge_probe() 2020-07-30 16:55:39 -07:00
nvidia
nxp
oki-semi
packetengines net: packetengines: switch from 'pci_' to 'dma_' API 2020-07-20 17:48:23 -07:00
pasemi
pensando Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2020-08-02 01:02:12 -07:00
qlogic qede: Use %pM format specifier for MAC addresses 2020-07-31 16:48:23 -07:00
qualcomm net: rmnet: do not allow to add multiple bridge interfaces 2020-07-04 18:04:55 -07:00
rdc r6040: switch from 'pci_' to 'dma_' API 2020-07-20 17:49:50 -07:00
realtek r8169: allow to enable ASPM on RTL8125A 2020-07-21 16:12:19 -07:00
renesas net: ethernet: ravb: exit if re-initialization fails in tx timeout 2020-07-21 15:34:07 -07:00
rocker
samsung
seeq
sfc sfc_ef100: remove duplicated include from ef100_netdev.c 2020-07-30 16:53:07 -07:00
sgi
silan sc92031: use generic power management 2020-07-30 17:43:01 -07:00
sis sis900: use generic power management 2020-07-30 17:43:01 -07:00
smsc Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2020-07-25 17:49:04 -07:00
socionext net: ethernet: ave: Fix error returns in ave_init 2020-07-21 18:31:46 -07:00
stmicro net: stmmac: Speed down the PHY if WoL to save energy 2020-07-28 17:48:20 -07:00
sun net: sungem: switch from 'pci_' to 'dma_' API 2020-07-17 12:56:40 -07:00
synopsys
tehuti
ti tlan: use generic power management 2020-07-30 17:43:02 -07:00
toshiba
tundra
via
wiznet
xilinx net: ll_temac: Use devm_platform_ioremap_resource_byname() 2020-07-30 17:44:28 -07:00
xircom
xscale
dnet.c
dnet.h
ec_bhf.c
ethoc.c
fealnx.c net/fealnx: switch from 'pci_' to 'dma_' API 2020-07-20 18:32:49 -07:00
jme.c net: jme: Replace HTTP links with HTTPS ones 2020-07-13 17:45:04 -07:00
jme.h net: jme: Replace HTTP links with HTTPS ones 2020-07-13 17:45:04 -07:00
Kconfig
korina.c
lantiq_etop.c
lantiq_xrx200.c
Makefile