]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5: E-switch, Reuse total_vports and avoid duplicate nvports
authorParav Pandit <parav@mellanox.com>
Mon, 20 Jul 2020 11:10:16 +0000 (14:10 +0300)
committerSaeed Mahameed <saeedm@mellanox.com>
Tue, 28 Jul 2020 09:37:34 +0000 (02:37 -0700)
commitc8161cfabbc043a04109e2a8f48557a59a09a65c
treecc2ddb42b84c703b97b0a8d4f79c8d53f6a8416c
parent89c9f02c5a5ffacb6c5de95d086a220b54e32266
net/mlx5: E-switch, Reuse total_vports and avoid duplicate nvports

Total e-switch vports are already stored in mlx5_eswitch total_vports.
Avoid copy of it in nvports and reuse existing total_vports calculation.

Signed-off-by: Parav Pandit <parav@mellanox.com>
Reviewed-by: Roi Dayan <roid@mellanox.com>
Reviewed-by: Bodong Wang <bodong@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/eswitch.h
drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c