Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp4902752rwb; Tue, 17 Jan 2023 06:59:13 -0800 (PST) X-Google-Smtp-Source: AMrXdXtbePh0Nnl8+a+Q9fV47Rp0ji+z7l2FuaYmUBENDI26y9I4EXO+RlBWjHMpfKlKBbSA5rkX X-Received: by 2002:a17:907:8a1d:b0:84d:3822:2fc7 with SMTP id sc29-20020a1709078a1d00b0084d38222fc7mr4145673ejc.77.1673967552945; Tue, 17 Jan 2023 06:59:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673967552; cv=none; d=google.com; s=arc-20160816; b=y7staMlFou+UpVIU+BbBoeq5K50wflHm0rFArecSrCW7pAqN1t3Ca7z1byNmkRBPd/ hmFQqnpaxDGwEwyrp/cR+5yxWycUT6F3IaZqWqxBBny6OsmCQrAtqcFk6qqpL5ZaQMUj 9YW5cWLpU4z8DFBI/HZq+86f4AddcTg0CqnLUXdGBi4ntfK8R0xJmMS/6FLLpxQ0aqn+ UqWv8LWjWMmq/IftMkFmOXRz3MEL9aeOoXMtNMkDgxhZTTJCylWCq2DYRpR5tIqGWP/O aWDT1OrUHGNljpRiqBUP4cbNjHG166+MTH8lhzaXd137QPDOBwyQr1rGf+JIj6CH0mam zlIA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=dPFvhUAmz0OtjCyEF/VFygEs8x9aA6iulMlgM06Ia84=; b=f8C8CcISrUYudyiPPcHu9YlUxceOjWHUrWPEC2MaDF1bg3ra86XdDyiGRO1U4pljHA RxaraCaUusmJUXrGDaC8CZAJb5C4oSD7aQipPR4Ck4djY3lcsNataMIiF81Zv7PT7/Qj W8e6RsX99VUOtGoHT0w3aCGsS7M6lFuEOhXuI4UrdHVnrHccSae8wm9G8LzAhWoqOC2B 0Y7qgxyH5tWOE7XGfnkx1bLhxkjbobMWWdH3kHsq07eEmdwL7+7yOTwdgAW4KDrzZ/Ag E9JMF8o56w3oh+GJ/qGelF6LYDU1XV4WmIpTCdzt1WQSk8v0oRgo41O1IG7YUJZxwmlb q2uQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=H7za2Vaq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id du1-20020a17090772c100b007c0d88f1614si9707082ejc.342.2023.01.17.06.59.00; Tue, 17 Jan 2023 06:59:12 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=H7za2Vaq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231807AbjAQOOs (ORCPT + 48 others); Tue, 17 Jan 2023 09:14:48 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39350 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232034AbjAQOOe (ORCPT ); Tue, 17 Jan 2023 09:14:34 -0500 Received: from sin.source.kernel.org (sin.source.kernel.org [IPv6:2604:1380:40e1:4800::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ABFA13CE0D; Tue, 17 Jan 2023 06:14:29 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sin.source.kernel.org (Postfix) with ESMTPS id 01F3FCE1393; Tue, 17 Jan 2023 14:14:28 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D2B4BC433D2; Tue, 17 Jan 2023 14:14:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1673964866; bh=oO6yTThzMkNKYiBtaWdm5Lzb8UxNpLOg1Jp0NdlEpAY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=H7za2Vaq0l6xcNEV0SarMt/DnMBLCzeBWWHimgfSvI2ImwcbagaDOKiGoYjIiVBn2 Z5/XYNfZU0JPPb5lQk9Fyqx3urt7Z2rVUrJIrDl3SwLQ675XBE66cmf/6EaOs2Bfwy YDS/ocT+Z2a0yNJKgZyHAD1NwgcBptZIwjtCrGqY0QlxkBtjqN+NVcWibOoDKYrV21 HO3Fy2Oxv8suZVnjpwcLAzWp+8wz57WX6dw1iyjFG+85UVZpuAi+TwcjOte50kjEDw I1qmrajJrx7UtP5YnXQFOm2l/gT5fh0RLuTYHRhbhKshd1vTmU43lOWdH+f/4/6aHs g78xEoge90KtQ== Date: Tue, 17 Jan 2023 16:14:22 +0200 From: Leon Romanovsky To: Jason Gunthorpe Cc: Israel Rukshin , Bryan Tan , Christoph Hellwig , Eric Dumazet , Jakub Kicinski , Jens Axboe , Keith Busch , linux-kernel@vger.kernel.org, linux-nvme@lists.infradead.org, linux-rdma@vger.kernel.org, linux-trace-kernel@vger.kernel.org, Masami Hiramatsu , Max Gurtovoy , netdev@vger.kernel.org, Paolo Abeni , Saeed Mahameed , Sagi Grimberg , Selvin Xavier , Steven Rostedt , Vishnu Dasa , Yishai Hadas Subject: Re: [PATCH rdma-next 03/13] RDMA: Split kernel-only create QP flags from uverbs create QP flags Message-ID: References: <6e46859a58645d9f16a63ff76592487aabc9971d.1673873422.git.leon@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jan 17, 2023 at 09:49:28AM -0400, Jason Gunthorpe wrote: > On Tue, Jan 17, 2023 at 02:03:07PM +0200, Leon Romanovsky wrote: > > On Mon, Jan 16, 2023 at 01:39:38PM -0400, Jason Gunthorpe wrote: > > > On Mon, Jan 16, 2023 at 03:05:50PM +0200, Leon Romanovsky wrote: > > > > > > > diff --git a/drivers/infiniband/hw/mlx4/mlx4_ib.h b/drivers/infiniband/hw/mlx4/mlx4_ib.h > > > > index 17fee1e73a45..c553bf0eb257 100644 > > > > --- a/drivers/infiniband/hw/mlx4/mlx4_ib.h > > > > +++ b/drivers/infiniband/hw/mlx4/mlx4_ib.h > > > > @@ -184,7 +184,7 @@ enum mlx4_ib_qp_flags { > > > > /* Mellanox specific flags start from IB_QP_CREATE_RESERVED_START */ > > > > MLX4_IB_ROCE_V2_GSI_QP = MLX4_IB_QP_CREATE_ROCE_V2_GSI, > > > > MLX4_IB_SRIOV_TUNNEL_QP = 1 << 30, > > > > - MLX4_IB_SRIOV_SQP = 1 << 31, > > > > + MLX4_IB_SRIOV_SQP = 1ULL << 31, > > > > }; > > > > > > These should be moved to a uapi if we are saying they are userspace > > > available > > > > > > But I'm not sure they are? > > > > I don't think so. > > Then they should be > 32 bits right? Right now, they are in reserved range: /* reserve bits 26-31 for low level drivers' internal use */ IB_QP_CREATE_RESERVED_START = 1 << 26, IB_QP_CREATE_RESERVED_END = 1ULL << 31, If we move them to kernel part, we will need to define reserved range there too. So we just "burn" extra bits just for mlx4, also I don't see any reason to promote mlx4 bits to be general ones. Thanks > > Jason