[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <a7fd6db0-32eb-d5c3-7596-2783b94df232@fujitsu.com>
Date: Wed, 7 Dec 2022 01:25:56 +0000
From: "lizhijian@...itsu.com" <lizhijian@...itsu.com>
To: Jason Gunthorpe <jgg@...dia.com>
CC: "zyjzyj2000@...il.com" <zyjzyj2000@...il.com>,
"leon@...nel.org" <leon@...nel.org>,
Bob Pearson <rpearsonhpe@...il.com>,
"linux-rdma@...r.kernel.org" <linux-rdma@...r.kernel.org>,
Mark Bloch <mbloch@...dia.com>, Tom Talpey <tom@...pey.com>,
"tomasz.gromadzki@...el.com" <tomasz.gromadzki@...el.com>,
Dan Williams <dan.j.williams@...el.com>,
"yangx.jy@...itsu.com" <yangx.jy@...itsu.com>,
"Yasunori Gotou (Fujitsu)" <y-goto@...itsu.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [for-next PATCH v6 09/10] RDMA/cm: Make QP FLUSHABLE
On 06/12/2022 01:12, Jason Gunthorpe wrote:
> On Mon, Dec 05, 2022 at 10:07:11AM +0000, lizhijian@...itsu.com wrote:
>> diff --git a/drivers/infiniband/core/cm.c b/drivers/infiniband/core/cm.c
>> index 1f9938a2c475..603c0aecc361 100644
>> --- a/drivers/infiniband/core/cm.c
>> +++ b/drivers/infiniband/core/cm.c
>> @@ -4094,9 +4094,18 @@ static int cm_init_qp_init_attr(struct cm_id_private *cm_id_priv,
>> *qp_attr_mask = IB_QP_STATE | IB_QP_ACCESS_FLAGS |
>> IB_QP_PKEY_INDEX | IB_QP_PORT;
>> qp_attr->qp_access_flags = IB_ACCESS_REMOTE_WRITE;
>> - if (cm_id_priv->responder_resources)
>> + if (cm_id_priv->responder_resources) {
>> + struct ib_device *ib_dev = cm_id_priv->id.device;
>> + u64 support_flush = ib_dev->attrs.device_cap_flags &
>> + (IB_DEVICE_FLUSH_GLOBAL | IB_DEVICE_FLUSH_PERSISTENT);
>> + u32 flushable = support_flush ?
>> + (IB_ACCESS_FLUSH_GLOBAL |
>> + IB_ACCESS_FLUSH_PERSISTENT) : 0;
>> +
>> qp_attr->qp_access_flags |= IB_ACCESS_REMOTE_READ |
>> - IB_ACCESS_REMOTE_ATOMIC;
>> + IB_ACCESS_REMOTE_ATOMIC |
>> + flushable;
>> + }
>
> This makes more sense
thanks for your help, i have posted V7 revision.
https://lore.kernel.org/lkml/20221206130201.30986-1-lizhijian@fujitsu.com/T/#t
Thanks
Zhijian
>
> Jason
Powered by blists - more mailing lists