<div dir="auto"><div><br><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Jul 6, 2021, 16:54 Jason Gunthorpe <<a href="mailto:jgg@ziepe.ca">jgg@ziepe.ca</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Tue, Jul 06, 2021 at 12:44:49PM +0300, Oded Gabbay wrote:<br>
<br>
> > > + /* In case we got a large memory area to export, we need to divide it<br>
> > > + * to smaller areas because each entry in the dmabuf sgt can only<br>
> > > + * describe unsigned int.<br>
> > > + */<br>
> ><br>
> > Huh? This is forming a SGL, it should follow the SGL rules which means<br>
> > you have to fragment based on the dma_get_max_seg_size() of the<br>
> > importer device.<br>
> ><br>
> hmm<br>
> I don't see anyone in drm checking this value (and using it) when<br>
> creating the SGL when exporting dmabuf. (e.g.<br>
> amdgpu_vram_mgr_alloc_sgt)<br>
<br>
For dmabuf the only importer is RDMA and it doesn't care, but you<br>
certainly should not introduce a hardwired constant instead of using<br>
the correct function.<br>
<br>
Jason<br></blockquote></div></div><div dir="auto"><br></div><div dir="auto">Got it, will change</div><div dir="auto">Thanks, </div><div dir="auto">Oded </div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
</blockquote></div></div></div>