DPDK patches and discussions
 help / color / mirror / Atom feed
From: Nithin Dabilpuram <ndabilpuram@marvell.com>
To: Nithin Dabilpuram <ndabilpuram@marvell.com>,
	Kiran Kumar K <kirankumark@marvell.com>,
	Sunil Kumar Kori <skori@marvell.com>,
	Satha Rao <skoteshwar@marvell.com>
Cc: <jerinj@marvell.com>, <dev@dpdk.org>,
	Rahul Bhansali <rbhansali@marvell.com>
Subject: [PATCH 10/15] net/cnxk: aura handle for fastpath Rx queues
Date: Fri, 3 Mar 2023 13:40:08 +0530	[thread overview]
Message-ID: <20230303081013.589868-10-ndabilpuram@marvell.com> (raw)
In-Reply-To: <20230303081013.589868-1-ndabilpuram@marvell.com>

From: Rahul Bhansali <rbhansali@marvell.com>

Meta aura for RQs is created during queue enable process, so
aura handle for fastpath Rx queues should be updated after
this.

Signed-off-by: Rahul Bhansali <rbhansali@marvell.com>
---
 drivers/net/cnxk/cn10k_ethdev.c | 33 ++++++++++++++++++++++++++-------
 1 file changed, 26 insertions(+), 7 deletions(-)

diff --git a/drivers/net/cnxk/cn10k_ethdev.c b/drivers/net/cnxk/cn10k_ethdev.c
index cb88bd2dc1..2dbca698af 100644
--- a/drivers/net/cnxk/cn10k_ethdev.c
+++ b/drivers/net/cnxk/cn10k_ethdev.c
@@ -283,7 +283,6 @@ cn10k_nix_rx_queue_setup(struct rte_eth_dev *eth_dev, uint16_t qid,
 			 struct rte_mempool *mp)
 {
 	struct cnxk_eth_dev *dev = cnxk_eth_pmd_priv(eth_dev);
-	struct cnxk_eth_rxq_sp *rxq_sp;
 	struct cn10k_eth_rxq *rxq;
 	struct roc_nix_rq *rq;
 	struct roc_nix_cq *cq;
@@ -335,17 +334,34 @@ cn10k_nix_rx_queue_setup(struct rte_eth_dev *eth_dev, uint16_t qid,
 		rxq->lmt_base = dev->nix.lmt_base;
 		rxq->sa_base = roc_nix_inl_inb_sa_base_get(&dev->nix,
 							   dev->inb.inl_dev);
+	}
+
+	/* Lookup mem */
+	rxq->lookup_mem = cnxk_nix_fastpath_lookup_mem_get();
+	return 0;
+}
+
+static void
+cn10k_nix_rx_queue_meta_aura_update(struct rte_eth_dev *eth_dev)
+{
+	struct cnxk_eth_dev *dev = cnxk_eth_pmd_priv(eth_dev);
+	struct cnxk_eth_rxq_sp *rxq_sp;
+	struct cn10k_eth_rxq *rxq;
+	struct roc_nix_rq *rq;
+	int i;
+
+	/* Update Aura handle for fastpath rx queues */
+	for (i = 0; i < eth_dev->data->nb_rx_queues; i++) {
+		rq = &dev->rqs[i];
+		rxq = eth_dev->data->rx_queues[i];
 		rxq->meta_aura = rq->meta_aura_handle;
-		rxq_sp = cnxk_eth_rxq_to_sp(rxq);
 		/* Assume meta packet from normal aura if meta aura is not setup
 		 */
-		if (!rxq->meta_aura)
+		if (!rxq->meta_aura) {
+			rxq_sp = cnxk_eth_rxq_to_sp(rxq);
 			rxq->meta_aura = rxq_sp->qconf.mp->pool_id;
+		}
 	}
-
-	/* Lookup mem */
-	rxq->lookup_mem = cnxk_nix_fastpath_lookup_mem_get();
-	return 0;
 }
 
 static int
@@ -557,6 +573,9 @@ cn10k_nix_dev_start(struct rte_eth_dev *eth_dev)
 	dev->rx_offload_flags |= nix_rx_offload_flags(eth_dev);
 	dev->tx_offload_flags |= nix_tx_offload_flags(eth_dev);
 
+	if (dev->rx_offload_flags & NIX_RX_OFFLOAD_SECURITY_F)
+		cn10k_nix_rx_queue_meta_aura_update(eth_dev);
+
 	cn10k_eth_set_tx_function(eth_dev);
 	cn10k_eth_set_rx_function(eth_dev);
 	return 0;
-- 
2.25.1


  parent reply	other threads:[~2023-03-03  8:11 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-03  8:09 [PATCH 01/15] net/cnxk: resolve sefgault caused during transmit completion Nithin Dabilpuram
2023-03-03  8:10 ` [PATCH 02/15] net/cnxk: fix data len for first seg with multi seg pkt Nithin Dabilpuram
2023-03-03  8:10 ` [PATCH 03/15] net/cnxk: release LBK bpid for after freeing resources Nithin Dabilpuram
2023-03-03  8:10 ` [PATCH 04/15] common/cnxk: add separate inline dev stats API Nithin Dabilpuram
2023-03-03  8:10 ` [PATCH 05/15] common/cnxk: distribute SQ's to sdp channels Nithin Dabilpuram
2023-03-03  8:10 ` [PATCH 06/15] common/cnxk: remove flow control config at queue setup Nithin Dabilpuram
2023-03-03  8:10 ` [PATCH 07/15] common/cnxk: enable 10K B0 support for inline IPsec Nithin Dabilpuram
2023-03-03  8:10 ` [PATCH 08/15] net/cnxk: check flow control config per queue on dev start Nithin Dabilpuram
2023-03-03  8:10 ` [PATCH 09/15] net/cnxk: don't allow PFC configuration on started port Nithin Dabilpuram
2023-03-03  8:10 ` Nithin Dabilpuram [this message]
2023-03-03  8:10 ` [PATCH 11/15] common/cnxk: support of per NIX LF meta aura Nithin Dabilpuram
2023-03-03  8:10 ` [PATCH 12/15] common/cnxk: enable one to one SQ QINT mapping Nithin Dabilpuram
2023-03-03  8:10 ` [PATCH 13/15] common/cnxk: add RSS error messages on mbox failure Nithin Dabilpuram
2023-03-03  8:10 ` [PATCH 14/15] common/cnxk: add memory clobber to steor and ldeor Nithin Dabilpuram
2023-03-03  8:10 ` [PATCH 15/15] common/cnxk: enable SDP channel backpressure to TL4 Nithin Dabilpuram
2023-03-06  9:55   ` Jerin Jacob

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230303081013.589868-10-ndabilpuram@marvell.com \
    --to=ndabilpuram@marvell.com \
    --cc=dev@dpdk.org \
    --cc=jerinj@marvell.com \
    --cc=kirankumark@marvell.com \
    --cc=rbhansali@marvell.com \
    --cc=skori@marvell.com \
    --cc=skoteshwar@marvell.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).