net/mlx5/hws: fix the valid bit of E-Switch owner

Message ID 20240729140655.1732360-1-bingz@nvidia.com (mailing list archive)
State New
Delegated to: Thomas Monjalon
Headers
Series net/mlx5/hws: fix the valid bit of E-Switch owner |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/loongarch-compilation success Compilation OK
ci/loongarch-unit-testing success Unit Testing PASS
ci/Intel-compilation success Compilation OK
ci/intel-Testing success Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/github-robot: build success github build: passed
ci/iol-marvell-Functional success Functional Testing PASS
ci/intel-Functional success Functional PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-abi-testing success Testing PASS
ci/iol-unit-amd64-testing success Testing PASS
ci/iol-sample-apps-testing success Testing PASS
ci/iol-broadcom-Functional success Functional Testing PASS
ci/iol-unit-arm64-testing success Testing PASS
ci/iol-compile-amd64-testing success Testing PASS
ci/iol-compile-arm64-testing success Testing PASS

Commit Message

Bing Zhao July 29, 2024, 2:06 p.m. UTC
The 'eswitch_owner_vhca_id_valid' only depends on the
'merged_eswitch' capability. And it should be set for all
vport actions.

Fixes: ac8415cfe760 ("net/mlx5/hws: set E-Switch owner VHC ID valid")
Cc: erezsh@nvidia.com

Signed-off-by: Bing Zhao <bingz@nvidia.com>
Reviewed-by: Alex Vesker <valex@nvidia.com>
---
 drivers/net/mlx5/hws/mlx5dr_action.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
  

Comments

Dariusz Sosnowski July 29, 2024, 3:54 p.m. UTC | #1
> -----Original Message-----
> From: Bing Zhao <bingz@nvidia.com>
> Sent: Monday, July 29, 2024 16:07
> To: Dariusz Sosnowski <dsosnowski@nvidia.com>; Slava Ovsiienko
> <viacheslavo@nvidia.com>; dev@dpdk.org; Raslan Darawsheh
> <rasland@nvidia.com>
> Cc: Ori Kam <orika@nvidia.com>; Suanming Mou <suanmingm@nvidia.com>;
> Matan Azrad <matan@nvidia.com>; Erez Shitrit <erezsh@nvidia.com>; Alex
> Vesker <valex@nvidia.com>
> Subject: [PATCH] net/mlx5/hws: fix the valid bit of E-Switch owner
> 
> The 'eswitch_owner_vhca_id_valid' only depends on the 'merged_eswitch'
> capability. And it should be set for all vport actions.
> 
> Fixes: ac8415cfe760 ("net/mlx5/hws: set E-Switch owner VHC ID valid")
> Cc: erezsh@nvidia.com
> 
> Signed-off-by: Bing Zhao <bingz@nvidia.com>
> Reviewed-by: Alex Vesker <valex@nvidia.com>

Acked-by: Dariusz Sosnowski <dsosnowski@nvidia.com>

Best regards,
Dariusz Sosnowski
  
Thomas Monjalon July 29, 2024, 4:27 p.m. UTC | #2
29/07/2024 17:54, Dariusz Sosnowski:
> > 
> > The 'eswitch_owner_vhca_id_valid' only depends on the 'merged_eswitch'
> > capability. And it should be set for all vport actions.
> > 
> > Fixes: ac8415cfe760 ("net/mlx5/hws: set E-Switch owner VHC ID valid")
> > Cc: erezsh@nvidia.com
> > 
> > Signed-off-by: Bing Zhao <bingz@nvidia.com>
> > Reviewed-by: Alex Vesker <valex@nvidia.com>
> 
> Acked-by: Dariusz Sosnowski <dsosnowski@nvidia.com>

Applied, thanks.
  

Patch

diff --git a/drivers/net/mlx5/hws/mlx5dr_action.c b/drivers/net/mlx5/hws/mlx5dr_action.c
index 8f6be37818..3fceb96de2 100644
--- a/drivers/net/mlx5/hws/mlx5dr_action.c
+++ b/drivers/net/mlx5/hws/mlx5dr_action.c
@@ -826,7 +826,7 @@  mlx5dr_action_fixup_stc_attr(struct mlx5dr_context *ctx,
 			fixup_stc_attr->vport.vport_num = 0;
 			fixup_stc_attr->vport.esw_owner_vhca_id = stc_attr->vport.esw_owner_vhca_id;
 			fixup_stc_attr->vport.eswitch_owner_vhca_id_valid =
-				ctx->caps->merged_eswitch;
+				stc_attr->vport.eswitch_owner_vhca_id_valid;
 		}
 		use_fixup = true;
 		break;
@@ -1057,6 +1057,7 @@  static void mlx5dr_action_fill_stc_attr(struct mlx5dr_action *action,
 		attr->action_type = MLX5_IFC_STC_ACTION_TYPE_JUMP_TO_VPORT;
 		attr->vport.vport_num = action->vport.vport_num;
 		attr->vport.esw_owner_vhca_id =	action->vport.esw_owner_vhca_id;
+		attr->vport.eswitch_owner_vhca_id_valid = action->ctx->caps->merged_eswitch;
 		break;
 	case MLX5DR_ACTION_TYP_POP_VLAN:
 		attr->action_type = MLX5_IFC_STC_ACTION_TYPE_REMOVE_WORDS;