From: Jason Gunthorpe <jgg-uk2M96/98Pc@public.gmane.org>
To: Yixian Liu <liuyixian-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
Cc: dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org,
leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH for-next 0/2] Revise eq support for hip06 & hip08
Date: Fri, 22 Dec 2017 09:37:32 -0700 [thread overview]
Message-ID: <20171222163732.GA15021@ziepe.ca> (raw)
In-Reply-To: <1510651577-20794-1-git-send-email-liuyixian-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
On Tue, Nov 14, 2017 at 05:26:15PM +0800, Yixian Liu wrote:
> This patch-set refactor eq code for hip06 and add eq
> support for hip08.
>
> Yixian Liu (2):
> RDMA/hns: Refactor eq code for hip06
> RDMA/hns: Add eq support of hip08
I read this this whole giant patch and will apply it to for-next.
I did notice some existing bothersome things:
1) Bad commenting around all memory barriers:
/* Memory barrier */
rmb();
Everyone knows that rmb/wmb/mb are memory barriers.
If you use these calls you *MUST* have a comment explaining
what the locking situation is. Explain where the *OTHER SIDE* of
the barrier is.
2) This construct
static inline void hns_roce_write64_k(__be32 val[2], void __iomem *dest)
{
__raw_writeq(*(u64 *) val, dest);
}
static void set_eq_cons_index_v2(struct hns_roce_eq *eq)
{
u32 doorbell[2];
[..]
hns_roce_write64_k(doorbell, eq->doorbell);
Is not OK. doorbell is technically not guarenteed to be 64 bit
aligned, and the deref *(u64 *) requires 64 bit alignment in the
kernel.
I purged this stupid array thing out of the mellanox drivers in
userspace some time ago, you might do the same, or minimually a
union is needed:
union doorbell {
u64 doorbell64;
u32 doorbell[2];
}
Plese consider sending followup patches.
Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2017-12-22 16:37 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-14 9:26 [PATCH for-next 0/2] Revise eq support for hip06 & hip08 Yixian Liu
[not found] ` <1510651577-20794-1-git-send-email-liuyixian-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
2017-11-14 9:26 ` [PATCH for-next 1/2] RDMA/hns: Refactor eq code for hip06 Yixian Liu
[not found] ` <1510651577-20794-2-git-send-email-liuyixian-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
2017-11-14 8:53 ` Liuyixian (Eason)
[not found] ` <ad1fff67-3511-8252-5b6f-aa1ab0c90078-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
2017-11-14 9:09 ` Liuyixian (Eason)
2017-11-14 9:11 ` Leon Romanovsky
[not found] ` <20171114091146.GT18825-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
2017-11-14 9:40 ` Liuyixian (Eason)
[not found] ` <7a93b747-4745-86ab-4366-7b883dc2f133-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
2017-12-19 12:38 ` Liuyixian (Eason)
2017-11-14 9:26 ` [PATCH for-next 2/2] RDMA/hns: Add eq support of hip08 Yixian Liu
2017-12-04 9:33 ` [PATCH for-next 0/2] Revise eq support for hip06 & hip08 Liuyixian (Eason)
[not found] ` <4636858b-4ae8-e37e-d2d3-44441560f266-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
2017-12-11 8:55 ` Liuyixian (Eason)
[not found] ` <6d0a2aee-54e0-90dd-5293-7f8a5dac7d36-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
2017-12-11 15:49 ` Jason Gunthorpe
[not found] ` <20171211154902.GA27709-uk2M96/98Pc@public.gmane.org>
2017-12-12 10:42 ` Liuyixian (Eason)
2017-12-22 16:37 ` Jason Gunthorpe [this message]
[not found] ` <20171222163732.GA15021-uk2M96/98Pc@public.gmane.org>
2017-12-23 8:57 ` Liuyixian (Eason)
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=20171222163732.GA15021@ziepe.ca \
--to=jgg-uk2m96/98pc@public.gmane.org \
--cc=dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=liuyixian-hv44wF8Li93QT0dZR+AlfA@public.gmane.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox