net/mlx5: E-Switch, Fix the warning on vport index out of range
authorBodong Wang <bodong@mellanox.com>
Mon, 18 Feb 2019 04:23:16 +0000 (22:23 -0600)
committerSaeed Mahameed <saeedm@mellanox.com>
Tue, 19 Feb 2019 22:15:04 +0000 (14:15 -0800)
commitacad70731e63aa3a901bc04a81a4a152cadbe9bf
treee2fbf11a2d9badc9a8eaa86ad8d797e4a8486d48
parente87636117e9a093ae221c1b935bf1a698be50df0
net/mlx5: E-Switch, Fix the warning on vport index out of range

When eswitch gets vport data structure, the index should not be out
of the range of the vport array. Driver mistakenly used vport number
to check the range.

Fixes: 22b8ddc86bf4 ("net/mlx5: E-Switch, Assign a different position for uplink rep and vport")
Signed-off-by: Bodong Wang <bodong@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/eswitch.c