public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
From: Leon Romanovsky <leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
To: Bart Van Assche <Bart.VanAssche-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
Cc: "linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	"maorg-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org"
	<maorg-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>,
	"dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org"
	<dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Subject: Re: [PATCH rdma-next 2/2] IB/mlx5: Enlarge autogroup flow table
Date: Thu, 30 Mar 2017 18:00:40 +0300	[thread overview]
Message-ID: <20170330150040.GN20443@mtr-leonro.local> (raw)
In-Reply-To: <1490804090.3551.1.camel-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>

[-- Attachment #1: Type: text/plain, Size: 1868 bytes --]

On Wed, Mar 29, 2017 at 04:15:10PM +0000, Bart Van Assche wrote:
> On Wed, 2017-03-29 at 07:23 +0300, Leon Romanovsky wrote:
> > On Wed, Mar 29, 2017 at 03:20:37AM +0000, Bart Van Assche wrote:
> > > On Wed, 2017-03-29 at 06:09 +0300, Leon Romanovsky wrote:
> > > > -#define MLX5_FS_MAX_TYPES	 10
> > > > -#define MLX5_FS_MAX_ENTRIES	 32000UL
> > > > +#define MLX5_FS_MAX_TYPES	 6
> > > > +#define MLX5_FS_MAX_ENTRIES	 BIT(16)
> > >
> > > Hello Leon and Maor,
> > >
> > > The use of the BIT() macro here looks misleading to me. Elsewhere in the
> > > kernel BIT() is used to represent a bitmask. My understanding is that
> > > MLX5_FS_MAX_ENTRIES is not a bitmask but a value?
> >
> > Hello Bart,
> >
> > I agree with you that the name "MAX_ENTRIES" is misleading. This define
> > MLX5_FS_MAX_ENTRIES is needed to compare num_entries with max_table_size
> > which is represented in BIT() format. The max_table was added in previous
> > patch and we thought that it will be much convenient for the reader to
> > compare the same BIT(..) constructions.
> >
> > If you think that we abused the BIT() macro, let me know and I'll send
> > updated version (without BIT()).
>
> Hello Leon,
>
> It's not that important to me, but does MLX5_FS_MAX_ENTRIES represent a number
> or a bitmask? To me the name "MLX5_FS_MAX_ENTRIES" suggests that it is a number
> and using BIT() suggests that it's a bitmask. This seems contradictory to me.

Down the road, that define is translated to bitmask, and it is hard for me
to categorize it. If we limit ourselves to the upper layer only, it will be a number,
otherwise it will be a bitmask.

>
> Thanks,
>
> Bart.--
> 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 --]

  parent reply	other threads:[~2017-03-30 15:00 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-29  3:09 [PATCH rdma-next 1/2] IB/mlx5: Check supported flow table size Leon Romanovsky
     [not found] ` <20170329030901.5772-1-leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2017-03-29  3:09   ` [PATCH rdma-next 2/2] IB/mlx5: Enlarge autogroup flow table Leon Romanovsky
     [not found]     ` <20170329030901.5772-2-leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2017-03-29  3:20       ` Bart Van Assche
     [not found]         ` <1490757621.4362.1.camel-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
2017-03-29  4:23           ` Leon Romanovsky
     [not found]             ` <20170329042320.GJ20443-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
2017-03-29 16:15               ` Bart Van Assche
     [not found]                 ` <1490804090.3551.1.camel-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
2017-03-30 15:00                   ` Leon Romanovsky [this message]
2017-04-24 16:13   ` [PATCH rdma-next 1/2] IB/mlx5: Check supported flow table size Doug Ledford

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=20170330150040.GN20443@mtr-leonro.local \
    --to=leon-dgejt+ai2ygdnm+yrofe0a@public.gmane.org \
    --cc=Bart.VanAssche-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org \
    --cc=dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=maorg-VPRAkNaXOzVWk0Htik3J/w@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