Re: [PATCH for-next 5/7] IB/core: Add macros for declaring types and type groups

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

 



On Thu, Jan 12, 2017 at 2:10 AM, Jason Gunthorpe
<jgunthorpe@xxxxxxxxxxxxxxxxxxxx> wrote:
> On Wed, Jan 11, 2017 at 12:53:51PM +0200, Matan Barak wrote:
>> In order to initialize and destroy types in a generic way, we need to
>> provide information about the allocation size, release function and
>> order. This is done through a macro based DSL (domain specific
>> language). This patch adds macros to initialize a type and a type
>> group.
>>
>> When we transform the write based commands to use this new locking and
>> allocation schema, we use these types declarations.
>>
>> Signed-off-by: Matan Barak <matanb@xxxxxxxxxxxx>
>> Reviewed-by: Yishai Hadas <yishaih@xxxxxxxxxxxx>
>>  include/rdma/uverbs_ioctl.h | 50 +++++++++++++++++++++++++++++++++++++++++++--
>>  1 file changed, 48 insertions(+), 2 deletions(-)
>
> None of this makes any sense to me at this point in the series.
>
> Just use a sane meta-class type and the 'usual' linux static const
> initializer scheme.
>

I could of course drop this patch and use static initializes. However,
this mean we'll re-write
the next patch using macro language in the next patch (as we introduce
actions there).
I also think the declarations themselves look pretty tidy this way.

> Jason

Matan

> --
> 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
--
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