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)
commit0da3c12dd6fc08e40802fc102b00a37b5b415eeb
treecc2ddb42b84c703b97b0a8d4f79c8d53f6a8416c
parent8b95bda47c73625a06561657c7b21e5874833567
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