Commit 2b18e591 authored by Neerav Parikh's avatar Neerav Parikh Committed by Jeff Kirsher

i40e: Use #define for the VSI connection type

Use #defined VSI connection type values instead of using magic numbers.

Change-ID: I2f6cf7bf394d391e1c0fe61779e9e4ad8858154a
Signed-off-by: default avatarNeerav Parikh <neerav.parikh@intel.com>
Tested-by: default avatarJim Young <james.m.young@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
parent 396642a6
...@@ -381,7 +381,7 @@ int i40e_fcoe_vsi_init(struct i40e_vsi *vsi, struct i40e_vsi_context *ctxt) ...@@ -381,7 +381,7 @@ int i40e_fcoe_vsi_init(struct i40e_vsi *vsi, struct i40e_vsi_context *ctxt)
ctxt->pf_num = hw->pf_id; ctxt->pf_num = hw->pf_id;
ctxt->vf_num = 0; ctxt->vf_num = 0;
ctxt->uplink_seid = vsi->uplink_seid; ctxt->uplink_seid = vsi->uplink_seid;
ctxt->connection_type = 0x1; ctxt->connection_type = I40E_AQ_VSI_CONN_TYPE_NORMAL;
ctxt->flags = I40E_AQ_VSI_TYPE_PF; ctxt->flags = I40E_AQ_VSI_TYPE_PF;
/* FCoE VSI would need the following sections */ /* FCoE VSI would need the following sections */
......
...@@ -7863,7 +7863,7 @@ static int i40e_add_vsi(struct i40e_vsi *vsi) ...@@ -7863,7 +7863,7 @@ static int i40e_add_vsi(struct i40e_vsi *vsi)
ctxt.pf_num = hw->pf_id; ctxt.pf_num = hw->pf_id;
ctxt.vf_num = 0; ctxt.vf_num = 0;
ctxt.uplink_seid = vsi->uplink_seid; ctxt.uplink_seid = vsi->uplink_seid;
ctxt.connection_type = 0x1; /* regular data port */ ctxt.connection_type = I40E_AQ_VSI_CONN_TYPE_NORMAL;
ctxt.flags = I40E_AQ_VSI_TYPE_PF; ctxt.flags = I40E_AQ_VSI_TYPE_PF;
ctxt.info.valid_sections |= ctxt.info.valid_sections |=
cpu_to_le16(I40E_AQ_VSI_PROP_SWITCH_VALID); cpu_to_le16(I40E_AQ_VSI_PROP_SWITCH_VALID);
...@@ -7876,7 +7876,7 @@ static int i40e_add_vsi(struct i40e_vsi *vsi) ...@@ -7876,7 +7876,7 @@ static int i40e_add_vsi(struct i40e_vsi *vsi)
ctxt.pf_num = hw->pf_id; ctxt.pf_num = hw->pf_id;
ctxt.vf_num = 0; ctxt.vf_num = 0;
ctxt.uplink_seid = vsi->uplink_seid; ctxt.uplink_seid = vsi->uplink_seid;
ctxt.connection_type = 0x1; /* regular data port */ ctxt.connection_type = I40E_AQ_VSI_CONN_TYPE_NORMAL;
ctxt.flags = I40E_AQ_VSI_TYPE_VMDQ2; ctxt.flags = I40E_AQ_VSI_TYPE_VMDQ2;
ctxt.info.valid_sections |= cpu_to_le16(I40E_AQ_VSI_PROP_SWITCH_VALID); ctxt.info.valid_sections |= cpu_to_le16(I40E_AQ_VSI_PROP_SWITCH_VALID);
...@@ -7895,7 +7895,7 @@ static int i40e_add_vsi(struct i40e_vsi *vsi) ...@@ -7895,7 +7895,7 @@ static int i40e_add_vsi(struct i40e_vsi *vsi)
ctxt.pf_num = hw->pf_id; ctxt.pf_num = hw->pf_id;
ctxt.vf_num = vsi->vf_id + hw->func_caps.vf_base_id; ctxt.vf_num = vsi->vf_id + hw->func_caps.vf_base_id;
ctxt.uplink_seid = vsi->uplink_seid; ctxt.uplink_seid = vsi->uplink_seid;
ctxt.connection_type = 0x1; /* regular data port */ ctxt.connection_type = I40E_AQ_VSI_CONN_TYPE_NORMAL;
ctxt.flags = I40E_AQ_VSI_TYPE_VF; ctxt.flags = I40E_AQ_VSI_TYPE_VF;
ctxt.info.valid_sections |= cpu_to_le16(I40E_AQ_VSI_PROP_SWITCH_VALID); ctxt.info.valid_sections |= cpu_to_le16(I40E_AQ_VSI_PROP_SWITCH_VALID);
......
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