aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAshish Shah <ashish.n.shah@intel.com>2014-05-22 02:31:25 -0400
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2014-06-11 11:46:19 -0400
commit5d29896a81877fd12fcfe51707ba133ea8caee22 (patch)
tree9d810ffd1ce51f419d4a723f83cf795fbbe4215d
parent9f62ecf4255ea0fb3e653fc5fc91ef7b38812bb5 (diff)
i40e/i40evf: set headwb Tx context flags and use them
Set appropriate fields in Tx queue configuration virtchnl message to pf to enable headwb and setup headwb addr. Then use that info from the VF to set headwb and headwb_addr instead of always enabling them. Change-ID: I7d393d1b2b07f0f3355b3a4f7c2d3c6ee3b0d622 Signed-off-by: Ashish Shah <ashish.n.shah@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
-rw-r--r--drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c5
-rw-r--r--drivers/net/ethernet/intel/i40evf/i40evf_virtchnl.c3
2 files changed, 5 insertions, 3 deletions
diff --git a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
index 385a46f910d6..d9d045667a9e 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
@@ -248,9 +248,8 @@ static int i40e_config_vsi_tx_queue(struct i40e_vf *vf, u16 vsi_idx,
248 tx_ctx.qlen = info->ring_len; 248 tx_ctx.qlen = info->ring_len;
249 tx_ctx.rdylist = le16_to_cpu(pf->vsi[vsi_idx]->info.qs_handle[0]); 249 tx_ctx.rdylist = le16_to_cpu(pf->vsi[vsi_idx]->info.qs_handle[0]);
250 tx_ctx.rdylist_act = 0; 250 tx_ctx.rdylist_act = 0;
251 tx_ctx.head_wb_ena = 1; 251 tx_ctx.head_wb_ena = info->headwb_enabled;
252 tx_ctx.head_wb_addr = info->dma_ring_addr + 252 tx_ctx.head_wb_addr = info->dma_headwb_addr;
253 (info->ring_len * sizeof(struct i40e_tx_desc));
254 253
255 /* clear the context in the HMC */ 254 /* clear the context in the HMC */
256 ret = i40e_clear_lan_tx_queue_context(hw, pf_queue_id); 255 ret = i40e_clear_lan_tx_queue_context(hw, pf_queue_id);
diff --git a/drivers/net/ethernet/intel/i40evf/i40evf_virtchnl.c b/drivers/net/ethernet/intel/i40evf/i40evf_virtchnl.c
index cd414dac7553..6d76f29eaac1 100644
--- a/drivers/net/ethernet/intel/i40evf/i40evf_virtchnl.c
+++ b/drivers/net/ethernet/intel/i40evf/i40evf_virtchnl.c
@@ -233,6 +233,9 @@ void i40evf_configure_queues(struct i40evf_adapter *adapter)
233 vqpi->txq.queue_id = i; 233 vqpi->txq.queue_id = i;
234 vqpi->txq.ring_len = adapter->tx_rings[i]->count; 234 vqpi->txq.ring_len = adapter->tx_rings[i]->count;
235 vqpi->txq.dma_ring_addr = adapter->tx_rings[i]->dma; 235 vqpi->txq.dma_ring_addr = adapter->tx_rings[i]->dma;
236 vqpi->txq.headwb_enabled = 1;
237 vqpi->txq.dma_headwb_addr = vqpi->txq.dma_ring_addr +
238 (vqpi->txq.ring_len * sizeof(struct i40e_tx_desc));
236 239
237 vqpi->rxq.vsi_id = vqci->vsi_id; 240 vqpi->rxq.vsi_id = vqci->vsi_id;
238 vqpi->rxq.queue_id = i; 241 vqpi->rxq.queue_id = i;