From patchwork Wed Nov 21 06:58:11 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Honggang LI X-Patchwork-Id: 10692055 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id EFCFB13AD for ; Wed, 21 Nov 2018 06:58:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DB6E42B3B9 for ; Wed, 21 Nov 2018 06:58:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CF5C42B48F; Wed, 21 Nov 2018 06:58:39 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7F15A2B3B9 for ; Wed, 21 Nov 2018 06:58:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728221AbeKURby (ORCPT ); Wed, 21 Nov 2018 12:31:54 -0500 Received: from mx1.redhat.com ([209.132.183.28]:48366 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727343AbeKURby (ORCPT ); Wed, 21 Nov 2018 12:31:54 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id A52FD3082134; Wed, 21 Nov 2018 06:58:38 +0000 (UTC) Received: from lhg.nay.redhat.com (unknown [10.66.129.124]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3CF9F17A9C; Wed, 21 Nov 2018 06:58:36 +0000 (UTC) From: Honggang LI To: hal@dev.mellanox.co.il Cc: linux-rdma@vger.kernel.org, Honggang Li Subject: [opensm patch 6/6] opensm/osm_resp.c: Fix an error in swapping directed route source and destination lid Date: Wed, 21 Nov 2018 14:58:11 +0800 Message-Id: <20181121065811.21806-6-honli@redhat.com> In-Reply-To: <20181121065811.21806-5-honli@redhat.com> References: <20181121065811.21806-1-honli@redhat.com> <20181121065811.21806-2-honli@redhat.com> <20181121065811.21806-3-honli@redhat.com> <20181121065811.21806-4-honli@redhat.com> <20181121065811.21806-5-honli@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.42]); Wed, 21 Nov 2018 06:58:38 +0000 (UTC) Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Honggang Li Signed-off-by: Honggang Li --- 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; memcpy(&p_dest_smp->data, p_payload, IB_SMP_DATA_SIZE); Exit: