From: Leon Romanovsky <leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
To: "Tung,
Chien Tin"
<chien.tin.tung-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Cc: "Orosco,
Henry" <henry.orosco-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
"dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org"
<dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
"linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
"e1000-rdma-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org"
<e1000-rdma-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>
Subject: Re: [PATCH] i40iw: Set 128B as the only supported RQ WQE size
Date: Wed, 21 Dec 2016 17:12:50 +0200 [thread overview]
Message-ID: <20161221151250.GA18935@mtr-leonro.local> (raw)
In-Reply-To: <748B799B6A00724488C603FD7E5E7EB94CBB1BA8-XfjTATA9Em864kNsxIetb7fspsVTdybXVpNB7YpNyf8@public.gmane.org>
[-- Attachment #1: Type: text/plain, Size: 6961 bytes --]
On Wed, Dec 21, 2016 at 02:07:15PM +0000, Tung, Chien Tin wrote:
>
>
> > -----Original Message-----
> > From: Leon Romanovsky [mailto:leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org]
> > Sent: Tuesday, December 20, 2016 11:48 PM
> > To: Tung, Chien Tin <chien.tin.tung-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
> > Cc: Orosco, Henry <henry.orosco-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>; dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org; linux-
> > rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org; e1000-rdma-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
> > Subject: Re: [PATCH] i40iw: Set 128B as the only supported RQ WQE size
> >
> > On Wed, Dec 21, 2016 at 12:04:55AM +0000, Tung, Chien Tin wrote:
> > >
> > >
> > > > -----Original Message-----
> > > > From: Leon Romanovsky [mailto:leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org]
> > > > Sent: Tuesday, December 20, 2016 2:03 PM
> > > > To: Tung, Chien Tin <chien.tin.tung-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
> > > > Cc: Orosco, Henry <henry.orosco-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>; dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org;
> > > > linux- rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org; e1000-rdma-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
> > > > Subject: Re: [PATCH] i40iw: Set 128B as the only supported RQ WQE
> > > > size
> > > >
> > > > On Tue, Dec 20, 2016 at 02:46:30PM +0000, Tung, Chien Tin wrote:
> > > > >
> > > > >
> > > > > > -----Original Message-----
> > > > > > From: Leon Romanovsky [mailto:leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org]
> > > > > > Sent: Tuesday, December 20, 2016 7:42 AM
> > > > > > To: Tung, Chien Tin <chien.tin.tung-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
> > > > > > Cc: Orosco, Henry <henry.orosco-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>; dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org;
> > > > > > linux- rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org; e1000-rdma-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
> > > > > > Subject: Re: [PATCH] i40iw: Set 128B as the only supported RQ
> > > > > > WQE size
> > > > > >
> > > > > > On Tue, Dec 20, 2016 at 12:44:04PM +0000, Tung, Chien Tin wrote:
> > > > > > >
> > > > > > >
> > > > > > > > -----Original Message-----
> > > > > > > > From: linux-rdma-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org [mailto:linux-rdma-
> > > > > > > > owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org] On Behalf Of Leon Romanovsky
> > > > > > > > Sent: Tuesday, December 20, 2016 5:24 AM
> > > > > > > > To: Orosco, Henry <henry.orosco-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
> > > > > > > > Cc: dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org; linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org; e1000-
> > > > > > > > rdma-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org; Tung, Chien Tin
> > > > > > > > <chien.tin.tung-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
> > > > > > > > Subject: Re: [PATCH] i40iw: Set 128B as the only supported
> > > > > > > > RQ WQE size
> > > > > > > >
> > > > > > > > > diff --git a/drivers/infiniband/hw/i40iw/i40iw_ucontext.h
> > > > > > > > > b/drivers/infiniband/hw/i40iw/i40iw_ucontext.h
> > > > > > > > > index 12acd68..57d3f1d 100644
> > > > > > > > > --- a/drivers/infiniband/hw/i40iw/i40iw_ucontext.h
> > > > > > > > > +++ b/drivers/infiniband/hw/i40iw/i40iw_ucontext.h
> > > > > > > > > @@ -39,8 +39,8 @@
> > > > > > > > >
> > > > > > > > > #include <linux/types.h>
> > > > > > > > >
> > > > > > > > > -#define I40IW_ABI_USERSPACE_VER 4
> > > > > > > > > -#define I40IW_ABI_KERNEL_VER 4
> > > > > > > > > +#define I40IW_ABI_VER 5
> > > > > > > > > +
> > > > > > > >
> > > > > > > > Why did you remove defines and move to use constants "4" and "5"
> > > > > > instead?
> > > > > > > [Chien Tin Tung] This is the ABI version change, did you read
> > > > > > > the commit
> > > > > > message? Two defines were not necessary.
> > > > > > >
> > > > > >
> > > > > > Thank you Chian Tin Tung for your informative answer and yes, I
> > > > > > read commit message.
> > > > > >
> > > > > > If you think that these defines are not needed, so can you
> > > > > > please remove the code which uses hardcoded "case 4" and "case 5"?
> > > > > [Chien Tin Tung] Those are explicit checks against a particular
> > > > > ABI version and it is clearer to use the numbers rather than some define.
> > > >
> > > > Can you please stop to add [..] in front of your response? This
> > > > Outlook style is annoying and not needed.
> > > >
> > > > Regarding you response, you added the same check in two places and
> > > > from grep/ctags/cscope/lxr perspective it is easier to spot them with a
> > define.
> > >
> > > You have yet to provide a good argument for changing the 4 and 5 to
> > > defines, so I don't know why you are telling me how to find them. Very
> > puzzling.
> >
> > I'm not telling to you, but asking from you to provide maintainable code which
> > will be read more than once. Right now, you blindly copy-pasted hardcoded
> > values in three different places (2 kernel and 1 rdma-core).
>
> Please make your case by coming up with a define that's better than 4 or 5,
> making the code more readable and understandable, then I will consider using it.
First of all you are already have define for 5, but who cares, you are
not junior and don't need to read the code which you wrote minute before.
Second, you need to come with new name for number 4 only.
What about following?
#define I40IW_LEGACY_ABI 4
> Until you can do that, you have no case for your comment. Blindly using a define
> is something you tell junior programmers, sometimes, a number is just a number,
> nothing wrong with using it as is.
>
> >
> > Feel free to ask your colleagues (Faisal L. and Shiraz S.) if they interested in
> > maintainable driver code or they prefer your prone to errors copy-paste
> > technique.
>
> Why don't you go back and read the comment made against I40IW_SUCCESS?
> Maybe you will learn something from that?
Your word is a lamp for my feet, a light on my path. Please enlighten me.
Happy Christmas.
>
> >
> > > I already made my case on this. Enough said.
> > >
> > > Chien
> > >
> > > >
> > > [Chien]
> > > > >
> > > > > >
> > > > > > Or maybe they still needed and should be renamed?
> > > > > [Chien Tin Tung] They are not needed. Before we were checking
> > > > > against one version and one version only. Now we are making the
> > > > > provider library and driver backward compatible. All we need is
> > > > > one define to specify current ABI version.
> > > > >
> > > > > Chien
> > > --
> > > 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
> --
> 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
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2016-12-21 15:12 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-19 20:32 [PATCH] i40iw: Set 128B as the only supported RQ WQE size Henry Orosco
[not found] ` <20161219203227.86392-1-henry.orosco-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2016-12-20 10:47 ` Yuval Shaia
[not found] ` <20161220104720.GD7351-Hxa29pjIrETlQW142y8m19+IiqhCXseY@public.gmane.org>
2016-12-20 16:41 ` Henry Orosco
[not found] ` <20161220164118.GA91636-ZmvEvTIhtuUfyugFOqMDN/ooFf0ArEBIu+b9c/7xato@public.gmane.org>
2016-12-20 17:30 ` Yuval Shaia
2016-12-20 17:55 ` Henry Orosco
2016-12-20 11:24 ` Leon Romanovsky
[not found] ` <20161220112417.GV1074-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
2016-12-20 12:44 ` Tung, Chien Tin
[not found] ` <748B799B6A00724488C603FD7E5E7EB94CBAEEA0-XfjTATA9Em864kNsxIetb7fspsVTdybXVpNB7YpNyf8@public.gmane.org>
2016-12-20 13:42 ` Leon Romanovsky
[not found] ` <20161220134203.GW1074-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
2016-12-20 14:46 ` Tung, Chien Tin
[not found] ` <748B799B6A00724488C603FD7E5E7EB94CBAFBBC-XfjTATA9Em864kNsxIetb7fspsVTdybXVpNB7YpNyf8@public.gmane.org>
2016-12-20 20:02 ` Leon Romanovsky
[not found] ` <20161220200239.GA1074-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
2016-12-21 0:04 ` Tung, Chien Tin
[not found] ` <748B799B6A00724488C603FD7E5E7EB94CBB12AF-XfjTATA9Em864kNsxIetb7fspsVTdybXVpNB7YpNyf8@public.gmane.org>
2016-12-21 5:48 ` Leon Romanovsky
[not found] ` <20161221054805.GB1074-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
2016-12-21 14:07 ` Tung, Chien Tin
[not found] ` <748B799B6A00724488C603FD7E5E7EB94CBB1BA8-XfjTATA9Em864kNsxIetb7fspsVTdybXVpNB7YpNyf8@public.gmane.org>
2016-12-21 15:12 ` Leon Romanovsky [this message]
[not found] ` <20161221151250.GA18935-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
2016-12-21 16:08 ` Tung, Chien Tin
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=20161221151250.GA18935@mtr-leonro.local \
--to=leon-dgejt+ai2ygdnm+yrofe0a@public.gmane.org \
--cc=chien.tin.tung-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
--cc=dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=e1000-rdma-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
--cc=henry.orosco-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
--cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@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