diff options
author | Frank Zhang <frank_1.zhang@intel.com> | 2014-05-20 04:01:42 -0400 |
---|---|---|
committer | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2014-06-09 03:27:57 -0400 |
commit | 9aa7e9355db342fda17d716bcf5ce62df7a02e61 (patch) | |
tree | 8c4363a8b5d27129b6ad08fa8fba813dff2037ad | |
parent | a34977ba6cbc17f14291771732c58f3cb8016a88 (diff) |
i40e: keep SR-IOV enabled in the case that RSS, VMDQ, FD_SB and DCB are disabled
Modify the logic in i40e_determine_queue_usage() so that
SR-IOV doesn't get turned off unnecessarily.
Change-ID: I86ca304fa9f742a50e9ea831b887f358a6a9d53d
Signed-off-by: Frank Zhang <frank_1.zhang@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
-rw-r--r-- | drivers/net/ethernet/intel/i40e/i40e_main.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c index eb32c5ce3eb3..b5f0dea0760b 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_main.c +++ b/drivers/net/ethernet/intel/i40e/i40e_main.c | |||
@@ -8180,9 +8180,7 @@ static void i40e_determine_queue_usage(struct i40e_pf *pf) | |||
8180 | queues_left = pf->hw.func_caps.num_tx_qp; | 8180 | queues_left = pf->hw.func_caps.num_tx_qp; |
8181 | 8181 | ||
8182 | if ((queues_left == 1) || | 8182 | if ((queues_left == 1) || |
8183 | !(pf->flags & I40E_FLAG_MSIX_ENABLED) || | 8183 | !(pf->flags & I40E_FLAG_MSIX_ENABLED)) { |
8184 | !(pf->flags & (I40E_FLAG_RSS_ENABLED | I40E_FLAG_FD_SB_ENABLED | | ||
8185 | I40E_FLAG_DCB_ENABLED))) { | ||
8186 | /* one qp for PF, no queues for anything else */ | 8184 | /* one qp for PF, no queues for anything else */ |
8187 | queues_left = 0; | 8185 | queues_left = 0; |
8188 | pf->rss_size = pf->num_lan_qps = 1; | 8186 | pf->rss_size = pf->num_lan_qps = 1; |
@@ -8194,6 +8192,18 @@ static void i40e_determine_queue_usage(struct i40e_pf *pf) | |||
8194 | I40E_FLAG_DCB_ENABLED | | 8192 | I40E_FLAG_DCB_ENABLED | |
8195 | I40E_FLAG_SRIOV_ENABLED | | 8193 | I40E_FLAG_SRIOV_ENABLED | |
8196 | I40E_FLAG_VMDQ_ENABLED); | 8194 | I40E_FLAG_VMDQ_ENABLED); |
8195 | } else if (!(pf->flags & (I40E_FLAG_RSS_ENABLED | | ||
8196 | I40E_FLAG_FD_SB_ENABLED | | ||
8197 | I40E_FLAG_DCB_ENABLED))) { | ||
8198 | /* one qp for PF */ | ||
8199 | pf->rss_size = pf->num_lan_qps = 1; | ||
8200 | queues_left -= pf->num_lan_qps; | ||
8201 | |||
8202 | pf->flags &= ~(I40E_FLAG_RSS_ENABLED | | ||
8203 | I40E_FLAG_FD_SB_ENABLED | | ||
8204 | I40E_FLAG_FD_ATR_ENABLED | | ||
8205 | I40E_FLAG_DCB_ENABLED | | ||
8206 | I40E_FLAG_VMDQ_ENABLED); | ||
8197 | } else { | 8207 | } else { |
8198 | /* Not enough queues for all TCs */ | 8208 | /* Not enough queues for all TCs */ |
8199 | if ((pf->flags & I40E_FLAG_DCB_ENABLED) && | 8209 | if ((pf->flags & I40E_FLAG_DCB_ENABLED) && |