diff mbox series

[v2,1/8] common/cnxk: use different macros for sdp and lbk max frames

Message ID 1631975519-30924-2-git-send-email-skoteshwar@marvell.com (mailing list archive)
State Superseded, archived
Delegated to: Jerin Jacob
Headers show
Series Add TM Support for CN9K and CN10K | expand

Checks

Context Check Description
ci/iol-testing warning apply patch failure
ci/checkpatch success coding style OK

Commit Message

Satha Koteswara Rao Kottidi Sept. 18, 2021, 2:31 p.m. UTC
From: Satha Rao <skoteshwar@marvell.com>

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>
---
 drivers/common/cnxk/hw/nix.h  | 1 +
 drivers/common/cnxk/roc_nix.c | 5 ++++-
 2 files changed, 5 insertions(+), 1 deletion(-)

Comments

Jerin Jacob Sept. 21, 2021, 6:35 a.m. UTC | #1
On Sat, Sep 18, 2021 at 8:02 PM <skoteshwar@marvell.com> wrote:
>
> From: Satha Rao <skoteshwar@marvell.com>
>
> For SDP interface all platforms supports up to 65535 frame size.
> Updated api with new check for SDP interface.

Please change the subject to
common/cnxk: set appropriate max frame size for SDP and LBK
or so



>
> Signed-off-by: Satha Rao <skoteshwar@marvell.com>
> ---
>  drivers/common/cnxk/hw/nix.h  | 1 +
>  drivers/common/cnxk/roc_nix.c | 5 ++++-
>  2 files changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/common/cnxk/hw/nix.h b/drivers/common/cnxk/hw/nix.h
> index 6b86002..a0ffd25 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 23d508b..d1e8c2d 100644
> --- a/drivers/common/cnxk/roc_nix.c
> +++ b/drivers/common/cnxk/roc_nix.c
> @@ -113,10 +113,13 @@
>  {
>         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;
> --
> 1.8.3.1
>
diff mbox series

Patch

diff --git a/drivers/common/cnxk/hw/nix.h b/drivers/common/cnxk/hw/nix.h
index 6b86002..a0ffd25 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 23d508b..d1e8c2d 100644
--- a/drivers/common/cnxk/roc_nix.c
+++ b/drivers/common/cnxk/roc_nix.c
@@ -113,10 +113,13 @@ 
 {
 	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;