From: Satha Rao Date: Wed, 22 Sep 2021 06:11:41 +0000 (-0400) Subject: common/cnxk: set appropriate max frame size for SDP and LBK X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=457d07749577d8990b052e8eb79103cae0a41f59;p=dpdk.git common/cnxk: set appropriate max frame size for SDP and LBK For SDP interface all platforms supports up to 65535 frame size. Updated API with new check for SDP interface. Signed-off-by: Satha Rao Acked-by: Nithin Dabilpuram --- diff --git a/drivers/common/cnxk/hw/nix.h b/drivers/common/cnxk/hw/nix.h index 6b86002ead..a0ffd25660 100644 --- a/drivers/common/cnxk/hw/nix.h +++ b/drivers/common/cnxk/hw/nix.h @@ -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 diff --git a/drivers/common/cnxk/roc_nix.c b/drivers/common/cnxk/roc_nix.c index 23d508b941..d1e8c2d4af 100644 --- a/drivers/common/cnxk/roc_nix.c +++ b/drivers/common/cnxk/roc_nix.c @@ -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;