From patchwork Mon Jul 23 16:48:15 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 10540599 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 696B214BC for ; Mon, 23 Jul 2018 16:48:20 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 59B0228C64 for ; Mon, 23 Jul 2018 16:48:20 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4D42128CCA; Mon, 23 Jul 2018 16:48:20 +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.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI,T_DKIM_INVALID 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 E8F9528CA9 for ; Mon, 23 Jul 2018 16:48:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388563AbeGWRuW (ORCPT ); Mon, 23 Jul 2018 13:50:22 -0400 Received: from esa3.hgst.iphmx.com ([216.71.153.141]:54919 "EHLO esa3.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388283AbeGWRuW (ORCPT ); Mon, 23 Jul 2018 13:50:22 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1532364498; x=1563900498; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=SVJ4dat4LJtFCQJsWTN983UOO6ZJ3m1jRO5fXLA0f20=; b=QcNOsRydZqG+uXx1pMdPny2aBrbG72eKuqTKoDbDc7U2r6PEHIr5y1z7 Bv1Iow2qnGNAqmj38hhhRRrSxd6ZuRdv8rbKxwGwOqGRpGlB9v1DEj9+q 01JuP6I7fMMs5szV4CKJR/90I2Athb4Xgzu/Qo/MZ/YzfLjVUSmnxp8Qy aIxVF0krEchyFk/uTz1FCw8l6mMwpQzmiaFQ9sIWnuXhiyG9RVEBBibEv wF5zNffBD0AKJPCUtM76J5YhwSBOUZj0QwKFDSvi2wphDequhjz6EupKZ +TpXZyGchjGeNpZOeNwwriXIzu7+nAVpcOFkNCi5lQYgPw2KIcEjW62mx Q==; X-IronPort-AV: E=Sophos;i="5.51,393,1526313600"; d="scan'208";a="88094278" Received: from h199-255-45-15.hgst.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 24 Jul 2018 00:48:17 +0800 Received: from uls-op-cesaip01.wdc.com ([10.248.3.36]) by uls-op-cesaep02.wdc.com with ESMTP; 23 Jul 2018 09:36:27 -0700 Received: from thinkpad-bart.sdcorp.global.sandisk.com ([10.111.67.248]) by uls-op-cesaip01.wdc.com with ESMTP; 23 Jul 2018 09:48:18 -0700 From: Bart Van Assche To: Jason Gunthorpe Cc: Doug Ledford , linux-rdma@vger.kernel.org, Daniel Ahlin , Bart Van Assche Subject: [PATCH 5/5] srp_daemon: Rename ib_path_rec.num_path Date: Mon, 23 Jul 2018 09:48:15 -0700 Message-Id: <20180723164815.26448-6-bart.vanassche@wdc.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180723164815.26448-1-bart.vanassche@wdc.com> References: <20180723164815.26448-1-bart.vanassche@wdc.com> 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 Make it clear what the meaning is of the highest bit of num_path. Signed-off-by: Bart Van Assche --- srp_daemon/srp_daemon.c | 2 +- srp_daemon/srp_ib_types.h | 12 +++++++----- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/srp_daemon/srp_daemon.c b/srp_daemon/srp_daemon.c index a8ff1bb5eff8..94d7c45bcd3e 100644 --- a/srp_daemon/srp_daemon.c +++ b/srp_daemon/srp_daemon.c @@ -2411,7 +2411,7 @@ static int get_lid(struct umad_resources *umad_res, union umad_gid *gid, path_rec->sgid = *gid; path_rec->dgid = *gid; - path_rec->num_path = 1; + path_rec->reversible_numpath = 1; path_rec->hop_flow_raw = htobe32(1 << 31); /* rawtraffic=1 hoplimit = 0 */ if (send_and_get(umad_res->portid, umad_res->agent, &out_mad, &in_mad, 0) < 0) diff --git a/srp_daemon/srp_ib_types.h b/srp_daemon/srp_ib_types.h index 0aacdd3efdc8..a5bd9dcabe6f 100644 --- a/srp_daemon/srp_ib_types.h +++ b/srp_daemon/srp_ib_types.h @@ -91,9 +91,12 @@ enum { * route between two end-points on a subnet. * * SYNOPSIS +* +* NOTES +* The role of this data structure is identical to the role of struct +* ibv_path_record in libibverbs/sa.h. */ -struct ib_path_rec -{ +struct ib_path_rec { uint8_t resv0[8]; union umad_gid dgid; union umad_gid sgid; @@ -101,7 +104,7 @@ struct ib_path_rec __be16 slid; __be32 hop_flow_raw; uint8_t tclass; - uint8_t num_path; + uint8_t reversible_numpath; /* reversible-7:7 num path-6:0 */ __be16 pkey; __be16 sl; uint8_t mtu; @@ -109,8 +112,7 @@ struct ib_path_rec uint8_t pkt_life; uint8_t preference; uint8_t resv2[6]; - -} PACK_SUFFIX4; +}; /****f* IBA Base: Types/umad_init_new