From mboxrd@z Thu Jan 1 00:00:00 1970 From: 'Christoph Hellwig' Subject: Re: [PATCH V3 1/5] RDMA/core: Transport-independent access flags Date: Wed, 8 Jul 2015 13:32:05 -0700 Message-ID: <20150708203205.GA21847@infradead.org> References: <001601d0b7f9$3e1d6d40$ba5847c0$@opengridcomputing.com> <559AAA22.1000608@dev.mellanox.co.il> <20150707090001.GB11736@infradead.org> <559B9891.8060907@dev.mellanox.co.il> <000b01d0b8bd$f2bfcc10$d83f6430$@opengridcomputing.com> <20150707161751.GA623@obsidianresearch.com> <559BFE03.4020709@dev.mellanox.co.il> <20150707213628.GA5661@obsidianresearch.com> <559CD174.4040901@dev.mellanox.co.il> <20150708190842.GB11740@obsidianresearch.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <20150708190842.GB11740-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org> Sender: linux-rdma-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Jason Gunthorpe Cc: Sagi Grimberg , Steve Wise , 'Christoph Hellwig' , dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org, sagig-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org, ogerlitz-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org, roid-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org, linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, eli-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org, target-devel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-nfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, trond.myklebust-7I+n7zu2hftEKMMhf/gKZA@public.gmane.org, bfields-uC3wQj2KruNg9hUCZPvPmw@public.gmane.org, Oren Duer List-Id: linux-rdma@vger.kernel.org On Wed, Jul 08, 2015 at 01:08:42PM -0600, Jason Gunthorpe wrote: > Then, what is left is all remote MRs and maybe it will be clearer what > to do about them then... >>From looking at that for a while the APIs needed seem pretty simple to me from a consumer perspective: struct rdma_mr *rmda_alloc_mr(struct ib_pd *pd, unsigned int nr_pages); void rdma_free_mr(struct rdma_mr *mr); /* updates *sg if the SG couldn't be fully registered due to offsets */ int rdma_register_sg(struct rdma_mr *mr, struct scatterlist **sg, u32 *pkey, u32 *offset, u32 *len); void rdma_unregister_sg(struct rdma_mr *mr, struct scatterlist *sg); plus maybe a pool alloc API if we care about FMR performance. Note that this assumes that the iSER bounce buffer hacks are replaced with the QUEUE_FLAG_SG_GAPS flags and a change to the SG_IO code to bounce buffer for vectored SG_IO calls. I'm happy to provide a patch for that if I can find a volunteer for testing. -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html