Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp4685093rwb; Tue, 17 Jan 2023 04:18:19 -0800 (PST) X-Google-Smtp-Source: AMrXdXu/l1lHvcBlqYaRrnOhNWGxIwaWC5D9PhfohDlMsMIcQlift7ay1BMTOAmgXi20DC5gub4+ X-Received: by 2002:a17:907:2a07:b0:86f:4a4e:4853 with SMTP id fd7-20020a1709072a0700b0086f4a4e4853mr2383983ejc.49.1673957899613; Tue, 17 Jan 2023 04:18:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673957899; cv=none; d=google.com; s=arc-20160816; b=SCOb8JWL2kC9GsZoFwenDf+h9C9Q8++fsRIKbHFTln61cbHOktCB9WyaLkTsov2gJ2 sbckPJJO+L90a5N9h7X6jHy3gdiXMNHqJOSUX3pU6QEN0P+InUDFwD3+LUIOv+cNF1Zz d4GPxoWPCSPTPwifRGZOnIpHOuXYgB98CwkeMuman4Fm9cJIWQ4+yMBAD9uU1dTjn6Q4 Oz89/iy25EfEqdvO//SBny7kPSGzWrJi6NFgXLf4/afypxTyawRWZa6PCZFRUHAgFETC aFRZKxH5ig2uK7/QyRNxjxBNCEw033HQthlovxFjWFt+ltAZQeR2Z4sASaaZnL4NGrAF wzIw== 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=4w4GrNcMLeNevgVDWRB70raMzwdSCZGmUe0GbeDFnys=; b=IKxCFb2YeoyVSiH60XAQ20Gu7Timoc3pMbza64Y0kJFDZwlMAbcsJlWm/PBJ2kLn+C mflMElFj8FL4/q8Ou4Qge+Gz6+WTDbMqg9oYLc/iPs/RmNXTDFjYvJy2JHhP+H0Jl7vA t5dbH5ANQUSaewPpOYHrVinSIew2l4UIZlqCc1GLbD+7fW9BL8JzAezPRAQSev1I7GRS 99H062SSvD7AdaWrDyNHn/tXvpuHYHZMYjwhr/rxd1tNE4JDdOikm7t4HPOwzuC9fxzi BW63XBHyrh0T6menk/FsyEPoXSiNxe3hRDFdxHZ/MTL8ban6K0QGDWQYzJu2fwoVLRmg lfsQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=of5w9Xji; 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 gs31-20020a1709072d1f00b0085c64af3ea9si14578116ejc.510.2023.01.17.04.18.06; Tue, 17 Jan 2023 04:18:19 -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=of5w9Xji; 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 S236796AbjAQMED (ORCPT + 50 others); Tue, 17 Jan 2023 07:04:03 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41350 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236976AbjAQMD0 (ORCPT ); Tue, 17 Jan 2023 07:03:26 -0500 Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6F66936FCD; Tue, 17 Jan 2023 04:03:16 -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 B59E3CE1688; Tue, 17 Jan 2023 12:03:14 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7E677C433D2; Tue, 17 Jan 2023 12:03:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1673956993; bh=93tzp+RSOFf3+k4VJuc6vDivUrGEcUxrSIufHOvJ2kk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=of5w9Xji5VNt/i6LxdxPZcYFz/Uw2hYN4b1Dd1rF2g8GNW0eiNQDJ+Y8y1aEEeE/a NYxCsYslSsLRlIH33cntH+tV20HVHqrJQC/0Q1VBorj/mqOH7yHvAPVNLBD4TnP8bX kSdSUi++Jh+XfjjAEcozg0vsEg+6lVk8BcOg+BxODigDLV6JzXKuIWJpSrNS1ZvgsF 0kfgA+p4Oo3b3+EprhLqWQjlKdQwvR4bGaaB6nGu9tfws4+mG4rXxdh75g16JMVJtM FEt2NMAXwJ6dD8alBSLP5SfCNjN1jeHTEg7dJD/Bz3ND9ClbQIwMvdb/UolK6yOVRb LFVB1lvT2qqdw== Date: Tue, 17 Jan 2023 14:03:07 +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 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. > > > > diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h > > index 949cf4ffc536..cc2ddd4e6c12 100644 > > --- a/include/rdma/ib_verbs.h > > +++ b/include/rdma/ib_verbs.h > > @@ -1140,16 +1140,15 @@ enum ib_qp_type { > > IB_QPT_RESERVED10, > > }; > > > > +/* > > + * bits 0, 5, 6 and 7 may be set by old kernels and should not be used. > > + */ > > This is backwards "bits 0 5 6 7 were understood by older kernels and > should not be used" will change > > > enum ib_qp_create_flags { > > - IB_QP_CREATE_IPOIB_UD_LSO = 1 << 0, > > IB_QP_CREATE_BLOCK_MULTICAST_LOOPBACK = > > IB_UVERBS_QP_CREATE_BLOCK_MULTICAST_LOOPBACK, > > IB_QP_CREATE_CROSS_CHANNEL = 1 << 2, > > IB_QP_CREATE_MANAGED_SEND = 1 << 3, > > IB_QP_CREATE_MANAGED_RECV = 1 << 4, > > - IB_QP_CREATE_NETIF_QP = 1 << 5, > > - IB_QP_CREATE_INTEGRITY_EN = 1 << 6, > > - IB_QP_CREATE_NETDEV_USE = 1 << 7, > > IB_QP_CREATE_SCATTER_FCS = > > IB_UVERBS_QP_CREATE_SCATTER_FCS, > > IB_QP_CREATE_CVLAN_STRIPPING = > > @@ -1159,7 +1158,18 @@ enum ib_qp_create_flags { > > IB_UVERBS_QP_CREATE_PCI_WRITE_END_PADDING, > > /* reserve bits 26-31 for low level drivers' internal use */ > > IB_QP_CREATE_RESERVED_START = 1 << 26, > > - IB_QP_CREATE_RESERVED_END = 1 << 31, > > + IB_QP_CREATE_RESERVED_END = 1ULL << 31, > > And these should be shifted to the uapi header No problem. > > Jason