[v2,01/13] common/cnxk: set MTU size on SDP based on SoC type
Checks
Commit Message
From: Sathesh Edara <sedara@marvell.com>
Set maximum frame size on SDP NIX side to 16KB for T93 A0-B0,
F95N A0 and F95O A0 SOC type. Rest of the SoCs SDP NIX to 64KB.
Signed-off-by: Sathesh Edara <sedara@marvell.com>
---
v2:
- Add fixes line in patch 1/13
- Squash patch 8/13 to 7/13 as 7/13 is the patch that introduced the bug
- Add another patch to handle HARD SA expiry event for outbound inline.
drivers/common/cnxk/hw/nix.h | 1 +
drivers/common/cnxk/roc_errata.h | 8 ++++++++
drivers/common/cnxk/roc_model.h | 12 ++++++++++++
drivers/common/cnxk/roc_nix.c | 5 ++++-
4 files changed, 25 insertions(+), 1 deletion(-)
@@ -2118,6 +2118,7 @@ struct nix_lso_format {
#define NIX_CN9K_MAX_HW_FRS 9212UL
#define NIX_LBK_MAX_HW_FRS 65535UL
#define NIX_SDP_MAX_HW_FRS 65535UL
+#define NIX_SDP_16K_HW_FRS 16380UL
#define NIX_RPM_MAX_HW_FRS 16380UL
#define NIX_MIN_HW_FRS 60UL
@@ -90,4 +90,12 @@ roc_errata_nix_no_meta_aura(void)
return roc_model_is_cn10ka_a0();
}
+/* Errata IPBUNIXTX-35039 */
+static inline bool
+roc_errata_nix_sdp_send_has_mtu_size_16k(void)
+{
+ return (roc_model_is_cnf95xxn_a0() || roc_model_is_cnf95xxo_a0() ||
+ roc_model_is_cn96_a0() || roc_model_is_cn96_b0());
+}
+
#endif /* _ROC_ERRATA_H_ */
@@ -140,6 +140,12 @@ roc_model_is_cn96_ax(void)
return (roc_model->flag & ROC_MODEL_CN96xx_Ax);
}
+static inline uint64_t
+roc_model_is_cn96_b0(void)
+{
+ return (roc_model->flag & ROC_MODEL_CN96xx_B0);
+}
+
static inline uint64_t
roc_model_is_cn96_cx(void)
{
@@ -170,6 +176,12 @@ roc_model_is_cnf95xxn_b0(void)
return roc_model->flag & ROC_MODEL_CNF95xxN_B0;
}
+static inline uint64_t
+roc_model_is_cnf95xxo_a0(void)
+{
+ return roc_model->flag & ROC_MODEL_CNF95xxO_A0;
+}
+
static inline uint16_t
roc_model_is_cn95xxn_a0(void)
{
@@ -127,8 +127,11 @@ roc_nix_max_pkt_len(struct roc_nix *roc_nix)
{
struct nix *nix = roc_nix_to_nix_priv(roc_nix);
- if (roc_nix_is_sdp(roc_nix))
+ if (roc_nix_is_sdp(roc_nix)) {
+ if (roc_errata_nix_sdp_send_has_mtu_size_16k())
+ return NIX_SDP_16K_HW_FRS;
return NIX_SDP_MAX_HW_FRS;
+ }
if (roc_model_is_cn9k())
return NIX_CN9K_MAX_HW_FRS;