Commit aa5cb02a authored by Amritha Nambiar's avatar Amritha Nambiar Committed by Jeff Kirsher

i40e: Map TCs with the VSI seids

Add mapping of TCs with the seids of the channel VSIs. TC0
will be mapped to the main VSI seid and all other TCs are
mapped to the seid of the corresponding channel VSI.
Signed-off-by: default avatarAmritha Nambiar <amritha.nambiar@intel.com>
Acked-by: default avatarShannon Nelson <shannon.nelson@oracle.com>
Tested-by: default avatarAndrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
parent 384c181e
...@@ -739,6 +739,7 @@ struct i40e_vsi { ...@@ -739,6 +739,7 @@ struct i40e_vsi {
u16 next_base_queue; /* next queue to be used for channel setup */ u16 next_base_queue; /* next queue to be used for channel setup */
struct list_head ch_list; struct list_head ch_list;
u16 tc_seid_map[I40E_MAX_TRAFFIC_CLASS];
void *priv; /* client driver data reference. */ void *priv; /* client driver data reference. */
......
...@@ -6100,6 +6100,7 @@ static int i40e_configure_queue_channels(struct i40e_vsi *vsi) ...@@ -6100,6 +6100,7 @@ static int i40e_configure_queue_channels(struct i40e_vsi *vsi)
int ret = 0, i; int ret = 0, i;
/* Create app vsi with the TCs. Main VSI with TC0 is already set up */ /* Create app vsi with the TCs. Main VSI with TC0 is already set up */
vsi->tc_seid_map[0] = vsi->seid;
for (i = 1; i < I40E_MAX_TRAFFIC_CLASS; i++) { for (i = 1; i < I40E_MAX_TRAFFIC_CLASS; i++) {
if (vsi->tc_config.enabled_tc & BIT(i)) { if (vsi->tc_config.enabled_tc & BIT(i)) {
ch = kzalloc(sizeof(*ch), GFP_KERNEL); ch = kzalloc(sizeof(*ch), GFP_KERNEL);
...@@ -6130,6 +6131,7 @@ static int i40e_configure_queue_channels(struct i40e_vsi *vsi) ...@@ -6130,6 +6131,7 @@ static int i40e_configure_queue_channels(struct i40e_vsi *vsi)
i, ch->num_queue_pairs); i, ch->num_queue_pairs);
goto err_free; goto err_free;
} }
vsi->tc_seid_map[i] = ch->seid;
} }
} }
return ret; return ret;
......
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