summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Harris <james.r.harris@intel.com>2014-10-01 15:00:21 -0700
committerThomas Monjalon <thomas.monjalon@6wind.com>2014-10-09 20:02:34 +0200
commitf7eda85b9cebb7cf45a3426d4b9aaec874774b9f (patch)
tree7126cf3624eaf4ba1b3d07b5addc581040d3b856
parent7a10de5e27cec6666190b7e721d808aadb6a9d5a (diff)
downloaddpdk-f7eda85b9cebb7cf45a3426d4b9aaec874774b9f.zip
dpdk-f7eda85b9cebb7cf45a3426d4b9aaec874774b9f.tar.gz
dpdk-f7eda85b9cebb7cf45a3426d4b9aaec874774b9f.tar.xz
i40e: fix Tx descriptors reset
Fix the descriptor initialization loop, so that it initializes the i40e_tx_desc::cmd_type_offset_bsz for the correct index into the tx_ring array. Previously it would use the index once to initialize the txd local variable, then again when setting cmd_type_offset_bsz. Signed-off-by: Jim Harris <james.r.harris@intel.com> Acked-by: Helin Zhang <helin.zhang@intel.com>
-rw-r--r--lib/librte_pmd_i40e/i40e_rxtx.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/librte_pmd_i40e/i40e_rxtx.c b/lib/librte_pmd_i40e/i40e_rxtx.c
index 7c5b6a8..2b53677 100644
--- a/lib/librte_pmd_i40e/i40e_rxtx.c
+++ b/lib/librte_pmd_i40e/i40e_rxtx.c
@@ -2072,7 +2072,7 @@ i40e_reset_tx_queue(struct i40e_tx_queue *txq)
for (i = 0; i < txq->nb_tx_desc; i++) {
volatile struct i40e_tx_desc *txd = &txq->tx_ring[i];
- txd[i].cmd_type_offset_bsz =
+ txd->cmd_type_offset_bsz =
rte_cpu_to_le_64(I40E_TX_DESC_DTYPE_DESC_DONE);
txe[i].mbuf = NULL;
txe[i].last_id = i;