Skip to content

Commit

Permalink
i40e: Only enable TC0 for NIC partition type
Browse files Browse the repository at this point in the history
In case of MFP mode the driver was returning incorrect number of TCs
for partitions that are not enabled for iSCSI. Though the driver does
not configure these TCs in the Tx scheduler for the NIC partitions;
it does use this map to setup the queue mappings.

This patch fixes this and keeps all the NIC partitions to the default
PF TC i.e. TC0.

Change-ID: Iede214c907e7bac1356e999049b9f642759512b3
Signed-off-by: Neerav Parikh <neerav.parikh@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
  • Loading branch information
Neerav Parikh authored and Jeff Kirsher committed Mar 3, 2015
1 parent 15d504b commit fc51de9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/net/ethernet/intel/i40e/i40e_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -4107,7 +4107,7 @@ static u8 i40e_pf_get_num_tc(struct i40e_pf *pf)
if (pf->hw.func_caps.iscsi)
enabled_tc = i40e_get_iscsi_tc_map(pf);
else
enabled_tc = pf->hw.func_caps.enabled_tcmap;
return 1; /* Only TC0 */

/* At least have TC0 */
enabled_tc = (enabled_tc ? enabled_tc : 0x1);
Expand Down Expand Up @@ -4157,11 +4157,11 @@ static u8 i40e_pf_get_tc_map(struct i40e_pf *pf)
if (!(pf->flags & I40E_FLAG_MFP_ENABLED))
return i40e_dcb_get_enabled_tc(&pf->hw.local_dcbx_config);

/* MPF enabled and iSCSI PF type */
/* MFP enabled and iSCSI PF type */
if (pf->hw.func_caps.iscsi)
return i40e_get_iscsi_tc_map(pf);
else
return pf->hw.func_caps.enabled_tcmap;
return i40e_pf_get_default_tc(pf);
}

/**
Expand Down

0 comments on commit fc51de9

Please sign in to comment.