diff mbox series

[27/27] net/cnxk: reflect globally enabled offloads in queue conf

Message ID 20210902021505.17607-28-ndabilpuram@marvell.com (mailing list archive)
State Superseded
Delegated to: Jerin Jacob
Headers show
Series net/cnxk: support for inline ipsec | expand

Checks

Context Check Description
ci/Intel-compilation warning apply issues
ci/checkpatch warning coding style issues

Commit Message

Nithin Kumar Dabilpuram Sept. 2, 2021, 2:15 a.m. UTC
Reflect globally enabled Rx and Tx offloads in queue conf.
Also fix issue with lmt data prepare for multi seg.

Fixes: a24af6361e37 ("net/cnxk: add Tx queue setup and release")
Fixes: a86144cd9ded ("net/cnxk: add Rx queue setup and release")
Fixes: 305ca2c4c382 ("net/cnxk: support multi-segment vector Tx")

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
---
 drivers/net/cnxk/cn10k_tx.h    | 2 +-
 drivers/net/cnxk/cnxk_ethdev.c | 4 ++++
 2 files changed, 5 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/drivers/net/cnxk/cn10k_tx.h b/drivers/net/cnxk/cn10k_tx.h
index f56aa8e..2821f71 100644
--- a/drivers/net/cnxk/cn10k_tx.h
+++ b/drivers/net/cnxk/cn10k_tx.h
@@ -1280,7 +1280,7 @@  cn10k_nix_prep_lmt_mseg_vector(struct rte_mbuf **mbufs, uint64x2_t *cmd0,
 			vst1q_u64(lmt_addr + 14, cmd1[3]);
 
 			*data128 |= ((__uint128_t)7) << *shift;
-			shift += 3;
+			*shift += 3;
 
 			return 1;
 		}
diff --git a/drivers/net/cnxk/cnxk_ethdev.c b/drivers/net/cnxk/cnxk_ethdev.c
index 8a102aa..978ee5b 100644
--- a/drivers/net/cnxk/cnxk_ethdev.c
+++ b/drivers/net/cnxk/cnxk_ethdev.c
@@ -377,6 +377,8 @@  cnxk_nix_tx_queue_setup(struct rte_eth_dev *eth_dev, uint16_t qid,
 	txq_sp->dev = dev;
 	txq_sp->qid = qid;
 	txq_sp->qconf.conf.tx = *tx_conf;
+	/* Queue config should reflect global offloads */
+	txq_sp->qconf.conf.tx.offloads = dev->tx_offloads;
 	txq_sp->qconf.nb_desc = nb_desc;
 
 	plt_nix_dbg("sq=%d fc=%p offload=0x%" PRIx64 " lmt_addr=%p"
@@ -511,6 +513,8 @@  cnxk_nix_rx_queue_setup(struct rte_eth_dev *eth_dev, uint16_t qid,
 	rxq_sp->dev = dev;
 	rxq_sp->qid = qid;
 	rxq_sp->qconf.conf.rx = *rx_conf;
+	/* Queue config should reflect global offloads */
+	rxq_sp->qconf.conf.rx.offloads = dev->rx_offloads;
 	rxq_sp->qconf.nb_desc = nb_desc;
 	rxq_sp->qconf.mp = mp;