On Fri, Aug 03, 2018 at 01:31:38PM -0600, Jason Gunthorpe wrote: > From: Jason Gunthorpe <jgg@xxxxxxxxxxxx> > > Memory in the bundle is valuable, do not waste it holding an 8 byte > pointer for the rare case of writing to a PTR_OUT. We can compute the > pointer by storing a small 1 byte array offset and the base address of the > uattr memory in the bundle private memory. > > This also means we can access the kernel's copy of the ib_uverbs_attr, so > drop the copy of flags as well. > > Since the uattr base should be private bundle information this also > de-inlines the already too big uverbs_copy_to inline and moves > create_udata into uverbs_ioctl.c so they can see the private struct > definition. > > Signed-off-by: Jason Gunthorpe <jgg@xxxxxxxxxxxx> > --- > drivers/infiniband/core/uverbs_ioctl.c | 67 +++++++++++++++++++++- > drivers/infiniband/core/uverbs_std_types.c | 32 ----------- > include/rdma/uverbs_ioctl.h | 36 +++--------- > 3 files changed, 72 insertions(+), 63 deletions(-) > Thanks, Reviewed-by: Leon Romanovsky <leonro@xxxxxxxxxxxx>
Attachment:
signature.asc
Description: PGP signature