On 3/11/21 7:33 PM, Jason Gunthorpe wrote: > On Wed, Mar 10, 2021 at 11:09:12PM -0800, Saeed Mahameed wrote: >> From: Mark Bloch <mbloch@xxxxxxxxxx> >> >> Now that a pointer to the managing E-Switch is stored in the representor >> use it. >> >> Signed-off-by: Mark Bloch <mbloch@xxxxxxxxxx> >> Reviewed-by: Saeed Mahameed <saeedm@xxxxxxxxxx> >> Signed-off-by: Saeed Mahameed <saeedm@xxxxxxxxxx> >> --- >> drivers/infiniband/hw/mlx5/fs.c | 2 +- >> drivers/infiniband/hw/mlx5/ib_rep.c | 2 +- >> drivers/infiniband/hw/mlx5/main.c | 3 +-- >> 3 files changed, 3 insertions(+), 4 deletions(-) > > Spelling error in the subject > > >> diff --git a/drivers/infiniband/hw/mlx5/fs.c b/drivers/infiniband/hw/mlx5/fs.c >> index 25da0b05b4e2..01370d9a871a 100644 >> --- a/drivers/infiniband/hw/mlx5/fs.c >> +++ b/drivers/infiniband/hw/mlx5/fs.c >> @@ -879,7 +879,7 @@ static void mlx5_ib_set_rule_source_port(struct mlx5_ib_dev *dev, >> misc_parameters_2); >> >> MLX5_SET(fte_match_set_misc2, misc, metadata_reg_c_0, >> - mlx5_eswitch_get_vport_metadata_for_match(esw, >> + mlx5_eswitch_get_vport_metadata_for_match(rep->esw, >> rep->vport)); > > Why not change the esw reference above too? The if that checks if metadata is enabled uses the eswitch that rule is going to be inserted to. The representor has a pointer to the eswitch it was created on. Mark > > Seems Ok otherwise > > Acked-by: Jason Gunthorpe <jgg@xxxxxxxxxx> > > Jason >