aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/mlx4
diff options
context:
space:
mode:
authorMoshe Shemesh <moshe@mellanox.com>2016-09-22 05:11:13 -0400
committerDavid S. Miller <davem@davemloft.net>2016-09-24 08:01:26 -0400
commit7c3d21c8153c6bfb5690e35e086b0522c42442d9 (patch)
treea3a86dd92b5169938a44a55722ef70fc0fb34e9c /include/linux/mlx4
parentc9cc599a96a6822c52cd72ed31dd7f813d792b4f (diff)
net/mlx4_core: Preparation for VF vlan protocol 802.1ad
Check device capability to support VF vlan protocol 802.1ad mode. Add vport attribute vlan protocol. Init vport vlan protocol by default to 802.1Q. Add update QP support for VF vlan protocol 802.1ad. Add func capability vlan_offload_disable to disable all vlan HW acceleration on VF while the VF is set to VF vlan protocol 802.1ad mode. No change in VF vlan protocol 802.1Q (VST) mode. Signed-off-by: Moshe Shemesh <moshe@mellanox.com> Signed-off-by: Tariq Toukan <tariqt@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/mlx4')
-rw-r--r--include/linux/mlx4/device.h3
-rw-r--r--include/linux/mlx4/qp.h2
2 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/mlx4/device.h b/include/linux/mlx4/device.h
index 42da3552f7cb..59b50d3eedb4 100644
--- a/include/linux/mlx4/device.h
+++ b/include/linux/mlx4/device.h
@@ -221,6 +221,7 @@ enum {
221 MLX4_DEV_CAP_FLAG2_ROCE_V1_V2 = 1ULL << 33, 221 MLX4_DEV_CAP_FLAG2_ROCE_V1_V2 = 1ULL << 33,
222 MLX4_DEV_CAP_FLAG2_DMFS_UC_MC_SNIFFER = 1ULL << 34, 222 MLX4_DEV_CAP_FLAG2_DMFS_UC_MC_SNIFFER = 1ULL << 34,
223 MLX4_DEV_CAP_FLAG2_DIAG_PER_PORT = 1ULL << 35, 223 MLX4_DEV_CAP_FLAG2_DIAG_PER_PORT = 1ULL << 35,
224 MLX4_DEV_CAP_FLAG2_SVLAN_BY_QP = 1ULL << 36,
224}; 225};
225 226
226enum { 227enum {
@@ -1371,6 +1372,8 @@ int mlx4_SET_PORT_fcs_check(struct mlx4_dev *dev, u8 port,
1371int mlx4_SET_PORT_VXLAN(struct mlx4_dev *dev, u8 port, u8 steering, int enable); 1372int mlx4_SET_PORT_VXLAN(struct mlx4_dev *dev, u8 port, u8 steering, int enable);
1372int set_phv_bit(struct mlx4_dev *dev, u8 port, int new_val); 1373int set_phv_bit(struct mlx4_dev *dev, u8 port, int new_val);
1373int get_phv_bit(struct mlx4_dev *dev, u8 port, int *phv); 1374int get_phv_bit(struct mlx4_dev *dev, u8 port, int *phv);
1375int mlx4_get_is_vlan_offload_disabled(struct mlx4_dev *dev, u8 port,
1376 bool *vlan_offload_disabled);
1374int mlx4_find_cached_mac(struct mlx4_dev *dev, u8 port, u64 mac, int *idx); 1377int mlx4_find_cached_mac(struct mlx4_dev *dev, u8 port, u64 mac, int *idx);
1375int mlx4_find_cached_vlan(struct mlx4_dev *dev, u8 port, u16 vid, int *idx); 1378int mlx4_find_cached_vlan(struct mlx4_dev *dev, u8 port, u16 vid, int *idx);
1376int mlx4_register_vlan(struct mlx4_dev *dev, u8 port, u16 vlan, int *index); 1379int mlx4_register_vlan(struct mlx4_dev *dev, u8 port, u16 vlan, int *index);
diff --git a/include/linux/mlx4/qp.h b/include/linux/mlx4/qp.h
index deaa2217214d..b4ee8f62ce8d 100644
--- a/include/linux/mlx4/qp.h
+++ b/include/linux/mlx4/qp.h
@@ -160,6 +160,7 @@ struct mlx4_qp_path {
160 160
161enum { /* fl */ 161enum { /* fl */
162 MLX4_FL_CV = 1 << 6, 162 MLX4_FL_CV = 1 << 6,
163 MLX4_FL_SV = 1 << 5,
163 MLX4_FL_ETH_HIDE_CQE_VLAN = 1 << 2, 164 MLX4_FL_ETH_HIDE_CQE_VLAN = 1 << 2,
164 MLX4_FL_ETH_SRC_CHECK_MC_LB = 1 << 1, 165 MLX4_FL_ETH_SRC_CHECK_MC_LB = 1 << 1,
165 MLX4_FL_ETH_SRC_CHECK_UC_LB = 1 << 0, 166 MLX4_FL_ETH_SRC_CHECK_UC_LB = 1 << 0,
@@ -267,6 +268,7 @@ enum {
267 MLX4_UPD_QP_PATH_MASK_FVL_RX = 16 + 32, 268 MLX4_UPD_QP_PATH_MASK_FVL_RX = 16 + 32,
268 MLX4_UPD_QP_PATH_MASK_ETH_SRC_CHECK_UC_LB = 18 + 32, 269 MLX4_UPD_QP_PATH_MASK_ETH_SRC_CHECK_UC_LB = 18 + 32,
269 MLX4_UPD_QP_PATH_MASK_ETH_SRC_CHECK_MC_LB = 19 + 32, 270 MLX4_UPD_QP_PATH_MASK_ETH_SRC_CHECK_MC_LB = 19 + 32,
271 MLX4_UPD_QP_PATH_MASK_SV = 22 + 32,
270}; 272};
271 273
272enum { /* param3 */ 274enum { /* param3 */