]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
i40e: Map TCs with the VSI seids
authorAmritha Nambiar <amritha.nambiar@intel.com>
Fri, 27 Oct 2017 09:35:40 +0000 (02:35 -0700)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Tue, 31 Oct 2017 17:48:38 +0000 (10:48 -0700)
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: Amritha Nambiar <amritha.nambiar@intel.com>
Acked-by: Shannon Nelson <shannon.nelson@oracle.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/i40e/i40e.h
drivers/net/ethernet/intel/i40e/i40e_main.c

index eb017763646d85ac19507ebc601ba716d654b4e6..f3c501efddc8573557eb6a696800b58617015de9 100644 (file)
@@ -739,6 +739,7 @@ struct i40e_vsi {
        u16 next_base_queue;    /* next queue to be used for channel setup */
 
        struct list_head ch_list;
+       u16 tc_seid_map[I40E_MAX_TRAFFIC_CLASS];
 
        void *priv;     /* client driver data reference. */
 
index 1cf9ba2d9a410d7a08cb961f429ccd9dd8dca559..2ff7384cb24bf397d537a04280b78eac1a3b8599 100644 (file)
@@ -6100,6 +6100,7 @@ static int i40e_configure_queue_channels(struct i40e_vsi *vsi)
        int ret = 0, i;
 
        /* 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++) {
                if (vsi->tc_config.enabled_tc & BIT(i)) {
                        ch = kzalloc(sizeof(*ch), GFP_KERNEL);
@@ -6130,6 +6131,7 @@ static int i40e_configure_queue_channels(struct i40e_vsi *vsi)
                                        i, ch->num_queue_pairs);
                                goto err_free;
                        }
+                       vsi->tc_seid_map[i] = ch->seid;
                }
        }
        return ret;