[PATCH v2 5/7] net/ixgbe: use correct index variable in IPsec

Anatoly Burakov <[email protected]>
Newsgroups org.dpdk.dev
Message-ID <5cf7d8f5cc8470159d7ef69c4c36189d20ea1852.1787142684.git.anatoly.burakov@intel.com>
Currently, one of the Tx SA table accesses uses `i` iterator instead of the
`sa_index` variable that was assigned from said iterator. While this is
technically not a bug because `i` and `sa_index` always carry the same
value, it should still be fixed for readability purposes.

Signed-off-by: Anatoly Burakov <[email protected]>
---
 drivers/net/intel/ixgbe/ixgbe_ipsec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/intel/ixgbe/ixgbe_ipsec.c b/drivers/net/intel/ixgbe/ixgbe_ipsec.c
index 9c4937fcba..f026a41690 100644
--- a/drivers/net/intel/ixgbe/ixgbe_ipsec.c
+++ b/drivers/net/intel/ixgbe/ixgbe_ipsec.c
@@ -229,7 +229,7 @@ ixgbe_crypto_add_sa(struct ixgbe_crypto_session *ic_session)
 
 		priv->tx_sa_tbl[sa_index].spi =
 			rte_cpu_to_be_32(ic_session->spi);
-		priv->tx_sa_tbl[i].used = 1;
+		priv->tx_sa_tbl[sa_index].used = 1;
 		ic_session->sa_index = sa_index;
 
 		memcpy(key, ic_session->key, ic_session->key_len);
-- 
2.52.0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.