Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp4903108rwb; Tue, 17 Jan 2023 06:59:28 -0800 (PST) X-Google-Smtp-Source: AMrXdXvU7E4/jHbKlg9BZ1rY5/dAal9frePNmgOXyB6m9mu53Yt2sGJz6iuaoIGRiNZoguYc/uIE X-Received: by 2002:a17:907:6a98:b0:855:2c8e:ad52 with SMTP id ri24-20020a1709076a9800b008552c8ead52mr2749820ejc.29.1673967568713; Tue, 17 Jan 2023 06:59:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673967568; cv=none; d=google.com; s=arc-20160816; b=V+M0b8N0xfaSGrGvgiX2VABeokLt5PFnXuTiqXINgzQxTo3UnjNmOkms1QlnqD0u33 PQTtlZjyGykn386rFLU7NoL++Ma2YtMl948T+9vrWmCFmGqsShJnLOGJeYlaZOYZyyPi 0DRaYsR+RCIFuQKoM/R4ExioH3SPCfesBCVhRP+JugpABcS1gvmpMycBvE85XcsJvWkQ MCDkjU3RJn4lxZZiaXgATgq0rPQNbq4RhbxSl0VW/45Fw9teO2Z6ZVEcU1QWfRCL644r 00vUud47BfgtvYD3jMP2JuTVR72HmbQXNWvYNcD3Ne03dYVG5zZT8/Rq909IBpo/Oarq jsvA== 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=9G04BlsRTvWBD3WDr4oHUNL5pxIkJYG4Kt9INTqGLQI=; b=BqheQY+IRjtanOHLTNVQl9yAw0Zq6LL1Oc+lS85Wpp4JBs3lpY8r2tLJM/AXbeh2B8 iwgKlj52yVB3a41mVjqxQIeiOXCGhDqQhiiVjP3l4uY/WckFEUJsMn/9Wu4s4gYW35yj jIR7iOobHVsEQPd2IBawDOWNJDWxfiyFzKVoLRA4UQ9mzXb9D3gV+r6XNf70R0h1JyDD +B5RMwm1i0iSEod5C2QSSSBjeHwueRM8w6Ru0a8Hk15gNeOT00cv/wOEpOvosoW2PZBu SKx9Rk4yidHlnVe13FHEezU6NHBx+YZJyQnVqKo/xQ/WbjmozIf9OMQwv7KADzZLvsYf QnVA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="Zd/8A4ZS"; 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 w5-20020a05640234c500b00499c3b58c13si10217434edc.7.2023.01.17.06.59.16; Tue, 17 Jan 2023 06:59:28 -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="Zd/8A4ZS"; 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 S230175AbjAQOfF (ORCPT + 48 others); Tue, 17 Jan 2023 09:35:05 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54896 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232766AbjAQOeb (ORCPT ); Tue, 17 Jan 2023 09:34:31 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 22F84A25D; Tue, 17 Jan 2023 06:34:22 -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 dfw.source.kernel.org (Postfix) with ESMTPS id B723D6147F; Tue, 17 Jan 2023 14:34:21 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 86555C433EF; Tue, 17 Jan 2023 14:34:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1673966061; bh=Fz/P1XZDGupDtqAJSEnp0rEfUZAKbWxcCPbBc58E86o=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Zd/8A4ZSHTYkosiDKj1TO0FVHt7VXMMtyD28nA+OIKNWV0uToO4VZUsV04f+85zsK NPAqR1E4a1Q0CqivGIOi81y5puPNQKSjGzt83iuk9+arxT2fS1FYGXhGrqyY0pos+Z OcLCxPp7ys9ubCVCxeMxzYmYNy77ccvTqq24OSgfB3I1ANleDm9EcAC5SJFVPc92BV 82ZrOmcDrcd12x/w57ND2bTpnoX2P/SLRY7hVBHhu05Shda5VwcyAjC1oJ0Zq2EiV+ jmFS5CVk+gGXWQSHF1NbuqizTD6yrXxEWa4GU13nqxj7Wk2j8qhBhnUxjl4nGJ/QXE mk7N0mBa6Ynxg== Date: Tue, 17 Jan 2023 16:34:17 +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 10:21:18AM -0400, Jason Gunthorpe wrote: > On Tue, Jan 17, 2023 at 04:14:22PM +0200, Leon Romanovsky wrote: > > 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. > > Is the reserved range kernel only? It would be nice to clarify that > detail > > If yes we should move it so that userspace cannot set it. Do we have a > bug here already? No, we always checked that users can't provide these bits and fail create QP. It means that we can safely move that range too. Thanks > > Jason