common/cnxk: set appropriate max frame size for SDP and LBK
authorSatha Rao <skoteshwar@marvell.com>
Wed, 22 Sep 2021 06:11:41 +0000 (02:11 -0400)
committerJerin Jacob <jerinj@marvell.com>
Tue, 28 Sep 2021 10:06:39 +0000 (12:06 +0200)
For SDP interface all platforms supports up to 65535 frame size.
Updated API with new check for SDP interface.

Signed-off-by: Satha Rao <skoteshwar@marvell.com>
Acked-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
drivers/common/cnxk/hw/nix.h
drivers/common/cnxk/roc_nix.c

index 6b86002..a0ffd25 100644 (file)
@@ -2102,6 +2102,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_RPM_MAX_HW_FRS  16380UL
 #define NIX_MIN_HW_FRS     60UL
 
index 23d508b..d1e8c2d 100644 (file)
@@ -113,10 +113,13 @@ 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))
+               return NIX_SDP_MAX_HW_FRS;
+
        if (roc_model_is_cn9k())
                return NIX_CN9K_MAX_HW_FRS;
 
-       if (nix->lbk_link || roc_nix_is_sdp(roc_nix))
+       if (nix->lbk_link)
                return NIX_LBK_MAX_HW_FRS;
 
        return NIX_RPM_MAX_HW_FRS;