Received: by 2002:a05:7208:9594:b0:7e:5202:c8b4 with SMTP id gs20csp1284594rbb; Mon, 26 Feb 2024 04:57:56 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUsTKM6HtCqR0Mj7cQq0D+SHziYOIx7JxX76eiYlmYSKoi8wl/WvlNwxjKkTijPcuwby+IMczn2iQz1B3ZbwZBWa96qB04UstGPWL+JQg== X-Google-Smtp-Source: AGHT+IFCGRHw7Tm7l3IdUyuVkTkx6LM5eWJkJEChtHOptFL32wYkuLtoqz7gPOLLDyP12LNadwHY X-Received: by 2002:a17:907:209a:b0:a3f:7e2:84cc with SMTP id pv26-20020a170907209a00b00a3f07e284ccmr5445317ejb.6.1708952276438; Mon, 26 Feb 2024 04:57:56 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708952276; cv=pass; d=google.com; s=arc-20160816; b=l3+2zJk+vaH+97dvx2WFJg1y9W0eK6FmO1FZNuUQGc4T8ZgX8KI3miTh/3Nl4DrRqP tfbAUdq6Nz4awsXNAl7tGkU2FE4AEpB0NsKHDjOOGyrdVWZrKbJSTJ1Ldxh0opj9/obH gHZdvT9muol7i9BqJLwKTORxUsmLqvS7ijm3GPrwWTzay3seKg1hY0V2jHDly47f2X4O ChrjZbo4AYiOEOQ4xgzlyeXSbk2yW+hlo+qwH8dBMzZ5qkpGP5FqzZ4OGTtybx4cV/rt G1RAGqzYHedmjpX+V2/V0BzgbaP97FPNqGOaBvSjK9sbYX5+UV8EsIIcyHXN83CLY7vp hLfQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id; bh=I580M3I23OcOd7vBiyvOy+NLE5JnugMXSFJY/8tYx1I=; fh=jtsi9ksmkO3On7EgLNAeoQDkvGkmbHApuCkMXgVaW2o=; b=jhKjkiSYE6+tb9izT0A06JPPaWPfrAOXCcCV1pACKwNQU1u7fgB/Z99Xs06N15kL/9 VTnIbg0yq4TOMjDYB+WvTORgSZA0SA5afHKs+VDQtgh2wpp4TXiQ5JwHyQR4O921wTZF qSL/C+w+vJ16KmuicelBYXU3VNo57DvouKjdV7GE1loTwVOLNgP07IwqiSmxpGeF5m1b DRtRtNy5BoxLKU+hYXi9gN34vcUaVUoK08Cq3bpXdmVs1UoEZIKDGF3SO7jz7Gyvrf4J yJYZNQS5amiJk6ygymyB/RWOzb28jbX+x5Iq1OvVv4zFIgbxH5TjbehsXhSRnZAOuVOs lsXA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=hisilicon.com dmarc=pass fromdomain=hisilicon.com); spf=pass (google.com: domain of linux-kernel+bounces-81423-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-81423-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=hisilicon.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id h11-20020a170906398b00b00a381de492a6si2154214eje.969.2024.02.26.04.57.56 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Feb 2024 04:57:56 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-81423-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=hisilicon.com dmarc=pass fromdomain=hisilicon.com); spf=pass (google.com: domain of linux-kernel+bounces-81423-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-81423-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=hisilicon.com 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 am.mirrors.kernel.org (Postfix) with ESMTPS id 0E1D31F25F51 for ; Mon, 26 Feb 2024 12:57:56 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BAAE28002F; Mon, 26 Feb 2024 12:57:11 +0000 (UTC) Received: from szxga04-in.huawei.com (szxga04-in.huawei.com [45.249.212.190]) (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 EA9607F475; Mon, 26 Feb 2024 12:57:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.249.212.190 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708952231; cv=none; b=mzZ0jDLxoMvKqplnG5Enzfwzidxi6LGt7Cn2ui99wtsO2hpPHDBzE0SGtDlAzIL0ObgE87nauiA8vzFYe9udcuHVJnEQYYsYY/DbF0OaMaymZgyzxl1XyEfFmFrTkO/RxwOfm1nkl+lQy50L0pvPAEelLkKu0EXQ0oYurEfQz9I= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708952231; c=relaxed/simple; bh=JHreYlFG9Bvy0VWQqGq32kV4+VYQfyv2BVzD2+p+oGI=; h=Message-ID:Date:MIME-Version:Subject:To:CC:References:From: In-Reply-To:Content-Type; b=fVG3MtnXB4XeaL1oBHSNCOxfXb9hTVg6RSC6PtyvgApVRL7AIImUTODYZjuazR9f1Jpm4Jq5wP9/VmNDJFT6lAPHhgpBTb9ArIrCrknRBseg/VtuAANAOWgHGprbFqNMx5AkQHNYhbEnLoUKGKqesYMyu7PXudfxf64jSgJTHyw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=hisilicon.com; spf=pass smtp.mailfrom=hisilicon.com; arc=none smtp.client-ip=45.249.212.190 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=hisilicon.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=hisilicon.com Received: from mail.maildlp.com (unknown [172.19.163.17]) by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4Tk0w873P6z1xpTt; Mon, 26 Feb 2024 20:55:36 +0800 (CST) Received: from kwepemi500006.china.huawei.com (unknown [7.221.188.68]) by mail.maildlp.com (Postfix) with ESMTPS id 16B191A0172; Mon, 26 Feb 2024 20:57:05 +0800 (CST) Received: from [10.67.120.168] (10.67.120.168) by kwepemi500006.china.huawei.com (7.221.188.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Mon, 26 Feb 2024 20:57:04 +0800 Message-ID: <954a1e9b-d0bb-10ea-aaa9-6a958de30537@hisilicon.com> Date: Mon, 26 Feb 2024 20:57:04 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.1.0 Subject: Re: [PATCH v2 for-next 2/2] RDMA/hns: Support userspace configuring congestion control algorithm with QP granularity Content-Language: en-US To: Leon Romanovsky CC: Jason Gunthorpe , , , References: <20240208035038.94668-1-huangjunxian6@hisilicon.com> <20240208035038.94668-3-huangjunxian6@hisilicon.com> <20240221155248.GD13491@ziepe.ca> <26ea175c-fa31-720c-2ac3-41abcb4d398a@hisilicon.com> <20240226080946.GC1842804@unreal> From: Junxian Huang In-Reply-To: <20240226080946.GC1842804@unreal> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) To kwepemi500006.china.huawei.com (7.221.188.68) On 2024/2/26 16:09, Leon Romanovsky wrote: > 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 > Sure. Will fix it in next version. Thanks, Junxian >> >> Thanks, >> Junxian