On Sun, Feb 03, 2019 at 02:55:49PM +0200, Leon Romanovsky wrote: > From: Leon Romanovsky <leonro@xxxxxxxxxxxx> > > Changelog: > v2->v3: > * Added type casting in a return of zalloc > * Restore deleted rxe PD pool management to ensure that max_pd is > honored. > v1->v2: > * Sent as part of per-ID series > v0->v1: > * Used various to_XXXpd() macros provided by drivers instead of > * container_of() - Shiraz > * Cleaned a little bit macros after Jason's suggestion and Bart's > snippet from other patch. > > ---------------------------------------------------------------- > Hi, > > This series is a followup to discussed on the mailing list approach to > provide drivers common infrastructure for SW/HW allocated IDs. Those > IDs are essential part of two main core features: > 1. netlink interface to query specific objects from user space (rdmatool) > 2. internal resource management, instead of home grown bitmaps and trees > used by various drivers. > > However for mentioned infrastructure to work, it relies on the fact that > the pointer to ib_device is already set, prior to call to various > alloc_XXX() functions. > > In this series, I converted all drivers to use IB/core ib_pd allocation > to ensure that ib_device pointer is valid. > > Thanks > > Leon Romanovsky (2): > RDMA/core: Share driver structure size with core > RDMA: Handle PD allocations by IB/core Since Steve can fix the cxgb stuff for ucontext lets go ahead with this and start converting everything. I think it is a bit peculiar, but it is broadly similar to the alloc_netdev flow except we use container_of instead of netdev_priv, and it removes so much code.. Applied to for-next Thanks, Jason