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=-11.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI, 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 062C6C433E0 for ; Thu, 25 Mar 2021 07:49:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id CC80361A13 for ; Thu, 25 Mar 2021 07:49:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229508AbhCYHtU (ORCPT ); Thu, 25 Mar 2021 03:49:20 -0400 Received: from mail.kernel.org ([198.145.29.99]:41654 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229619AbhCYHtF (ORCPT ); Thu, 25 Mar 2021 03:49:05 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 8042261574; Thu, 25 Mar 2021 07:49:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1616658545; bh=/JQYd6mC27MAlb+cNIvcwb8HZBaUE09MYG3eku/VEL0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=r3KBVOwrJFm1qkGhJuO67qMebjRmMNnTa96D0siLaig4BqcpGXil6ua4dJXVlQMdU GwGFduCfgZHs73NLWLlqCvmwzE5ybZrJwjPULaHWp52Eurq6WrqnHy2o9eP8IApguL g//tf4EERHO4irjJM5RD0gMXlZNZlqn4epO7OcMOk6WLmmYwGMzKwVZF6EV17Zekia d5K9lRCQoomXIF4sr7toswd41TpEEDveZGtnQ7lB2LyJKBvprveO9QFa9OrZtriuyL VjpKzQSXxSTDRgD9uBlD0m0FKKG2Nls1qEm7UfWwoHd01oZJwyRLe0FQvFY8uOwu6l pfChPR3UV1LqA== Date: Thu, 25 Mar 2021 09:49:01 +0200 From: Leon Romanovsky To: Doug Ledford , Jason Gunthorpe Cc: Mark Bloch , Adit Ranadive , Ariel Elior , Bart Van Assche , Bernard Metzler , Christian Benvenuti , Dennis Dalessandro , Devesh Sharma , Faisal Latif , Gal Pressman , Jakub Kicinski , Lijun Ou , linux-rdma@vger.kernel.org, Michal Kalderon , Mike Marciniszyn , Naresh Kumar PBS , Nelson Escobar , netdev@vger.kernel.org, Potnuri Bharat Teja , Saeed Mahameed , Selvin Xavier , Shiraz Saleem , Somnath Kotur , Sriharsha Basavapatna , target-devel@vger.kernel.org, VMware PV-Drivers , Weihang Li , "Wei Hu(Xavier)" , Yishai Hadas , Zhu Yanjun Subject: Re: [PATCH rdma-next] RDMA: Support more than 255 rdma ports Message-ID: References: <20210301070420.439400-1-leon@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210301070420.439400-1-leon@kernel.org> Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Mon, Mar 01, 2021 at 09:04:20AM +0200, Leon Romanovsky wrote: > From: Mark Bloch > > Current code uses many different types when dealing with a port of a > RDMA device: u8, unsigned int and u32. Switch to u32 to clean up the > logic. > > This allows us to make (at least) the core view consistent and use the same > type. Unfortunately not all places can be converted. Many uverbs functions > expect port to be u8 so keep those places in order not to break UAPIs. > HW/Spec defined values must also not be changed. > > With the switch to u32 we now can support devices with more than 255 > ports. U32_MAX is reserved to make control logic a bit easier to deal > with. As a device with U32_MAX ports probably isn't going to happen any > time soon this seems like a non issue. > > When a device with more than 255 ports is created uverbs will report > the RDMA device as having 255 ports as this is the max currently supported. > > The verbs interface is not changed yet because the IBTA spec limits the > port size in too many places to be u8 and all applications that relies in > verbs won't be able to cope with this change. At this stage, we are > extending the interfaces that are using vendor channel solely > > Once the limitation is lifted mlx5 in switchdev mode will be able to have > thousands of SFs created by the device. As the only instance of an RDMA > device that reports more than 255 ports will be a representor device > and it exposes itself as a RAW Ethernet only device CM/MAD/IPoIB and other > ULPs aren't effected by this change and their sysfs/interfaces that > are exposes to userspace can remain unchanged. > > While here cleanup some alignment issues and remove unneeded sanity > checks (mainly in rdmavt), > > Signed-off-by: Mark Bloch > Signed-off-by: Leon Romanovsky > --- Jason, ping Thanks