Re: [PATCH 3/9] RDMA/uverbs: Simplify UVERBS_ATTR family of macros

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jun 28, 2018 at 08:34:01AM +0000, Guy Levi(SW) wrote:
> 
> 
> > From: Jason Gunthorpe [mailto:jgg@xxxxxxxx]
> > Sent: Tuesday, June 26, 2018 1:13 AM
> > To: linux-rdma@xxxxxxxxxxxxxxx
> > Cc: Michael J. Ruhl <michael.j.ruhl@xxxxxxxxx>; Leon Romanovsky <leonro@xxxxxxxxxxxx>; Guy Levi(SW) <guyle@xxxxxxxxxxxx>;
> > Jason Gunthorpe <jgg@xxxxxxxxxxxx>
> > Subject: [PATCH 3/9] RDMA/uverbs: Simplify UVERBS_ATTR family of macros
> > 
> > From: Jason Gunthorpe <jgg@xxxxxxxxxxxx>
> > 
> > Instead of using a complex cascade of macros, just directly provide the
> > initializer list each of the declarations is trying to create.
> > 
> > Now that the macros are simplified this also reworks the uverbs_attr_spec
> > to be friendly to older compilers by eliminating any unnamed
> > structures/unions inside, and removing the duplication of some fields. The
> > structure size remains at 16 bytes which was the original motivation for
> > some of this oddness.
> 
> Why 16B size is so critical so it comes instead of simpler and
> tidier code (by splitting the enum_def)?
 
This is unclear to me right now, Matan was insistent on this point,
for now it seems best to preserve it until we have a better
understanding.

The u2.enum_def is only in a couple of places so it could be trivially
changed down the road if we wish.

Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux