>-----Original Message----- >From: Jason Gunthorpe [mailto:jgg@xxxxxxxx] >Sent: Thursday, August 9, 2018 10:15 PM >To: linux-rdma@xxxxxxxxxxxxxxx; Leon Romanovsky <leonro@xxxxxxxxxxxx>; >Guy Levi(SW) <guyle@xxxxxxxxxxxx>; Yishai Hadas ><yishaih@xxxxxxxxxxxx>; Ruhl, Michael J <michael.j.ruhl@xxxxxxxxx> >Cc: Jason Gunthorpe <jgg@xxxxxxxxxxxx> >Subject: [PATCH v1 02/10] IB/uverbs: Build the specs into a radix tree at >runtime > >From: Jason Gunthorpe <jgg@xxxxxxxxxxxx> > >This radix tree datastructure is intended to replace the 'hash' structure >used today for parsing ioctl methods during system calls. This first >commit introduces the structure and builds it from the existing .rodata >descriptions. > >The so-called hash arrangement is actually a 5 level open coded radix tree. >This new version uses a 3 level radix tree built using the radix tree >library. > >Overall this is much less code and much easier to build as the radix tree >API allows for dynamic modification during the building. There is a small >memory penalty to pay for this, but since the radix tree is allocated on >a per device basis, a few kb of RAM seems immaterial considering the >gained simplicity. > >The radix tree is similar to the existing tree, but also has a 'attr_bkey' >concept, which is a small value'd index for each method attribute. This is >used to simplify and improve performance of everything in the next >patches. > >Signed-off-by: Jason Gunthorpe <jgg@xxxxxxxxxxxx> >Reviewed-by: Leon Romanovsky <leonro@xxxxxxxxxxxx> Reviewed-by: Michael J. Ruhl <michael.j.ruhl@xxxxxxxxx> One last question... :) Does uapi_finalize_ioctl_method() have to occur after all of the methods have been added to the tree? Could it be done at the end of uapi_merge_method()? Thanks, Mike