[v2,14/21] net/cnxk: realloc inline dev XAQ for security

Message ID 20220222193512.19292-14-ndabilpuram@marvell.com (mailing list archive)
State Accepted, archived
Delegated to: Jerin Jacob
Headers
Series [v2,01/21] common/cnxk: increase SMQ resource count |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Nithin Dabilpuram Feb. 22, 2022, 7:35 p.m. UTC
  Realloc inline dev XAQ when Rx/Tx security ie enabled with
new packet pool as XAQ should be large enough to hold all
mbufs if inline outbound reports error or all mbufs.

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
---
 drivers/net/cnxk/cnxk_ethdev.c | 5 +++++
 1 file changed, 5 insertions(+)
  

Patch

diff --git a/drivers/net/cnxk/cnxk_ethdev.c b/drivers/net/cnxk/cnxk_ethdev.c
index b272ede..a6b6331 100644
--- a/drivers/net/cnxk/cnxk_ethdev.c
+++ b/drivers/net/cnxk/cnxk_ethdev.c
@@ -545,6 +545,11 @@  cnxk_nix_rx_queue_setup(struct rte_eth_dev *eth_dev, uint16_t qid,
 		nb_desc = RTE_MAX(nb_desc, pkt_pool_limit);
 	}
 
+	/* Its a no-op when inline device is not used */
+	if (dev->rx_offloads & RTE_ETH_RX_OFFLOAD_SECURITY ||
+	    dev->tx_offloads & RTE_ETH_TX_OFFLOAD_SECURITY)
+		roc_nix_inl_dev_xaq_realloc(mp->pool_id);
+
 	/* Setup ROC CQ */
 	cq = &dev->cqs[qid];
 	cq->qid = qid;