[PATCH 06/19] common/cnxk: add new mailbox to configure LSO alt flags
Nithin Dabilpuram
ndabilpuram at marvell.com
Mon Sep 1 09:30:22 CEST 2025
From: Satha Rao <skoteshwar at marvell.com>
LSO enahanced to support flags modification. Added new mbox to enable
this feature.
Signed-off-by: Satha Rao <skoteshwar at marvell.com>
---
drivers/common/cnxk/hw/nix.h | 46 ++++++++++++++++++++++++++++--------
1 file changed, 36 insertions(+), 10 deletions(-)
diff --git a/drivers/common/cnxk/hw/nix.h b/drivers/common/cnxk/hw/nix.h
index d16fa3b3ec..f5811ee1ab 100644
--- a/drivers/common/cnxk/hw/nix.h
+++ b/drivers/common/cnxk/hw/nix.h
@@ -2508,18 +2508,44 @@ struct nix_lso_format {
uint64_t sizem1 : 2;
uint64_t rsvd_14_15 : 2;
uint64_t alg : 3;
- uint64_t rsvd_19_63 : 45;
+ uint64_t alt_flags : 1;
+ uint64_t alt_flags_index : 2;
+ uint64_t shift : 3;
+ uint64_t rsvd_25_63 : 39;
};
-#define NIX_LSO_FIELD_MAX (8)
-#define NIX_LSO_FIELD_ALG_MASK GENMASK(18, 16)
-#define NIX_LSO_FIELD_SZ_MASK GENMASK(13, 12)
-#define NIX_LSO_FIELD_LY_MASK GENMASK(9, 8)
-#define NIX_LSO_FIELD_OFF_MASK GENMASK(7, 0)
-
-#define NIX_LSO_FIELD_MASK \
- (NIX_LSO_FIELD_OFF_MASK | NIX_LSO_FIELD_LY_MASK | \
- NIX_LSO_FIELD_SZ_MASK | NIX_LSO_FIELD_ALG_MASK)
+/* NIX LSO ALT_FLAGS field structure */
+typedef union nix_lso_alt_flg_format {
+ uint64_t u[2];
+
+ struct nix_lso_alt_flg_cfg {
+ /* NIX_AF_LSO_ALT_FLAGS_CFG */
+ uint64_t alt_msf_set : 16;
+ uint64_t alt_msf_mask : 16;
+ uint64_t alt_fsf_set : 16;
+ uint64_t alt_fsf_mask : 16;
+
+ /* NIX_AF_LSO_ALT_FLAGS_CFG1 */
+ uint64_t alt_lsf_set : 16;
+ uint64_t alt_lsf_mask : 16;
+ uint64_t alt_ssf_set : 16;
+ uint64_t alt_ssf_mask : 16;
+ } s;
+} nix_lso_alt_flg_format_t;
+
+#define NIX_LSO_FIELD_MAX (8)
+#define NIX_LSO_FIELD_SHIFT_MASK GENMASK(24, 22)
+#define NIX_LSO_FIELD_ALT_FLG_IDX_MASK GENMASK(21, 20)
+#define NIX_LSO_FIELD_ALT_FLG_MASK BIT_ULL(19)
+#define NIX_LSO_FIELD_ALG_MASK GENMASK(18, 16)
+#define NIX_LSO_FIELD_SZ_MASK GENMASK(13, 12)
+#define NIX_LSO_FIELD_LY_MASK GENMASK(9, 8)
+#define NIX_LSO_FIELD_OFF_MASK GENMASK(7, 0)
+
+#define NIX_LSO_FIELD_MASK \
+ (NIX_LSO_FIELD_OFF_MASK | NIX_LSO_FIELD_LY_MASK | NIX_LSO_FIELD_SZ_MASK | \
+ NIX_LSO_FIELD_ALG_MASK | NIX_LSO_FIELD_ALT_FLG_MASK | NIX_LSO_FIELD_ALT_FLG_IDX_MASK | \
+ NIX_LSO_FIELD_SHIFT_MASK)
#define NIX_CN9K_MAX_HW_FRS 9212UL
#define NIX_LBK_MAX_HW_FRS 65535UL
--
2.34.1
More information about the dev
mailing list