aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMoshe Shemesh <moshe@mellanox.com>2016-09-22 05:11:16 -0400
committerDavid S. Miller <davem@davemloft.net>2016-09-24 08:01:27 -0400
commitb42959dc35a533a531dd698b581193a65a5da831 (patch)
tree62b69ec85dbf6c9bf3b1a07ff33aba9dbf5ef174
parent79aab093a0b5370d7fc4e99df75996f4744dc03f (diff)
net/mlx4: Add VF vlan protocol 802.1ad support
Move the vf to VST 802.1ad mode (mlx4 VST QinQ mode) by setting vf vlan protocol to 802.1ad. VST 802.1ad mode in mlx4, is used for STAG strip/insertion by PF, while the CTAG is set by the VF. Read current vlan protocol as part of the vf configuration state. Upon setting vf vlan protocol to 802.1ad, we use a mechanism of handshake to verify that both the vf and the pf driver version support it. The handshake uses the command QUERY_FUNC_CAP: - The vf sets a pre-defined support bit in input modifier. - A pf that supports the feature sends the request to the vf through a pre-defined field in the output mailbox. - In case vf does not support the feature, the pf will fail the control command (in this case, IP link tool command to set the vf vlan protocol to 802.1ad). No change in VST 802.1Q 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>
-rw-r--r--drivers/net/ethernet/mellanox/mlx4/cmd.c51
-rw-r--r--drivers/net/ethernet/mellanox/mlx4/en_netdev.c6
-rw-r--r--drivers/net/ethernet/mellanox/mlx4/fw.c89
-rw-r--r--drivers/net/ethernet/mellanox/mlx4/mlx4.h1
-rw-r--r--include/linux/mlx4/cmd.h3
5 files changed, 138 insertions, 12 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx4/cmd.c b/drivers/net/ethernet/mellanox/mlx4/cmd.c
index 09c969420eac..b1cef7a0f7ca 100644
--- a/drivers/net/ethernet/mellanox/mlx4/cmd.c
+++ b/drivers/net/ethernet/mellanox/mlx4/cmd.c
@@ -1995,6 +1995,8 @@ static int mlx4_master_activate_admin_state(struct mlx4_priv *priv, int slave)
1995 int port, err; 1995 int port, err;
1996 struct mlx4_vport_state *vp_admin; 1996 struct mlx4_vport_state *vp_admin;
1997 struct mlx4_vport_oper_state *vp_oper; 1997 struct mlx4_vport_oper_state *vp_oper;
1998 struct mlx4_slave_state *slave_state =
1999 &priv->mfunc.master.slave_state[slave];
1998 struct mlx4_active_ports actv_ports = mlx4_get_active_ports( 2000 struct mlx4_active_ports actv_ports = mlx4_get_active_ports(
1999 &priv->dev, slave); 2001 &priv->dev, slave);
2000 int min_port = find_first_bit(actv_ports.ports, 2002 int min_port = find_first_bit(actv_ports.ports,
@@ -2009,7 +2011,19 @@ static int mlx4_master_activate_admin_state(struct mlx4_priv *priv, int slave)
2009 priv->mfunc.master.vf_admin[slave].enable_smi[port]; 2011 priv->mfunc.master.vf_admin[slave].enable_smi[port];
2010 vp_oper = &priv->mfunc.master.vf_oper[slave].vport[port]; 2012 vp_oper = &priv->mfunc.master.vf_oper[slave].vport[port];
2011 vp_admin = &priv->mfunc.master.vf_admin[slave].vport[port]; 2013 vp_admin = &priv->mfunc.master.vf_admin[slave].vport[port];
2012 vp_oper->state = *vp_admin; 2014 if (vp_admin->vlan_proto != htons(ETH_P_8021AD) ||
2015 slave_state->vst_qinq_supported) {
2016 vp_oper->state.vlan_proto = vp_admin->vlan_proto;
2017 vp_oper->state.default_vlan = vp_admin->default_vlan;
2018 vp_oper->state.default_qos = vp_admin->default_qos;
2019 }
2020 vp_oper->state.link_state = vp_admin->link_state;
2021 vp_oper->state.mac = vp_admin->mac;
2022 vp_oper->state.spoofchk = vp_admin->spoofchk;
2023 vp_oper->state.tx_rate = vp_admin->tx_rate;
2024 vp_oper->state.qos_vport = vp_admin->qos_vport;
2025 vp_oper->state.guid = vp_admin->guid;
2026
2013 if (MLX4_VGT != vp_admin->default_vlan) { 2027 if (MLX4_VGT != vp_admin->default_vlan) {
2014 err = __mlx4_register_vlan(&priv->dev, port, 2028 err = __mlx4_register_vlan(&priv->dev, port,
2015 vp_admin->default_vlan, &(vp_oper->vlan_idx)); 2029 vp_admin->default_vlan, &(vp_oper->vlan_idx));
@@ -2097,6 +2111,7 @@ static void mlx4_master_do_cmd(struct mlx4_dev *dev, int slave, u8 cmd,
2097 mlx4_warn(dev, "Received reset from slave:%d\n", slave); 2111 mlx4_warn(dev, "Received reset from slave:%d\n", slave);
2098 slave_state[slave].active = false; 2112 slave_state[slave].active = false;
2099 slave_state[slave].old_vlan_api = false; 2113 slave_state[slave].old_vlan_api = false;
2114 slave_state[slave].vst_qinq_supported = false;
2100 mlx4_master_deactivate_admin_state(priv, slave); 2115 mlx4_master_deactivate_admin_state(priv, slave);
2101 for (i = 0; i < MLX4_EVENT_TYPES_NUM; ++i) { 2116 for (i = 0; i < MLX4_EVENT_TYPES_NUM; ++i) {
2102 slave_state[slave].event_eq[i].eqn = -1; 2117 slave_state[slave].event_eq[i].eqn = -1;
@@ -2364,6 +2379,7 @@ int mlx4_multi_func_init(struct mlx4_dev *dev)
2364 vf_oper = &priv->mfunc.master.vf_oper[i]; 2379 vf_oper = &priv->mfunc.master.vf_oper[i];
2365 s_state = &priv->mfunc.master.slave_state[i]; 2380 s_state = &priv->mfunc.master.slave_state[i];
2366 s_state->last_cmd = MLX4_COMM_CMD_RESET; 2381 s_state->last_cmd = MLX4_COMM_CMD_RESET;
2382 s_state->vst_qinq_supported = false;
2367 mutex_init(&priv->mfunc.master.gen_eqe_mutex[i]); 2383 mutex_init(&priv->mfunc.master.gen_eqe_mutex[i]);
2368 for (j = 0; j < MLX4_EVENT_TYPES_NUM; ++j) 2384 for (j = 0; j < MLX4_EVENT_TYPES_NUM; ++j)
2369 s_state->event_eq[j].eqn = -1; 2385 s_state->event_eq[j].eqn = -1;
@@ -2955,10 +2971,13 @@ int mlx4_set_vf_mac(struct mlx4_dev *dev, int port, int vf, u64 mac)
2955EXPORT_SYMBOL_GPL(mlx4_set_vf_mac); 2971EXPORT_SYMBOL_GPL(mlx4_set_vf_mac);
2956 2972
2957 2973
2958int mlx4_set_vf_vlan(struct mlx4_dev *dev, int port, int vf, u16 vlan, u8 qos) 2974int mlx4_set_vf_vlan(struct mlx4_dev *dev, int port, int vf, u16 vlan, u8 qos,
2975 __be16 proto)
2959{ 2976{
2960 struct mlx4_priv *priv = mlx4_priv(dev); 2977 struct mlx4_priv *priv = mlx4_priv(dev);
2961 struct mlx4_vport_state *vf_admin; 2978 struct mlx4_vport_state *vf_admin;
2979 struct mlx4_slave_state *slave_state;
2980 struct mlx4_vport_oper_state *vf_oper;
2962 int slave; 2981 int slave;
2963 2982
2964 if ((!mlx4_is_master(dev)) || 2983 if ((!mlx4_is_master(dev)) ||
@@ -2968,12 +2987,31 @@ int mlx4_set_vf_vlan(struct mlx4_dev *dev, int port, int vf, u16 vlan, u8 qos)
2968 if ((vlan > 4095) || (qos > 7)) 2987 if ((vlan > 4095) || (qos > 7))
2969 return -EINVAL; 2988 return -EINVAL;
2970 2989
2990 if (proto == htons(ETH_P_8021AD) &&
2991 !(dev->caps.flags2 & MLX4_DEV_CAP_FLAG2_SVLAN_BY_QP))
2992 return -EPROTONOSUPPORT;
2993
2994 if (proto != htons(ETH_P_8021Q) &&
2995 proto != htons(ETH_P_8021AD))
2996 return -EINVAL;
2997
2998 if ((proto == htons(ETH_P_8021AD)) &&
2999 ((vlan == 0) || (vlan == MLX4_VGT)))
3000 return -EINVAL;
3001
2971 slave = mlx4_get_slave_indx(dev, vf); 3002 slave = mlx4_get_slave_indx(dev, vf);
2972 if (slave < 0) 3003 if (slave < 0)
2973 return -EINVAL; 3004 return -EINVAL;
2974 3005
3006 slave_state = &priv->mfunc.master.slave_state[slave];
3007 if ((proto == htons(ETH_P_8021AD)) && (slave_state->active) &&
3008 (!slave_state->vst_qinq_supported)) {
3009 mlx4_err(dev, "vf %d does not support VST QinQ mode\n", vf);
3010 return -EPROTONOSUPPORT;
3011 }
2975 port = mlx4_slaves_closest_port(dev, slave, port); 3012 port = mlx4_slaves_closest_port(dev, slave, port);
2976 vf_admin = &priv->mfunc.master.vf_admin[slave].vport[port]; 3013 vf_admin = &priv->mfunc.master.vf_admin[slave].vport[port];
3014 vf_oper = &priv->mfunc.master.vf_oper[slave].vport[port];
2977 3015
2978 if (!mlx4_valid_vf_state_change(dev, port, vf_admin, vlan, qos)) 3016 if (!mlx4_valid_vf_state_change(dev, port, vf_admin, vlan, qos))
2979 return -EPERM; 3017 return -EPERM;
@@ -2983,6 +3021,7 @@ int mlx4_set_vf_vlan(struct mlx4_dev *dev, int port, int vf, u16 vlan, u8 qos)
2983 else 3021 else
2984 vf_admin->default_vlan = vlan; 3022 vf_admin->default_vlan = vlan;
2985 vf_admin->default_qos = qos; 3023 vf_admin->default_qos = qos;
3024 vf_admin->vlan_proto = proto;
2986 3025
2987 /* If rate was configured prior to VST, we saved the configured rate 3026 /* If rate was configured prior to VST, we saved the configured rate
2988 * in vf_admin->rate and now, if priority supported we enforce the QoS 3027 * in vf_admin->rate and now, if priority supported we enforce the QoS
@@ -2991,7 +3030,12 @@ int mlx4_set_vf_vlan(struct mlx4_dev *dev, int port, int vf, u16 vlan, u8 qos)
2991 vf_admin->tx_rate) 3030 vf_admin->tx_rate)
2992 vf_admin->qos_vport = slave; 3031 vf_admin->qos_vport = slave;
2993 3032
2994 if (mlx4_master_immediate_activate_vlan_qos(priv, slave, port)) 3033 /* Try to activate new vf state without restart,
3034 * this option is not supported while moving to VST QinQ mode.
3035 */
3036 if ((proto == htons(ETH_P_8021AD) &&
3037 vf_oper->state.vlan_proto != proto) ||
3038 mlx4_master_immediate_activate_vlan_qos(priv, slave, port))
2995 mlx4_info(dev, 3039 mlx4_info(dev,
2996 "updating vf %d port %d config will take effect on next VF restart\n", 3040 "updating vf %d port %d config will take effect on next VF restart\n",
2997 vf, port); 3041 vf, port);
@@ -3135,6 +3179,7 @@ int mlx4_get_vf_config(struct mlx4_dev *dev, int port, int vf, struct ifla_vf_in
3135 3179
3136 ivf->vlan = s_info->default_vlan; 3180 ivf->vlan = s_info->default_vlan;
3137 ivf->qos = s_info->default_qos; 3181 ivf->qos = s_info->default_qos;
3182 ivf->vlan_proto = s_info->vlan_proto;
3138 3183
3139 if (mlx4_is_vf_vst_and_prio_qos(dev, port, s_info)) 3184 if (mlx4_is_vf_vst_and_prio_qos(dev, port, s_info))
3140 ivf->max_tx_rate = s_info->tx_rate; 3185 ivf->max_tx_rate = s_info->tx_rate;
diff --git a/drivers/net/ethernet/mellanox/mlx4/en_netdev.c b/drivers/net/ethernet/mellanox/mlx4/en_netdev.c
index 132eeeafcdc4..7e703bed7b82 100644
--- a/drivers/net/ethernet/mellanox/mlx4/en_netdev.c
+++ b/drivers/net/ethernet/mellanox/mlx4/en_netdev.c
@@ -2406,10 +2406,8 @@ static int mlx4_en_set_vf_vlan(struct net_device *dev, int vf, u16 vlan, u8 qos,
2406 struct mlx4_en_priv *en_priv = netdev_priv(dev); 2406 struct mlx4_en_priv *en_priv = netdev_priv(dev);
2407 struct mlx4_en_dev *mdev = en_priv->mdev; 2407 struct mlx4_en_dev *mdev = en_priv->mdev;
2408 2408
2409 if (vlan_proto != htons(ETH_P_8021Q)) 2409 return mlx4_set_vf_vlan(mdev->dev, en_priv->port, vf, vlan, qos,
2410 return -EPROTONOSUPPORT; 2410 vlan_proto);
2411
2412 return mlx4_set_vf_vlan(mdev->dev, en_priv->port, vf, vlan, qos);
2413} 2411}
2414 2412
2415static int mlx4_en_set_vf_rate(struct net_device *dev, int vf, int min_tx_rate, 2413static int mlx4_en_set_vf_rate(struct net_device *dev, int vf, int min_tx_rate,
diff --git a/drivers/net/ethernet/mellanox/mlx4/fw.c b/drivers/net/ethernet/mellanox/mlx4/fw.c
index 7dc9d38a51f8..090bf81076e8 100644
--- a/drivers/net/ethernet/mellanox/mlx4/fw.c
+++ b/drivers/net/ethernet/mellanox/mlx4/fw.c
@@ -249,6 +249,72 @@ out:
249 return err; 249 return err;
250} 250}
251 251
252static int mlx4_activate_vst_qinq(struct mlx4_priv *priv, int slave, int port)
253{
254 struct mlx4_vport_oper_state *vp_oper;
255 struct mlx4_vport_state *vp_admin;
256 int err;
257
258 vp_oper = &priv->mfunc.master.vf_oper[slave].vport[port];
259 vp_admin = &priv->mfunc.master.vf_admin[slave].vport[port];
260
261 if (vp_admin->default_vlan != vp_oper->state.default_vlan) {
262 err = __mlx4_register_vlan(&priv->dev, port,
263 vp_admin->default_vlan,
264 &vp_oper->vlan_idx);
265 if (err) {
266 vp_oper->vlan_idx = NO_INDX;
267 mlx4_warn(&priv->dev,
268 "No vlan resources slave %d, port %d\n",
269 slave, port);
270 return err;
271 }
272 mlx4_dbg(&priv->dev, "alloc vlan %d idx %d slave %d port %d\n",
273 (int)(vp_oper->state.default_vlan),
274 vp_oper->vlan_idx, slave, port);
275 }
276 vp_oper->state.vlan_proto = vp_admin->vlan_proto;
277 vp_oper->state.default_vlan = vp_admin->default_vlan;
278 vp_oper->state.default_qos = vp_admin->default_qos;
279
280 return 0;
281}
282
283static int mlx4_handle_vst_qinq(struct mlx4_priv *priv, int slave, int port)
284{
285 struct mlx4_vport_oper_state *vp_oper;
286 struct mlx4_slave_state *slave_state;
287 struct mlx4_vport_state *vp_admin;
288 int err;
289
290 vp_oper = &priv->mfunc.master.vf_oper[slave].vport[port];
291 vp_admin = &priv->mfunc.master.vf_admin[slave].vport[port];
292 slave_state = &priv->mfunc.master.slave_state[slave];
293
294 if ((vp_admin->vlan_proto != htons(ETH_P_8021AD)) ||
295 (!slave_state->active))
296 return 0;
297
298 if (vp_oper->state.vlan_proto == vp_admin->vlan_proto &&
299 vp_oper->state.default_vlan == vp_admin->default_vlan &&
300 vp_oper->state.default_qos == vp_admin->default_qos)
301 return 0;
302
303 if (!slave_state->vst_qinq_supported) {
304 /* Warn and revert the request to set vst QinQ mode */
305 vp_admin->vlan_proto = vp_oper->state.vlan_proto;
306 vp_admin->default_vlan = vp_oper->state.default_vlan;
307 vp_admin->default_qos = vp_oper->state.default_qos;
308
309 mlx4_warn(&priv->dev,
310 "Slave %d does not support VST QinQ mode\n", slave);
311 return 0;
312 }
313
314 err = mlx4_activate_vst_qinq(priv, slave, port);
315 return err;
316}
317
252int mlx4_QUERY_FUNC_CAP_wrapper(struct mlx4_dev *dev, int slave, 318int mlx4_QUERY_FUNC_CAP_wrapper(struct mlx4_dev *dev, int slave,
253 struct mlx4_vhcr *vhcr, 319 struct mlx4_vhcr *vhcr,
254 struct mlx4_cmd_mailbox *inbox, 320 struct mlx4_cmd_mailbox *inbox,
@@ -312,17 +378,18 @@ int mlx4_QUERY_FUNC_CAP_wrapper(struct mlx4_dev *dev, int slave,
312#define QUERY_FUNC_CAP_VF_ENABLE_QP0 0x08 378#define QUERY_FUNC_CAP_VF_ENABLE_QP0 0x08
313 379
314#define QUERY_FUNC_CAP_FLAGS0_FORCE_PHY_WQE_GID 0x80 380#define QUERY_FUNC_CAP_FLAGS0_FORCE_PHY_WQE_GID 0x80
315#define QUERY_FUNC_CAP_SUPPORTS_NON_POWER_OF_2_NUM_EQS (1 << 31)
316#define QUERY_FUNC_CAP_PHV_BIT 0x40 381#define QUERY_FUNC_CAP_PHV_BIT 0x40
317#define QUERY_FUNC_CAP_VLAN_OFFLOAD_DISABLE 0x20 382#define QUERY_FUNC_CAP_VLAN_OFFLOAD_DISABLE 0x20
318 383
384#define QUERY_FUNC_CAP_SUPPORTS_VST_QINQ BIT(30)
385#define QUERY_FUNC_CAP_SUPPORTS_NON_POWER_OF_2_NUM_EQS BIT(31)
386
319 if (vhcr->op_modifier == 1) { 387 if (vhcr->op_modifier == 1) {
320 struct mlx4_active_ports actv_ports = 388 struct mlx4_active_ports actv_ports =
321 mlx4_get_active_ports(dev, slave); 389 mlx4_get_active_ports(dev, slave);
322 int converted_port = mlx4_slave_convert_port( 390 int converted_port = mlx4_slave_convert_port(
323 dev, slave, vhcr->in_modifier); 391 dev, slave, vhcr->in_modifier);
324 struct mlx4_vport_oper_state *vp_oper = 392 struct mlx4_vport_oper_state *vp_oper;
325 &priv->mfunc.master.vf_oper[slave].vport[vhcr->in_modifier];
326 393
327 if (converted_port < 0) 394 if (converted_port < 0)
328 return -EINVAL; 395 return -EINVAL;
@@ -361,6 +428,11 @@ int mlx4_QUERY_FUNC_CAP_wrapper(struct mlx4_dev *dev, int slave,
361 MLX4_PUT(outbox->buf, dev->caps.phys_port_id[vhcr->in_modifier], 428 MLX4_PUT(outbox->buf, dev->caps.phys_port_id[vhcr->in_modifier],
362 QUERY_FUNC_CAP_PHYS_PORT_ID); 429 QUERY_FUNC_CAP_PHYS_PORT_ID);
363 430
431 vp_oper = &priv->mfunc.master.vf_oper[slave].vport[port];
432 err = mlx4_handle_vst_qinq(priv, slave, port);
433 if (err)
434 return err;
435
364 field = 0; 436 field = 0;
365 if (dev->caps.phv_bit[port]) 437 if (dev->caps.phv_bit[port])
366 field |= QUERY_FUNC_CAP_PHV_BIT; 438 field |= QUERY_FUNC_CAP_PHV_BIT;
@@ -371,6 +443,9 @@ int mlx4_QUERY_FUNC_CAP_wrapper(struct mlx4_dev *dev, int slave,
371 } else if (vhcr->op_modifier == 0) { 443 } else if (vhcr->op_modifier == 0) {
372 struct mlx4_active_ports actv_ports = 444 struct mlx4_active_ports actv_ports =
373 mlx4_get_active_ports(dev, slave); 445 mlx4_get_active_ports(dev, slave);
446 struct mlx4_slave_state *slave_state =
447 &priv->mfunc.master.slave_state[slave];
448
374 /* enable rdma and ethernet interfaces, new quota locations, 449 /* enable rdma and ethernet interfaces, new quota locations,
375 * and reserved lkey 450 * and reserved lkey
376 */ 451 */
@@ -444,6 +519,10 @@ int mlx4_QUERY_FUNC_CAP_wrapper(struct mlx4_dev *dev, int slave,
444 519
445 size = dev->caps.reserved_lkey + ((slave << 8) & 0xFF00); 520 size = dev->caps.reserved_lkey + ((slave << 8) & 0xFF00);
446 MLX4_PUT(outbox->buf, size, QUERY_FUNC_CAP_QP_RESD_LKEY_OFFSET); 521 MLX4_PUT(outbox->buf, size, QUERY_FUNC_CAP_QP_RESD_LKEY_OFFSET);
522
523 if (vhcr->in_modifier & QUERY_FUNC_CAP_SUPPORTS_VST_QINQ)
524 slave_state->vst_qinq_supported = true;
525
447 } else 526 } else
448 err = -EINVAL; 527 err = -EINVAL;
449 528
@@ -459,10 +538,12 @@ int mlx4_QUERY_FUNC_CAP(struct mlx4_dev *dev, u8 gen_or_port,
459 u32 size, qkey; 538 u32 size, qkey;
460 int err = 0, quotas = 0; 539 int err = 0, quotas = 0;
461 u32 in_modifier; 540 u32 in_modifier;
541 u32 slave_caps;
462 542
463 op_modifier = !!gen_or_port; /* 0 = general, 1 = logical port */ 543 op_modifier = !!gen_or_port; /* 0 = general, 1 = logical port */
464 in_modifier = op_modifier ? gen_or_port : 544 slave_caps = QUERY_FUNC_CAP_SUPPORTS_VST_QINQ |
465 QUERY_FUNC_CAP_SUPPORTS_NON_POWER_OF_2_NUM_EQS; 545 QUERY_FUNC_CAP_SUPPORTS_NON_POWER_OF_2_NUM_EQS;
546 in_modifier = op_modifier ? gen_or_port : slave_caps;
466 547
467 mailbox = mlx4_alloc_cmd_mailbox(dev); 548 mailbox = mlx4_alloc_cmd_mailbox(dev);
468 if (IS_ERR(mailbox)) 549 if (IS_ERR(mailbox))
diff --git a/drivers/net/ethernet/mellanox/mlx4/mlx4.h b/drivers/net/ethernet/mellanox/mlx4/mlx4.h
index fdfe1ace07d7..e4878f31e45d 100644
--- a/drivers/net/ethernet/mellanox/mlx4/mlx4.h
+++ b/drivers/net/ethernet/mellanox/mlx4/mlx4.h
@@ -483,6 +483,7 @@ struct mlx4_slave_state {
483 u8 init_port_mask; 483 u8 init_port_mask;
484 bool active; 484 bool active;
485 bool old_vlan_api; 485 bool old_vlan_api;
486 bool vst_qinq_supported;
486 u8 function; 487 u8 function;
487 dma_addr_t vhcr_dma; 488 dma_addr_t vhcr_dma;
488 u16 mtu[MLX4_MAX_PORTS + 1]; 489 u16 mtu[MLX4_MAX_PORTS + 1];
diff --git a/include/linux/mlx4/cmd.h b/include/linux/mlx4/cmd.h
index 116b284bc4ce..1f3568694a57 100644
--- a/include/linux/mlx4/cmd.h
+++ b/include/linux/mlx4/cmd.h
@@ -309,7 +309,8 @@ int mlx4_get_vf_stats(struct mlx4_dev *dev, int port, int vf_idx,
309 struct ifla_vf_stats *vf_stats); 309 struct ifla_vf_stats *vf_stats);
310u32 mlx4_comm_get_version(void); 310u32 mlx4_comm_get_version(void);
311int mlx4_set_vf_mac(struct mlx4_dev *dev, int port, int vf, u64 mac); 311int mlx4_set_vf_mac(struct mlx4_dev *dev, int port, int vf, u64 mac);
312int mlx4_set_vf_vlan(struct mlx4_dev *dev, int port, int vf, u16 vlan, u8 qos); 312int mlx4_set_vf_vlan(struct mlx4_dev *dev, int port, int vf, u16 vlan,
313 u8 qos, __be16 proto);
313int mlx4_set_vf_rate(struct mlx4_dev *dev, int port, int vf, int min_tx_rate, 314int mlx4_set_vf_rate(struct mlx4_dev *dev, int port, int vf, int min_tx_rate,
314 int max_tx_rate); 315 int max_tx_rate);
315int mlx4_set_vf_spoofchk(struct mlx4_dev *dev, int port, int vf, bool setting); 316int mlx4_set_vf_spoofchk(struct mlx4_dev *dev, int port, int vf, bool setting);