Commit e1c51b95 authored by Kevin Scott's avatar Kevin Scott Committed by Jeff Kirsher

i40e: Add flag for L2 VEB filtering

Add a new flag to the add VEB command which allows the
driver to request the hardware to filter on L2 parameters.

This is an implementation of the driver access to a new firmware
feature.

Change-Id: Id61d3cad4125bdc68b8fd9d555c448a10c344b6b
Signed-off-by: default avatarKevin Scott <kevin.c.scott@intel.com>
Signed-off-by: default avatarJesse Brandeburg <jesse.brandeburg@intel.com>
Tested-by: default avatarKavindya Deegala <kavindya.s.deegala@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
parent be405eb0
...@@ -924,6 +924,7 @@ bool i40e_get_link_status(struct i40e_hw *hw) ...@@ -924,6 +924,7 @@ bool i40e_get_link_status(struct i40e_hw *hw)
* @downlink_seid: the VSI SEID * @downlink_seid: the VSI SEID
* @enabled_tc: bitmap of TCs to be enabled * @enabled_tc: bitmap of TCs to be enabled
* @default_port: true for default port VSI, false for control port * @default_port: true for default port VSI, false for control port
* @enable_l2_filtering: true to add L2 filter table rules to regular forwarding rules for cloud support
* @veb_seid: pointer to where to put the resulting VEB SEID * @veb_seid: pointer to where to put the resulting VEB SEID
* @cmd_details: pointer to command details structure or NULL * @cmd_details: pointer to command details structure or NULL
* *
...@@ -932,7 +933,8 @@ bool i40e_get_link_status(struct i40e_hw *hw) ...@@ -932,7 +933,8 @@ bool i40e_get_link_status(struct i40e_hw *hw)
**/ **/
i40e_status i40e_aq_add_veb(struct i40e_hw *hw, u16 uplink_seid, i40e_status i40e_aq_add_veb(struct i40e_hw *hw, u16 uplink_seid,
u16 downlink_seid, u8 enabled_tc, u16 downlink_seid, u8 enabled_tc,
bool default_port, u16 *veb_seid, bool default_port, bool enable_l2_filtering,
u16 *veb_seid,
struct i40e_asq_cmd_details *cmd_details) struct i40e_asq_cmd_details *cmd_details)
{ {
struct i40e_aq_desc desc; struct i40e_aq_desc desc;
...@@ -958,6 +960,10 @@ i40e_status i40e_aq_add_veb(struct i40e_hw *hw, u16 uplink_seid, ...@@ -958,6 +960,10 @@ i40e_status i40e_aq_add_veb(struct i40e_hw *hw, u16 uplink_seid,
veb_flags |= I40E_AQC_ADD_VEB_PORT_TYPE_DEFAULT; veb_flags |= I40E_AQC_ADD_VEB_PORT_TYPE_DEFAULT;
else else
veb_flags |= I40E_AQC_ADD_VEB_PORT_TYPE_DATA; veb_flags |= I40E_AQC_ADD_VEB_PORT_TYPE_DATA;
if (enable_l2_filtering)
veb_flags |= I40E_AQC_ADD_VEB_ENABLE_L2_FILTER;
cmd->veb_flags = cpu_to_le16(veb_flags); cmd->veb_flags = cpu_to_le16(veb_flags);
status = i40e_asq_send_command(hw, &desc, NULL, 0, cmd_details); status = i40e_asq_send_command(hw, &desc, NULL, 0, cmd_details);
......
...@@ -6525,11 +6525,13 @@ void i40e_veb_release(struct i40e_veb *veb) ...@@ -6525,11 +6525,13 @@ void i40e_veb_release(struct i40e_veb *veb)
static int i40e_add_veb(struct i40e_veb *veb, struct i40e_vsi *vsi) static int i40e_add_veb(struct i40e_veb *veb, struct i40e_vsi *vsi)
{ {
bool is_default = (vsi->idx == vsi->back->lan_vsi); bool is_default = (vsi->idx == vsi->back->lan_vsi);
bool is_cloud = false;
int ret; int ret;
/* get a VEB from the hardware */ /* get a VEB from the hardware */
ret = i40e_aq_add_veb(&veb->pf->hw, veb->uplink_seid, vsi->seid, ret = i40e_aq_add_veb(&veb->pf->hw, veb->uplink_seid, vsi->seid,
veb->enabled_tc, is_default, &veb->seid, NULL); veb->enabled_tc, is_default,
is_cloud, &veb->seid, NULL);
if (ret) { if (ret) {
dev_info(&veb->pf->pdev->dev, dev_info(&veb->pf->pdev->dev,
"couldn't add VEB, err %d, aq_err %d\n", "couldn't add VEB, err %d, aq_err %d\n",
......
...@@ -106,7 +106,8 @@ i40e_status i40e_aq_update_vsi_params(struct i40e_hw *hw, ...@@ -106,7 +106,8 @@ i40e_status i40e_aq_update_vsi_params(struct i40e_hw *hw,
struct i40e_asq_cmd_details *cmd_details); struct i40e_asq_cmd_details *cmd_details);
i40e_status i40e_aq_add_veb(struct i40e_hw *hw, u16 uplink_seid, i40e_status i40e_aq_add_veb(struct i40e_hw *hw, u16 uplink_seid,
u16 downlink_seid, u8 enabled_tc, u16 downlink_seid, u8 enabled_tc,
bool default_port, u16 *pveb_seid, bool default_port, bool enable_l2_filtering,
u16 *pveb_seid,
struct i40e_asq_cmd_details *cmd_details); struct i40e_asq_cmd_details *cmd_details);
i40e_status i40e_aq_get_veb_parameters(struct i40e_hw *hw, i40e_status i40e_aq_get_veb_parameters(struct i40e_hw *hw,
u16 veb_seid, u16 *switch_id, bool *floating, u16 veb_seid, u16 *switch_id, bool *floating,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment