DPDK patches and discussions
 help / color / mirror / Atom feed
From: Rahul Bhansali <rbhansali@marvell.com>
To: <dev@dpdk.org>, Nithin Dabilpuram <ndabilpuram@marvell.com>,
	Kiran Kumar K <kirankumark@marvell.com>,
	Sunil Kumar Kori <skori@marvell.com>,
	Satha Rao <skoteshwar@marvell.com>,
	Harman Kalra <hkalra@marvell.com>
Cc: <jerinj@marvell.com>, Rahul Bhansali <rbhansali@marvell.com>
Subject: [PATCH 2/3] common/cnxk: update cn20k part numbers
Date: Fri, 21 Mar 2025 15:33:42 +0530	[thread overview]
Message-ID: <20250321100343.1081664-2-rbhansali@marvell.com> (raw)
In-Reply-To: <20250321100343.1081664-1-rbhansali@marvell.com>

- Update cn20k part number
- Add cnf205 support
- Add APIs for respective cn20k models

Signed-off-by: Rahul Bhansali <rbhansali@marvell.com>
Signed-off-by: Harman Kalra <hkalra@marvell.com>
---
 drivers/common/cnxk/roc_constants.h |  4 ++--
 drivers/common/cnxk/roc_model.c     |  4 +++-
 drivers/common/cnxk/roc_model.h     | 28 +++++++++++++++++++++++++++-
 3 files changed, 32 insertions(+), 4 deletions(-)

diff --git a/drivers/common/cnxk/roc_constants.h b/drivers/common/cnxk/roc_constants.h
index ac492651de..795869c9df 100644
--- a/drivers/common/cnxk/roc_constants.h
+++ b/drivers/common/cnxk/roc_constants.h
@@ -66,8 +66,8 @@
 #define PCI_SUBSYSTEM_DEVID_CN10KB  0xBD00
 #define PCI_SUBSYSTEM_DEVID_CNF10KB 0xBC00
 
-#define PCI_SUBSYSTEM_DEVID_CN20KA 0xA020
-#define PCI_SUBSYSTEM_DEVID_CNF20KA 0xA000
+#define PCI_SUBSYSTEM_DEVID_CN20KA 0xC220
+#define PCI_SUBSYSTEM_DEVID_CNF20KA 0xC200
 
 #define PCI_SUBSYSTEM_DEVID_CN9KA  0x0000
 #define PCI_SUBSYSTEM_DEVID_CN9KB  0xb400
diff --git a/drivers/common/cnxk/roc_model.c b/drivers/common/cnxk/roc_model.c
index 6289461db4..f0312a5400 100644
--- a/drivers/common/cnxk/roc_model.c
+++ b/drivers/common/cnxk/roc_model.c
@@ -18,7 +18,8 @@ struct roc_model *roc_model;
 #define SOC_PART_CN10K 0xD49
 #define SOC_PART_CN20K 0xD8E
 
-#define PART_206xx  0xA0
+#define PART_206xx  0xC2
+#define PART_205xxN 0xC3
 #define PART_106xx  0xB9
 #define PART_105xx  0xBA
 #define PART_105xxN 0xBC
@@ -62,6 +63,7 @@ static const struct model_db {
 	char name[ROC_MODEL_STR_LEN_MAX];
 } model_db[] = {
 	{VENDOR_ARM, PART_206xx, 0, 0, ROC_MODEL_CN206xx_A0, "cn20ka_a0"},
+	{VENDOR_ARM, PART_205xxN, 0, 0, ROC_MODEL_CNF205xxN_A0, "cnf20ka_a0"},
 	{VENDOR_ARM, PART_106xx, 0, 0, ROC_MODEL_CN106xx_A0, "cn10ka_a0"},
 	{VENDOR_ARM, PART_106xx, 0, 1, ROC_MODEL_CN106xx_A1, "cn10ka_a1"},
 	{VENDOR_ARM, PART_106xx, 1, 0, ROC_MODEL_CN106xx_B0, "cn10ka_b0"},
diff --git a/drivers/common/cnxk/roc_model.h b/drivers/common/cnxk/roc_model.h
index 0de141b0cc..38001a3a23 100644
--- a/drivers/common/cnxk/roc_model.h
+++ b/drivers/common/cnxk/roc_model.h
@@ -37,6 +37,7 @@ struct roc_model {
 #define ROC_MODEL_CNF105xxN_B0 BIT_ULL(27)
 /* CN20k Models*/
 #define ROC_MODEL_CN206xx_A0   BIT_ULL(40)
+#define ROC_MODEL_CNF205xxN_A0 BIT_ULL(41)
 
 /* Following flags describe platform code is running on */
 #define ROC_ENV_HW   BIT_ULL(61)
@@ -75,7 +76,8 @@ struct roc_model {
 
 /* CN20K models */
 #define ROC_MODEL_CN206xx   (ROC_MODEL_CN206xx_A0)
-#define ROC_MODEL_CN20K     (ROC_MODEL_CN206xx)
+#define ROC_MODEL_CNF205xxN (ROC_MODEL_CNF205xxN_A0)
+#define ROC_MODEL_CN20K     (ROC_MODEL_CN206xx | ROC_MODEL_CNF205xxN)
 
 /* Runtime variants */
 static inline uint64_t
@@ -320,6 +322,30 @@ roc_model_is_cn10kb(void)
 	return roc_model->flag & ROC_MODEL_CN103xx;
 }
 
+static inline uint64_t
+roc_model_is_cn20ka(void)
+{
+	return roc_model->flag & ROC_MODEL_CN206xx;
+}
+
+static inline uint64_t
+roc_model_is_cn20ka_a0(void)
+{
+	return roc_model->flag & ROC_MODEL_CN206xx_A0;
+}
+
+static inline uint64_t
+roc_model_is_cnf20ka(void)
+{
+	return roc_model->flag & ROC_MODEL_CNF205xxN;
+}
+
+static inline uint64_t
+roc_model_is_cnf20ka_a0(void)
+{
+	return roc_model->flag & ROC_MODEL_CNF205xxN_A0;
+}
+
 static inline bool
 roc_env_is_hw(void)
 {
-- 
2.25.1


  reply	other threads:[~2025-03-21 10:04 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-21 10:03 [PATCH 1/3] common/cnxk: update steer rule mbox for cn20k Rahul Bhansali
2025-03-21 10:03 ` Rahul Bhansali [this message]
2025-03-21 10:03 ` [PATCH 3/3] net/cnxk: update IP header of reassembled packets Rahul Bhansali

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=20250321100343.1081664-2-rbhansali@marvell.com \
    --to=rbhansali@marvell.com \
    --cc=dev@dpdk.org \
    --cc=hkalra@marvell.com \
    --cc=jerinj@marvell.com \
    --cc=kirankumark@marvell.com \
    --cc=ndabilpuram@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).