summaryrefslogtreecommitdiff
path: root/net/ipv4
diff options
context:
space:
mode:
authorParav Pandit <parav@mellanox.com>2020-06-21 06:57:03 +0300
committerSaeed Mahameed <saeedm@mellanox.com>2020-08-03 20:13:49 +0300
commit45d252ca803b9aa232c455a7c3d0c9e14b89247f (patch)
treeb64a1b89883f946c4ad7ba55a59e7c200b35a10c /net/ipv4
parentbd0b33b24897ba9ddad221e8ac5b6f0e38a2e004 (diff)
downloadlinux-45d252ca803b9aa232c455a7c3d0c9e14b89247f.tar.xz
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>
Diffstat (limited to 'net/ipv4')
0 files changed, 0 insertions, 0 deletions