Re: [opensm patch 6/6] opensm/osm_resp.c: Fix an error in swapping directed route source and destination lid

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

 



On 11/21/2018 1:58 AM, Honggang LI wrote:
> From: Honggang Li <honli@xxxxxxxxxx>
> 
> Signed-off-by: Honggang Li <honli@xxxxxxxxxx>
> ---
>  opensm/osm_resp.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/opensm/osm_resp.c b/opensm/osm_resp.c
> index 3f270e66..42015564 100644
> --- a/opensm/osm_resp.c
> +++ b/opensm/osm_resp.c
> @@ -85,8 +85,8 @@ static void resp_make_resp_smp(IN osm_sm_t * sm, IN const ib_smp_t * p_src_smp,
>  	if (p_src_smp->mgmt_class == IB_MCLASS_SUBN_DIR)
>  		p_dest_smp->status |= IB_SMP_DIRECTION;
>  
> -	p_dest_smp->dr_dlid = p_dest_smp->dr_slid;
> -	p_dest_smp->dr_slid = p_dest_smp->dr_dlid;
> +	p_dest_smp->dr_dlid = p_src_smp->dr_slid;
> +	p_dest_smp->dr_slid = p_src_smp->dr_dlid;

Please elaborate on why you think that this change is needed. Is it just
by code inspection where a number of dest SMP parameters are updated
from their src equivalents ?

Earlier in this code block, the src SMP is copied to the dest SMP so
that flipping the dest DR LIDs seems just fine to me and has worked for
more than the last 10-15 years.

>  	memcpy(&p_dest_smp->data, p_payload, IB_SMP_DATA_SIZE);
>  
>  Exit:
> 



[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