From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8D0F0C3A5A9 for ; Mon, 4 May 2020 11:13:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5C62F2073B for ; Mon, 4 May 2020 11:13:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1588590827; bh=yseKXoeat9BlT6tM4za/vRGoIcfaSF4iVdj9Ua9rNBQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-ID:From; b=JBiyUaI4eMge4go1iIXpLXpByloukPY4myLHTUpqjXdWNrW7PYFoQi9iRHNPU1tB4 PDNJCk52zETaWoYJRTAagRMJV9x0z2RdFatmMd9ltt5lymdHqMTLwTNGzvdGk2Nkf6 j4oso8THRq7sA8HA6M5tLBJIUfY+3Fxhaytz+oTU= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726756AbgEDLNq (ORCPT ); Mon, 4 May 2020 07:13:46 -0400 Received: from mail.kernel.org ([198.145.29.99]:32974 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726445AbgEDLNq (ORCPT ); Mon, 4 May 2020 07:13:46 -0400 Received: from localhost (unknown [213.57.247.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 950C5206D9; Mon, 4 May 2020 11:13:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1588590826; bh=yseKXoeat9BlT6tM4za/vRGoIcfaSF4iVdj9Ua9rNBQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=S3GN/te9+TGnfBoQiShggMzeUVXUz9EJb8L3eyfhTpPL7HXa5lfJKW17KY/G3M1gq kNZYIwe6un4lIES3+wVyHf4iguNpGt7o5yz4DcgMXWTnLlG9jhacUfMiz451mzIGAK X+SMP9vJdqkOz5rn8XMTdiFgSGI8naDdeOEPIfzY= Date: Mon, 4 May 2020 14:13:42 +0300 From: Leon Romanovsky To: Gal Pressman Cc: Doug Ledford , Jason Gunthorpe , linux-rdma@vger.kernel.org Subject: Re: [PATCH rdma-next] RDMA/ucma: Return stable IB device index as identifier Message-ID: <20200504111342.GF111287@unreal> References: <20200430152939.77967-1-leon@kernel.org> <694f5565-acdd-0863-092c-b78409f1b9c3@amazon.com> <20200504110929.GD111287@unreal> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200504110929.GD111287@unreal> Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org On Mon, May 04, 2020 at 02:09:29PM +0300, Leon Romanovsky wrote: > On Mon, May 04, 2020 at 02:01:23PM +0300, Gal Pressman wrote: > > On 30/04/2020 18:29, Leon Romanovsky wrote: > > > From: Leon Romanovsky > > > > > > The librdmacm uses node_guid as identifier to correlate between > > > IB devices and CMA devices. However FW resets cause to such > > > "connection" to be lost and require from the user to restart > > > its application. > > > > > > Extend UCMA to return IB device index, which is stable identifier. > > > > > > Signed-off-by: Leon Romanovsky > > > --- > > > diff --git a/include/uapi/rdma/rdma_user_cm.h b/include/uapi/rdma/rdma_user_cm.h > > > index e545f2de1e13..14d48b462d91 100644 > > > --- a/include/uapi/rdma/rdma_user_cm.h > > > +++ b/include/uapi/rdma/rdma_user_cm.h > > > @@ -168,6 +168,7 @@ struct rdma_ucm_query_route_resp { > > > __u32 num_paths; > > > __u8 port_num; > > > __u8 reserved[3]; > > > + __u32 ibdev_index; > > > }; > > > > > > struct rdma_ucm_query_addr_resp { > > > @@ -179,6 +180,7 @@ struct rdma_ucm_query_addr_resp { > > > __u16 dst_size; > > > struct __kernel_sockaddr_storage src_addr; > > > struct __kernel_sockaddr_storage dst_addr; > > > + __u32 ibdev_index; > > > }; > > > > Should both these structs size be aligned to 8 bytes? > > Are you asking about 8 bytes or 64 bytes? > Because u32 is aligned to 8 bytes. Sorry, of course, you are right. > > Thanks