Re: [PATCH mlx5-next 6/9] RDMA/mlx5: Use represntor E-Switch when getting netdev and metadata

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
> 




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux