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 v2 04/18] common/cnxk: update CPT RXC structures
Date: Tue, 17 Feb 2026 11:09:29 +0530 [thread overview]
Message-ID: <20260217053943.2748100-4-rbhansali@marvell.com> (raw)
In-Reply-To: <20260217053943.2748100-1-rbhansali@marvell.com>
Updates CPT RXC SGs and frag info structures as per
CN20k and CN10k platforms.
Signed-off-by: Rahul Bhansali <rbhansali@marvell.com>
---
Changes in v2: Updated commit message.
drivers/common/cnxk/hw/cpt.h | 143 +++++++++++++++++++---------
drivers/common/cnxk/roc_cpt_debug.c | 2 +-
2 files changed, 101 insertions(+), 44 deletions(-)
diff --git a/drivers/common/cnxk/hw/cpt.h b/drivers/common/cnxk/hw/cpt.h
index 727cee07b4..6e577b6277 100644
--- a/drivers/common/cnxk/hw/cpt.h
+++ b/drivers/common/cnxk/hw/cpt.h
@@ -549,30 +549,60 @@ union cpt_frag_info {
};
};
-struct cpt_frag_info_s {
- /* WORD 0 */
- union {
- uint64_t u64;
- struct {
- /* CPT HW swaps each 8B word implicitly */
- union cpt_frag_info f0;
- union cpt_frag_info f1;
- union cpt_frag_info f2;
- union cpt_frag_info f3;
- };
- } w0;
+union cpt_rxc_frag_info_u {
+ struct cpt_frag_info_s {
+ /* WORD 0 */
+ union {
+ uint64_t u64;
+ struct {
+ /* CPT HW swaps each 8B word implicitly */
+ union cpt_frag_info f3;
+ union cpt_frag_info f2;
+ union cpt_frag_info f1;
+ union cpt_frag_info f0;
+ };
+ } w0;
- /* WORD 1 */
- union {
- uint64_t u64;
- struct {
- /* CPT HW swaps each 8B word implicitly */
- uint16_t frag_size0;
- uint16_t frag_size1;
- uint16_t frag_size2;
- uint16_t frag_size3;
- };
- } w1;
+ /* WORD 1 */
+ union {
+ uint64_t u64;
+ struct {
+ /* CPT HW swaps each 8B word implicitly */
+ uint16_t frag_size3;
+ uint16_t frag_size2;
+ uint16_t frag_size1;
+ uint16_t frag_size0;
+ };
+ } w1;
+ } s;
+
+ struct cpt_cn10k_frag_info_s {
+ /* WORD 0 */
+ union {
+ uint64_t u64;
+ struct {
+ /* CPT HW swaps each 8B word implicitly */
+ union cpt_frag_info f0;
+ union cpt_frag_info f1;
+ union cpt_frag_info f2;
+ union cpt_frag_info f3;
+ };
+ } w0;
+
+ /* WORD 1 */
+ union {
+ uint64_t u64;
+ struct {
+ /* CPT HW swaps each 8B word implicitly */
+ uint16_t frag_size0;
+ uint16_t frag_size1;
+ uint16_t frag_size2;
+ uint16_t frag_size3;
+ };
+ } w1;
+ } cn10k;
+
+ uint64_t u64[2];
};
/* CPT rxc pointer info structure */
@@ -591,29 +621,56 @@ struct cpt_rxc_ptr_info_s {
};
/* CPT rxc scatter/gather subdescriptor structure */
-struct cpt_rxc_sg_s {
- /* WORD 0 */
- union {
- uint64_t u64;
- struct {
- uint16_t seg1_size;
- uint16_t seg2_size;
- uint16_t seg3_size;
- uint16_t segs : 2;
- uint16_t nxt_fst_frag : 3;
- uint16_t blk_sz : 4;
- uint16_t rsvd_63_57 : 7;
- };
- } w0;
+union cpt_rxc_sg_u {
+ struct cpt_rxc_sg_s {
+ /* WORD 0 */
+ union {
+ uint64_t u64;
+ struct {
+ uint16_t rsvd_63_57 : 7;
+ uint16_t blk_sz : 4;
+ uint16_t nxt_fst_frag : 3;
+ uint16_t segs : 2;
+ uint16_t seg3_size;
+ uint16_t seg2_size;
+ uint16_t seg1_size;
+ };
+ } w0;
- /* WORD 1 */
- uint64_t seg1_ptr;
+ /* WORD 1 */
+ uint64_t seg1_ptr;
- /* WORD 2 */
- uint64_t seg2_ptr;
+ /* WORD 2 */
+ uint64_t seg2_ptr;
+
+ /* WORD 3 */
+ uint64_t seg3_ptr;
+ } s;
+
+ struct cpt_cn10k_rxc_sg_s {
+ /* WORD 0 */
+ union {
+ uint64_t u64;
+ struct {
+ uint16_t seg1_size;
+ uint16_t seg2_size;
+ uint16_t seg3_size;
+ uint16_t segs : 2;
+ uint16_t rsvd_63_50 : 14;
+ };
+ } w0;
+
+ /* WORD 1 */
+ uint64_t seg1_ptr;
+
+ /* WORD 2 */
+ uint64_t seg2_ptr;
+
+ /* WORD 3 */
+ uint64_t seg3_ptr;
+ } cn10k;
- /* WORD 3 */
- uint64_t seg3_ptr;
+ uint64_t u64[4];
};
union cpt_fc_write_s {
diff --git a/drivers/common/cnxk/roc_cpt_debug.c b/drivers/common/cnxk/roc_cpt_debug.c
index 28aedf088e..3b3e678c20 100644
--- a/drivers/common/cnxk/roc_cpt_debug.c
+++ b/drivers/common/cnxk/roc_cpt_debug.c
@@ -125,7 +125,7 @@ cpt_cnxk_parse_hdr_dump(FILE *file, const struct cpt_parse_hdr_s *cpth)
static inline void
cpt_cn10k_parse_hdr_dump(FILE *file, const struct cpt_cn10k_parse_hdr_s *cpth)
{
- struct cpt_frag_info_s *frag_info;
+ struct cpt_cn10k_frag_info_s *frag_info;
uint32_t offset;
uint64_t *slot;
--
2.34.1
next prev parent reply other threads:[~2026-02-17 5:40 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-17 5:39 [PATCH v2 01/18] common/cnxk: fix engine capabilities fetch logic Rahul Bhansali
2026-02-17 5:39 ` [PATCH v2 02/18] common/cnxk: remove dependency on cryptodev for RXC Rahul Bhansali
2026-02-17 5:39 ` [PATCH v2 03/18] common/cnxk: support inbound pdb configuration Rahul Bhansali
2026-02-17 5:39 ` Rahul Bhansali [this message]
2026-02-17 5:39 ` [PATCH v2 05/18] common/cnxk: update inline profile ID for cn20k Rahul Bhansali
-- strict thread matches above, loose matches on Subject: below --
2026-01-28 6:02 [PATCH 01/18] common/cnxk: fix engine capabilities fetch logic Rahul Bhansali
2026-02-17 5:43 ` [PATCH v2 " Rahul Bhansali
2026-02-17 5:43 ` [PATCH v2 04/18] common/cnxk: update CPT RXC structures 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=20260217053943.2748100-4-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