Skip to content

Commit d4942d5

Browse files
Alexander DuyckJeff Kirsher
authored andcommitted
i40evf: Correctly populate rxitr_idx and txitr_idx
While testing code for the recent ITR changes I found that updating the Tx ITR appeared to have no effect with everything defaulting to the Rx ITR. A bit of digging narrowed it down the fact that we were asking the PF to associate all causes with ITR 0 as we weren't populating the itr_idx values for either Rx or Tx. To correct it I have added the configuration for these values to this patch. In addition I did some minor clean-up to just add a local pointer for the vector map instead of dereferencing it based off of the index repeatedly. In my opinion this makes the resultant code a bit more readable and saves us a few characters. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
1 parent 92418fb commit d4942d5

File tree

1 file changed

+15
-9
lines changed

1 file changed

+15
-9
lines changed

drivers/net/ethernet/intel/i40evf/i40evf_virtchnl.c

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -344,6 +344,7 @@ void i40evf_disable_queues(struct i40evf_adapter *adapter)
344344
void i40evf_map_queues(struct i40evf_adapter *adapter)
345345
{
346346
struct virtchnl_irq_map_info *vimi;
347+
struct virtchnl_vector_map *vecmap;
347348
int v_idx, q_vectors, len;
348349
struct i40e_q_vector *q_vector;
349350

@@ -367,17 +368,22 @@ void i40evf_map_queues(struct i40evf_adapter *adapter)
367368
vimi->num_vectors = adapter->num_msix_vectors;
368369
/* Queue vectors first */
369370
for (v_idx = 0; v_idx < q_vectors; v_idx++) {
370-
q_vector = adapter->q_vectors + v_idx;
371-
vimi->vecmap[v_idx].vsi_id = adapter->vsi_res->vsi_id;
372-
vimi->vecmap[v_idx].vector_id = v_idx + NONQ_VECS;
373-
vimi->vecmap[v_idx].txq_map = q_vector->ring_mask;
374-
vimi->vecmap[v_idx].rxq_map = q_vector->ring_mask;
371+
q_vector = &adapter->q_vectors[v_idx];
372+
vecmap = &vimi->vecmap[v_idx];
373+
374+
vecmap->vsi_id = adapter->vsi_res->vsi_id;
375+
vecmap->vector_id = v_idx + NONQ_VECS;
376+
vecmap->txq_map = q_vector->ring_mask;
377+
vecmap->rxq_map = q_vector->ring_mask;
378+
vecmap->rxitr_idx = I40E_RX_ITR;
379+
vecmap->txitr_idx = I40E_TX_ITR;
375380
}
376381
/* Misc vector last - this is only for AdminQ messages */
377-
vimi->vecmap[v_idx].vsi_id = adapter->vsi_res->vsi_id;
378-
vimi->vecmap[v_idx].vector_id = 0;
379-
vimi->vecmap[v_idx].txq_map = 0;
380-
vimi->vecmap[v_idx].rxq_map = 0;
382+
vecmap = &vimi->vecmap[v_idx];
383+
vecmap->vsi_id = adapter->vsi_res->vsi_id;
384+
vecmap->vector_id = 0;
385+
vecmap->txq_map = 0;
386+
vecmap->rxq_map = 0;
381387

382388
adapter->aq_required &= ~I40EVF_FLAG_AQ_MAP_VECTORS;
383389
i40evf_send_pf_msg(adapter, VIRTCHNL_OP_CONFIG_IRQ_MAP,

0 commit comments

Comments
 (0)