DPDK patches and discussions
 help / color / mirror / Atom feed
From: Volodymyr Fialko <vfialko@marvell.com>
To: <dev@dpdk.org>, Ashwin Sekhar T K <asekhar@marvell.com>,
	Pavan Nikhilesh <pbhagavatula@marvell.com>
Cc: <jerinj@marvell.com>, Volodymyr Fialko <vfialko@marvell.com>
Subject: [dpdk-dev] [PATCH 3/3] mempool/cnxk: parse max pools during npa initialization
Date: Fri, 29 Oct 2021 00:14:46 +0200	[thread overview]
Message-ID: <20211028221446.2455303-4-vfialko@marvell.com> (raw)
In-Reply-To: <20211028221446.2455303-1-vfialko@marvell.com>

Register callback for max_pools argument parsing

Signed-off-by: Volodymyr Fialko <vfialko@marvell.com>
Reviewed-by: Jerin Jacob <jerinj@marvell.com>
---
 drivers/mempool/cnxk/cnxk_mempool.c | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/drivers/mempool/cnxk/cnxk_mempool.c b/drivers/mempool/cnxk/cnxk_mempool.c
index 828bf3fc36..beefb90048 100644
--- a/drivers/mempool/cnxk/cnxk_mempool.c
+++ b/drivers/mempool/cnxk/cnxk_mempool.c
@@ -65,6 +65,13 @@ parse_max_pools(struct rte_devargs *devargs)
 	return max_pools;
 }
 
+static int
+cnxk_mempool_plt_parse_devargs(struct rte_pci_device *pci_dev)
+{
+	roc_idev_npa_maxpools_set(parse_max_pools(pci_dev->device.devargs));
+	return 0;
+}
+
 static inline char *
 npa_dev_to_name(struct rte_pci_device *pci_dev, char *name)
 {
@@ -92,7 +99,6 @@ npa_init(struct rte_pci_device *pci_dev)
 	dev = mz->addr;
 	dev->pci_dev = pci_dev;
 
-	roc_idev_npa_maxpools_set(parse_max_pools(pci_dev->device.devargs));
 	rc = roc_npa_dev_init(dev);
 	if (rc)
 		goto mz_free;
@@ -188,3 +194,8 @@ RTE_PMD_REGISTER_PCI_TABLE(mempool_cnxk, npa_pci_map);
 RTE_PMD_REGISTER_KMOD_DEP(mempool_cnxk, "vfio-pci");
 RTE_PMD_REGISTER_PARAM_STRING(mempool_cnxk,
 			      CNXK_NPA_MAX_POOLS_PARAM "=<128-1048576>");
+
+RTE_INIT(cnxk_mempool_parse_devargs)
+{
+	roc_npa_lf_init_cb_register(cnxk_mempool_plt_parse_devargs);
+}
-- 
2.25.1


  parent reply	other threads:[~2021-10-28 22:16 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-28 22:14 [dpdk-dev] [PATCH 0/3] fix max pools argument parsing Volodymyr Fialko
2021-10-28 22:14 ` [dpdk-dev] [PATCH 1/3] mempool/cnxk: " Volodymyr Fialko
2021-10-28 22:14 ` [dpdk-dev] [PATCH 2/3] common/cnxk: add roc npa init callback support Volodymyr Fialko
2021-10-28 22:14 ` Volodymyr Fialko [this message]
2021-10-29 14:18 ` [dpdk-dev] [PATCH 0/3] fix max pools argument parsing 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=20211028221446.2455303-4-vfialko@marvell.com \
    --to=vfialko@marvell.com \
    --cc=asekhar@marvell.com \
    --cc=dev@dpdk.org \
    --cc=jerinj@marvell.com \
    --cc=pbhagavatula@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).