Received: by 2002:a05:7208:9594:b0:7e:5202:c8b4 with SMTP id gs20csp1164648rbb; Mon, 26 Feb 2024 00:10:06 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVvxbshMzvHxFxcLrqWFLr/ZrQLoq0bRC/MS1b2SnPMdG4/OA43m6pLhkIf+TadDJhw2TuxeYF787lxBbE6VJnORe+oMECgpeK4UqXcLA== X-Google-Smtp-Source: AGHT+IHS6gWmFIS3UMf5nihy2OvcgYLg9TbHLbnJjING5oc/UBFjngVXvskfxJ5YyfXbWQt9j3wG X-Received: by 2002:a25:7555:0:b0:dcc:eb38:199c with SMTP id q82-20020a257555000000b00dcceb38199cmr3441475ybc.56.1708935006009; Mon, 26 Feb 2024 00:10:06 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708935005; cv=pass; d=google.com; s=arc-20160816; b=KC0VosMgSqXH2oHivv5404DQ68naHfa8iObyQvewPlvA0kLOGFSvJRfcG6NBozTW5U FdeRk89jfOxwdaKtNYbf71pMnaBV0wYaUWWF1i1rtsdfVI9PnVUUksrc1jzkFEVw4x0l qOJeVrpT8oBPZHy7ICUBqfaky+TZ9XkPtW38LftLMTLtjRVQjbqMzp729imp+hnftL9D UCTzuXytB3ZqaLshGeQulvybLLT18KnnvF74SXC3rVYevLbSwiZCOHtnbrlvVS3abwlH FcWqw8uva9Kr/BNU+1M1BuZ+PE2LRHsHNiyUiOKnzPu1I4WwrK4NTL2Yz5muDngUy9Hi +fng== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=tn/gQ7hqlVx2Z/5ZLoLjtScPo984izvlfR+3iOmSd+8=; fh=IV42Hel+ZLjnV3VZorSLnL7VmpjiSuXMDsxGqQB8u3g=; b=rvkDm+j1pwOSs6BiBcp2jHwGVVPoyove6yljQqJxX8zLdxUVx3JUjQfyHj8R8SlD0g WSV0DljoxQv1HQV1FZKojlnJeyU6kQKtijG7grFGO0zs1uEnh6WDLfOcs6DPvGUsl9/g k6AQ8xNbgAoX5ag66lv69ZB8MZ2CYwlhecpnSthJ+by0XuQG5VPXG7A47zhLlM1XjTy8 5LO6aD2M47ZfbK/F9M2+zGY8mihaLdDnnJ7nlgVLA64JU286PauQed/oFKx1rVcGAyn4 BlolB4B4+vpLkpX267dq62iUK2A5lhSVBf7/iq8qVDVG+MWZBa0ESzSAXc19tA7hfl6t wxFQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=WWTIOILm; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-80728-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-80728-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id d3-20020ac86683000000b0042dfb6f53a2si4491070qtp.748.2024.02.26.00.10.05 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Feb 2024 00:10:05 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-80728-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=WWTIOILm; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-80728-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-80728-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 641FB1C21AB3 for ; Mon, 26 Feb 2024 08:10:05 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8E09B1C6B5; Mon, 26 Feb 2024 08:09:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="WWTIOILm" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B19A01C696; Mon, 26 Feb 2024 08:09:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708934995; cv=none; b=sOysGwbiiizRfumIxfBjj+Ft5yHY1a+04vRqfftPjuDK/iEGtSkC4NwvBrYZ3Ar9iZ+BGUvfbeUlQ0pkpK4NMXn0zBGHFFUuw61ceo7kjpVqBlVx5Q75JwrJpgDAV5xZT/n+U4TFKw0XkXDNzj2QVAMvJsoSqEfq/zJYIqIfTXg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708934995; c=relaxed/simple; bh=pdqidvyphX2sEaCa/hJiMTiJLzAIs4UAJrCEdSu9I2s=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=AmQZ/Tent9axW6bvRLoXWgCEwBnq6hq6PaljoJWhY0wys0wkfynkfVjRhMSJhi5uxSmPPb/PhRnk30id/gV+5pOQcCIjkEK2+l93OKVG5CQp/XGlJtHxGJN5/Ug2VfMIDtrEp2yilN/TpBcKQw9Sa6jd8sMRCPVZ7cPj7kKYqsg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=WWTIOILm; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id C36EEC433C7; Mon, 26 Feb 2024 08:09:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1708934995; bh=pdqidvyphX2sEaCa/hJiMTiJLzAIs4UAJrCEdSu9I2s=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=WWTIOILmPomUtp49MfnYQj4CXJKcfA0Qo2S8EQiVbXCD3m6JMouiCZOSwvXvQuQB1 WJqNFyK311LNEzUMQIvIw4snjD2Bpl4qBG8QMI3fPiQQASSLuPrW1P/RhvJIPht2v2 c6ZEOHPNuCcHvxS/q+m//EhdT3nOutHqzn9KPtcFpr04T5B45FmHSgrPOwb41zQ4hk +5nJtZGslPUUv8Q2t5EeAnAKUWuR2IPTUQBSE9GHnjp6t2XNZMIZceDR4Xxwj9Hc+K EisDQF3F6qsriG3rcFrDubGloXlSJYgztwW1sGkAtl3e0BJDqEwqt882lwJdDeF+W/ VFYmblvt6bayw== Date: Mon, 26 Feb 2024 10:09:46 +0200 From: Leon Romanovsky To: Junxian Huang Cc: Jason Gunthorpe , linux-rdma@vger.kernel.org, linuxarm@huawei.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 for-next 2/2] RDMA/hns: Support userspace configuring congestion control algorithm with QP granularity Message-ID: <20240226080946.GC1842804@unreal> References: <20240208035038.94668-1-huangjunxian6@hisilicon.com> <20240208035038.94668-3-huangjunxian6@hisilicon.com> <20240221155248.GD13491@ziepe.ca> <26ea175c-fa31-720c-2ac3-41abcb4d398a@hisilicon.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <26ea175c-fa31-720c-2ac3-41abcb4d398a@hisilicon.com> On Thu, Feb 22, 2024 at 03:06:20PM +0800, Junxian Huang wrote: > > > On 2024/2/21 23:52, Jason Gunthorpe wrote: > > On Thu, Feb 08, 2024 at 11:50:38AM +0800, Junxian Huang wrote: > >> Support userspace configuring congestion control algorithm with > >> QP granularity. If the algorithm is not specified in userspace, > >> use the default one. > >> > >> Signed-off-by: Junxian Huang > >> --- > >> drivers/infiniband/hw/hns/hns_roce_device.h | 23 +++++-- > >> drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 14 +--- > >> drivers/infiniband/hw/hns/hns_roce_hw_v2.h | 3 +- > >> drivers/infiniband/hw/hns/hns_roce_main.c | 3 + > >> drivers/infiniband/hw/hns/hns_roce_qp.c | 71 +++++++++++++++++++++ > >> include/uapi/rdma/hns-abi.h | 17 +++++ > >> 6 files changed, 112 insertions(+), 19 deletions(-) <...> > >> + > >> +enum hns_roce_create_qp_comp_mask { > >> + HNS_ROCE_CREATE_QP_MASK_CONGEST_TYPE = 1 << 1, > > > > Why 1<<1 not 1<<0? > > This is to keep consistent with our internal ABI, there are some > features not upstream yet. > <...> > >> @@ -114,6 +128,9 @@ struct hns_roce_ib_alloc_ucontext_resp { > >> __u32 reserved; > >> __u32 config; > >> __u32 max_inline_data; > >> + __u8 reserved0; > >> + __u8 congest_type; > > > > Why this layout? > > > Jason > > Same as the 1<<1 issue, to keep consistent with our internal ABI. We are talking about upstream kernel UAPI, there is no internal ABI here. Please fix it. Thanks > > Thanks, > Junxian