History

net/mlx5: E-Switch, Properly refer to host PF vport as other vport

Commands referring to vports use the following scheme: 1. When referring to my own vport, put 0 in vport and 0 in other_vport. 2. When referring to another vport, put the vport number of the referred vport and put 1 in other_vport. It was assumed that driver is accessing other vport when vport number is greater than 0. With the above scheme, the case that ECPF eswitch manager is trying to access host PF vport will fall over with scheme 1 as the vport number is 0. This is apparently wrong as driver is trying to refer other vport. As such usage can only happen in the eswitch context, change relevant functions to provide other vport input properly.

Bodong Wang committed 7 years ago

Commit cbc44e71 parent a1b38394 files · +16 −17Browse files

Showing the changes to include/linux (1 of 4 files). Show all

Unified · Split

include/linux/mlx5/vport.h+2−2
@@ -59,7 +59,7 @@ enum { · 58 unmodified lines
59 59
60u8 mlx5_query_vport_state(struct mlx5_core_dev *mdev, u8 opmod, u16 vport);60u8 mlx5_query_vport_state(struct mlx5_core_dev *mdev, u8 opmod, u16 vport);
61int mlx5_modify_vport_admin_state(struct mlx5_core_dev *mdev, u8 opmod,61int mlx5_modify_vport_admin_state(struct mlx5_core_dev *mdev, u8 opmod,
62 u16 vport, u8 state);62 u16 vport, u8 other_vport, u8 state);
63int mlx5_query_nic_vport_mac_address(struct mlx5_core_dev *mdev,63int mlx5_query_nic_vport_mac_address(struct mlx5_core_dev *mdev,
64 u16 vport, u8 *addr);64 u16 vport, u8 *addr);
65int mlx5_query_nic_vport_min_inline(struct mlx5_core_dev *mdev,65int mlx5_query_nic_vport_min_inline(struct mlx5_core_dev *mdev,
@@ -121,7 +121,7 @@ int mlx5_modify_nic_vport_vlans(struct mlx5_core_dev *dev, · 55 unmodified lines
121int mlx5_nic_vport_enable_roce(struct mlx5_core_dev *mdev);121int mlx5_nic_vport_enable_roce(struct mlx5_core_dev *mdev);
122int mlx5_nic_vport_disable_roce(struct mlx5_core_dev *mdev);122int mlx5_nic_vport_disable_roce(struct mlx5_core_dev *mdev);
123int mlx5_query_vport_down_stats(struct mlx5_core_dev *mdev, u16 vport,123int mlx5_query_vport_down_stats(struct mlx5_core_dev *mdev, u16 vport,
124 u64 *rx_discard_vport_down,124 u8 other_vport, u64 *rx_discard_vport_down,
125 u64 *tx_discard_vport_down);125 u64 *tx_discard_vport_down);
126int mlx5_core_query_vport_counter(struct mlx5_core_dev *dev, u8 other_vport,126int mlx5_core_query_vport_counter(struct mlx5_core_dev *dev, u8 other_vport,
127 int vf, u8 port_num, void *out,127 int vf, u8 port_num, void *out,

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t