[1/2] common/cnxk: support SPI to SA translation action

Message ID 20230313052403.230953-1-psatheesh@marvell.com (mailing list archive)
State Accepted, archived
Delegated to: Jerin Jacob
Headers
Series [1/2] common/cnxk: support SPI to SA translation action |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Satheesh Paul Antonysamy March 13, 2023, 5:24 a.m. UTC
  From: Kiran Kumar K <kirankumark@marvell.com>

Support SPI to SA index translation action with
SPI bits MS_28_25.

Signed-off-by: Kiran Kumar K <kirankumark@marvell.com>
Reviewed-by: Satheesh Paul <psatheesh@marvell.com>
Reviewed-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
---
 drivers/common/cnxk/roc_npc.c | 4 ++++
 drivers/common/cnxk/roc_npc.h | 1 +
 2 files changed, 5 insertions(+)
  

Comments

Jerin Jacob April 4, 2023, 7:30 a.m. UTC | #1
On Mon, Mar 13, 2023 at 10:54 AM <psatheesh@marvell.com> wrote:
>
> From: Kiran Kumar K <kirankumark@marvell.com>
>
> Support SPI to SA index translation action with
> SPI bits MS_28_25.
>
> Signed-off-by: Kiran Kumar K <kirankumark@marvell.com>
> Reviewed-by: Satheesh Paul <psatheesh@marvell.com>
> Reviewed-by: Nithin Dabilpuram <ndabilpuram@marvell.com>


Applied to dpdk-next-net-mrvl/for-next-net. Thanks


> ---
>  drivers/common/cnxk/roc_npc.c | 4 ++++
>  drivers/common/cnxk/roc_npc.h | 1 +
>  2 files changed, 5 insertions(+)
>
> diff --git a/drivers/common/cnxk/roc_npc.c b/drivers/common/cnxk/roc_npc.c
> index 47536c8ce8..7228cffb57 100644
> --- a/drivers/common/cnxk/roc_npc.c
> +++ b/drivers/common/cnxk/roc_npc.c
> @@ -438,6 +438,10 @@ npc_parse_spi_to_sa_action(struct roc_npc *roc_npc, const struct roc_npc_action
>                 vtag_act.act.vtag1_lid = ROC_NPC_SEC_ACTION_ALG2;
>                 break;
>         case ROC_NPC_SEC_ACTION_ALG3:
> +               vtag_act.act.vtag1_valid = false;
> +               vtag_act.act.vtag1_lid = ROC_NPC_SEC_ACTION_ALG3;
> +               break;
> +       case ROC_NPC_SEC_ACTION_ALG4:
>                 vtag_act.act.vtag1_valid = false;
>                 vtag_act.act.vtag1_lid = 0;
>                 mbox = inl_dev->dev.mbox;
> diff --git a/drivers/common/cnxk/roc_npc.h b/drivers/common/cnxk/roc_npc.h
> index 61d0628f5f..26a43c12cb 100644
> --- a/drivers/common/cnxk/roc_npc.h
> +++ b/drivers/common/cnxk/roc_npc.h
> @@ -235,6 +235,7 @@ enum roc_npc_sec_action_alg {
>         ROC_NPC_SEC_ACTION_ALG1,
>         ROC_NPC_SEC_ACTION_ALG2,
>         ROC_NPC_SEC_ACTION_ALG3,
> +       ROC_NPC_SEC_ACTION_ALG4,
>  };
>
>  struct roc_npc_sec_action {
> --
> 2.39.2
>
  

Patch

diff --git a/drivers/common/cnxk/roc_npc.c b/drivers/common/cnxk/roc_npc.c
index 47536c8ce8..7228cffb57 100644
--- a/drivers/common/cnxk/roc_npc.c
+++ b/drivers/common/cnxk/roc_npc.c
@@ -438,6 +438,10 @@  npc_parse_spi_to_sa_action(struct roc_npc *roc_npc, const struct roc_npc_action
 		vtag_act.act.vtag1_lid = ROC_NPC_SEC_ACTION_ALG2;
 		break;
 	case ROC_NPC_SEC_ACTION_ALG3:
+		vtag_act.act.vtag1_valid = false;
+		vtag_act.act.vtag1_lid = ROC_NPC_SEC_ACTION_ALG3;
+		break;
+	case ROC_NPC_SEC_ACTION_ALG4:
 		vtag_act.act.vtag1_valid = false;
 		vtag_act.act.vtag1_lid = 0;
 		mbox = inl_dev->dev.mbox;
diff --git a/drivers/common/cnxk/roc_npc.h b/drivers/common/cnxk/roc_npc.h
index 61d0628f5f..26a43c12cb 100644
--- a/drivers/common/cnxk/roc_npc.h
+++ b/drivers/common/cnxk/roc_npc.h
@@ -235,6 +235,7 @@  enum roc_npc_sec_action_alg {
 	ROC_NPC_SEC_ACTION_ALG1,
 	ROC_NPC_SEC_ACTION_ALG2,
 	ROC_NPC_SEC_ACTION_ALG3,
+	ROC_NPC_SEC_ACTION_ALG4,
 };
 
 struct roc_npc_sec_action {