Skip to contentSkip to conversation

i40e: Fix channel addition in reset flow

PATCH New Amritha Nambiar 1 participant 1 message Jan 23, 2018

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 i40e: Fix channel addition in reset flow

Fix recreating the channel VSIs during the reset flow to reconfigure the Tx rings and the queue context associated with the channel VSI. Also update the next_base_queue for the VSI while rebuilding the channel VSIs after a reset.

---
 drivers/net/ethernet/intel/i40e/i40e_main.c |   11 +++++++++++
 1 file changed, 11 insertions(+)
drivers/net/ethernet/intel/i40e/i40e_main.c +11 -0
index 7808659..7be7d71 100644
@@ -9083,6 +9083,17 @@ static int i40e_rebuild_channels(struct i40e_vsi *vsi)
 				 vsi->uplink_seid);
 			return ret;
 		}
+		/* Reconfigure TX queues using QTX_CTL register */
+		ret = i40e_channel_config_tx_ring(vsi->back, vsi, ch);
+		if (ret) {
+			dev_info(&vsi->back->pdev->dev,
+				 "failed to configure TX rings for channel %u\n",
+				 ch->seid);
+			return ret;
+		}
+		/* update 'next_base_queue' */
+		vsi->next_base_queue = vsi->next_base_queue +
+							ch->num_queue_pairs;
 		if (ch->max_tx_rate) {
 			u64 credits = ch->max_tx_rate;