All of lore.kernel.org
 help / color / mirror / Atom feed
From: Cheng Xu <chengyou@linux.alibaba.com>
To: Jason Gunthorpe <jgg@nvidia.com>
Cc: Devesh Sharma <devesh.s.sharma@oracle.com>,
	"leon@kernel.org" <leon@kernel.org>,
	"dledford@redhat.com" <dledford@redhat.com>,
	"linux-rdma@vger.kernel.org" <linux-rdma@vger.kernel.org>,
	"KaiShen@linux.alibaba.com" <KaiShen@linux.alibaba.com>
Subject: Re: [PATCH rdma-core 1/5] RDMA-CORE/erdma: Add userspace verbs related header files.
Date: Wed, 5 Jan 2022 09:55:35 +0800	[thread overview]
Message-ID: <51a46e57-222f-6ccf-46ed-449999237548@linux.alibaba.com> (raw)
In-Reply-To: <20220103235212.GC2328285@nvidia.com>



On 1/4/22 7:52 AM, Jason Gunthorpe wrote:
> On Mon, Dec 27, 2021 at 02:46:49PM +0800, Cheng Xu wrote:
> 
>>>> +static inline struct erdma_qp *to_eqp(struct ibv_qp *base) {
>>>> +	return container_of(base, struct erdma_qp, base_qp); }
>>>> +
>>>> +static inline struct erdma_cq *to_ecq(struct ibv_cq *base) {
>>>> +	return container_of(base, struct erdma_cq, base_cq); }
>>>> +
>>>> +static inline void *get_sq_wqebb(struct erdma_qp *qp, uint16_t idx) {
>>>> +	idx &= (qp->sq.depth - 1);
>>>> +	return qp->sq.qbuf + (idx << SQEBB_SHIFT); }
>>>> +
>>>> +static inline void __kick_sq_db(struct erdma_qp *qp, uint16_t pi) {
>>>> +	uint64_t db_data;
>>>> +
>>>> +	db_data = FIELD_PREP(ERDMA_SQE_HDR_QPN_MASK, qp->id) |
>>>> +		FIELD_PREP(ERDMA_SQE_HDR_WQEBB_INDEX_MASK, pi);
>>>> +
>>>> +	*(__le64 *)qp->sq.db_record = htole64(db_data);
>>>> +	udma_to_device_barrier();
>>>> +	mmio_write64_le(qp->sq.db, htole64(db_data)); }
>>> Standard function definition format
>>> Func ()
>>> {
>>>
>>> }
>>> Update all over the place.
>>
>> OK, I will fix it.
> 
> Run it all through clang-format. Very little should deviate from
> clang-format, use your best judgement in special formatting cases.
> 
> Jason

Very useful, thanks.

Cheng Xu


  reply	other threads:[~2022-01-05  1:55 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-24  6:55 [PATCH rdma-core 0/5] Elastic RDMA Adapter (ERDMA) userspace provider driver Cheng Xu
2021-12-24  6:55 ` [PATCH rdma-core 1/5] RDMA-CORE/erdma: Add userspace verbs related header files Cheng Xu
2021-12-27  5:48   ` Devesh Sharma
2021-12-27  6:46     ` Cheng Xu
2022-01-03 23:52       ` Jason Gunthorpe
2022-01-05  1:55         ` Cheng Xu [this message]
2021-12-24  6:55 ` [PATCH rdma-core 2/5] RDMA-CORE/erdma: Add userspace verbs implementation Cheng Xu
2021-12-27  6:29   ` Devesh Sharma
2021-12-27  7:59     ` Cheng Xu
2021-12-28 12:17       ` [External] : " Devesh Sharma
2021-12-24  6:55 ` [PATCH rdma-core 3/5] RDMA-CORE/erdma: Add the main module of the provider Cheng Xu
2021-12-24  6:55 ` [PATCH rdma-core 4/5] RDMA-CORE/erdma: Add the application interface Cheng Xu
2021-12-24  6:55 ` [PATCH rdma-core 5/5] RDMA-CORE/erdma: Add to the build environment Cheng Xu

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=51a46e57-222f-6ccf-46ed-449999237548@linux.alibaba.com \
    --to=chengyou@linux.alibaba.com \
    --cc=KaiShen@linux.alibaba.com \
    --cc=devesh.s.sharma@oracle.com \
    --cc=dledford@redhat.com \
    --cc=jgg@nvidia.com \
    --cc=leon@kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.