public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
From: Leon Romanovsky <leon@kernel.org>
To: Weihang Li <liweihang@huawei.com>
Cc: dledford@redhat.com, jgg@nvidia.com, linux-rdma@vger.kernel.org,
	linuxarm@huawei.com, Xi Wang <wangxi11@huawei.com>
Subject: Re: [PATCH for-next 2/2] RDMA/hns: Remove timeout link table for HIP08
Date: Wed, 19 May 2021 11:57:35 +0300	[thread overview]
Message-ID: <YKTS/95LQq9tsoRG@unreal> (raw)
In-Reply-To: <1620807370-9409-3-git-send-email-liweihang@huawei.com>

On Wed, May 12, 2021 at 04:16:10PM +0800, Weihang Li wrote:
> From: Xi Wang <wangxi11@huawei.com>
> 
> The timeout link table works in HIP08 ES version and the hns driver only
> support the CS version for HIP08, so delete the related code.
> 
> Signed-off-by: Xi Wang <wangxi11@huawei.com>
> Signed-off-by: Weihang Li <liweihang@huawei.com>
> ---
>  drivers/infiniband/hw/hns/hns_roce_device.h |   3 +-
>  drivers/infiniband/hw/hns/hns_roce_hw_v2.c  | 177 +++++++++++-----------------
>  drivers/infiniband/hw/hns/hns_roce_hw_v2.h  |  16 +--
>  3 files changed, 76 insertions(+), 120 deletions(-)
> 
> diff --git a/drivers/infiniband/hw/hns/hns_roce_device.h b/drivers/infiniband/hw/hns/hns_roce_device.h
> index 97800d2..5bd4013 100644
> --- a/drivers/infiniband/hw/hns/hns_roce_device.h
> +++ b/drivers/infiniband/hw/hns/hns_roce_device.h
> @@ -854,8 +854,7 @@ struct hns_roce_caps {
>  	u32		gmv_buf_pg_sz;
>  	u32		gmv_hop_num;
>  	u32		sl_num;
> -	u32		tsq_buf_pg_sz;
> -	u32		tpq_buf_pg_sz;
> +	u32		llm_buf_pg_sz;
>  	u32		chunk_sz;	/* chunk size in non multihop mode */
>  	u64		flags;
>  	u16		default_ceq_max_cnt;
> diff --git a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
> index a3f7dc5..e105e21 100644
> --- a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
> +++ b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
> @@ -2062,7 +2062,7 @@ static void set_hem_page_size(struct hns_roce_dev *hr_dev)
>  	caps->eqe_buf_pg_sz = 0;
>  
>  	/* Link Table */
> -	caps->tsq_buf_pg_sz = 0;
> +	caps->llm_buf_pg_sz = 0;
>  
>  	/* MR */
>  	caps->pbl_ba_pg_sz = HNS_ROCE_BA_PG_SZ_SUPPORTED_16K;
> @@ -2478,43 +2478,16 @@ static int hns_roce_v2_profile(struct hns_roce_dev *hr_dev)
>  	return ret;
>  }
>  
> -static int hns_roce_config_link_table(struct hns_roce_dev *hr_dev,
> -				      enum hns_roce_link_table_type type)
> +static void config_llm_table(struct hns_roce_buf *data_buf, void *cfg_buf)
>  {
> -	struct hns_roce_cmq_desc desc[2];
> -	struct hns_roce_cmq_req *r_a = (struct hns_roce_cmq_req *)desc[0].data;
> -	struct hns_roce_cmq_req *r_b = (struct hns_roce_cmq_req *)desc[1].data;
> -	struct hns_roce_v2_priv *priv = hr_dev->priv;
> -	struct hns_roce_link_table *link_tbl;
> -	enum hns_roce_opcode_type opcode;
>  	u32 i, next_ptr, page_num;
> -	struct hns_roce_buf *buf;
> +	__le64 *entry = cfg_buf;
>  	dma_addr_t addr;
> -	__le64 *entry;
>  	u64 val;
>  
> -	switch (type) {
> -	case TSQ_LINK_TABLE:
> -		link_tbl = &priv->tsq;
> -		opcode = HNS_ROCE_OPC_CFG_EXT_LLM;
> -		break;
> -	case TPQ_LINK_TABLE:
> -		link_tbl = &priv->tpq;
> -		opcode = HNS_ROCE_OPC_CFG_TMOUT_LLM;
> -		break;
> -	default:
> -		return -EINVAL;
> -	}
> -
> -	/* Setup data table block address to link table entry */
> -	buf = link_tbl->buf;
> -	page_num = buf->npages;
> -	if (WARN_ON(page_num > HNS_ROCE_V2_EXT_LLM_MAX_DEPTH))
> -		return -EINVAL;

You added these lines in previous patch. Please structure the patches in
such way that they don't need to add->delete in same series.

Thanks

  reply	other threads:[~2021-05-19  8:57 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-12  8:16 [PATCH for-next 0/2] RDMA/hns: Updates on link table Weihang Li
2021-05-12  8:16 ` [PATCH for-next 1/2] RDMA/hns: Refactor extend link table allocation Weihang Li
2021-05-12  8:16 ` [PATCH for-next 2/2] RDMA/hns: Remove timeout link table for HIP08 Weihang Li
2021-05-19  8:57   ` Leon Romanovsky [this message]
2021-05-20  1:59     ` liweihang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YKTS/95LQq9tsoRG@unreal \
    --to=leon@kernel.org \
    --cc=dledford@redhat.com \
    --cc=jgg@nvidia.com \
    --cc=linux-rdma@vger.kernel.org \
    --cc=linuxarm@huawei.com \
    --cc=liweihang@huawei.com \
    --cc=wangxi11@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox