[Openib-windows] [PATCH] MT23108: Fix large buffermemoryregistration

Leonid Keller leonid at mellanox.co.il
Sun May 14 02:35:15 PDT 2006


Applied in 346 revision, thanks to all. 

> -----Original Message-----
> From: openib-windows-bounces at openib.org 
> [mailto:openib-windows-bounces at openib.org] On Behalf Of Guy Corem
> Sent: Sunday, May 14, 2006 12:17 PM
> To: Leonid Keller; Fabian Tillier
> Cc: openib-windows at openib.org
> Subject: RE: [Openib-windows] [PATCH] MT23108: Fix large 
> buffermemoryregistration
> 
> 
> Leonid, please apply.
> 
> Thanks,
> Guy
> 
> -----Original Message-----
> From: Leonid Keller [mailto:leonid at mellanox.co.il]
> Sent: Thursday, May 11, 2006 7:17 PM
> To: Fabian Tillier
> Cc: Guy Corem; openib-windows at openib.org
> Subject: RE: [Openib-windows] [PATCH] MT23108: Fix large 
> buffer memoryregistration
> 
> Looks like right now. The question is whether this helps.
> Guy, could you check it ?
> TIA 
> 
> > -----Original Message-----
> > From: ftillier.sst at gmail.com 
> [mailto:ftillier.sst at gmail.com] On Behalf 
> > Of Fabian Tillier
> > Sent: Thursday, May 11, 2006 6:35 PM
> > To: Leonid Keller
> > Cc: Guy Corem; openib-windows at openib.org
> > Subject: Re: [Openib-windows] [PATCH] MT23108: Fix large buffer 
> > memoryregistration
> > 
> > On 5/11/06, Fabian Tillier <ftillier at silverstorm.com> wrote:
> > > On 5/11/06, Leonid Keller <leonid at mellanox.co.il> wrote:
> > > > I think, seg_size is worth to round also (for little buffers):
> > > >        rdc += ...
> > > >        seg_size = rdc;
> > >
> > > Yes, you're right.
> > 
> > Ok, here's yet another patch, hopefully this time correct.
> > 
> > Index: hw/mt23108/vapi/mlxsys/mosal/os_dep/win/mosal_iobuf.c
> > ===================================================================
> > --- hw/mt23108/vapi/mlxsys/mosal/os_dep/win/mosal_iobuf.c	
> > (revision 337)
> > +++ hw/mt23108/vapi/mlxsys/mosal/os_dep/win/mosal_iobuf.c	
> > (working copy)
> > @@ -267,10 +267,10 @@
> >  {
> >    call_result_t rc;
> >    MOSAL_iobuf_t new_iobuf;	// new allocated IOBUF object
> > -  MT_virt_addr_t seg_va = va;	// current segment start
> > -  MT_size_t seg_size = size;	// current segment size
> > -  MT_size_t rdc = size;			// remain data 
> > counter - what is rest to lock
> > -  MT_size_t delta;				// he size of 
> > the last not full page of the first segment
> > +  MT_virt_addr_t seg_va;	// current segment start
> > +  MT_size_t seg_size;		// current segment size
> > +  MT_size_t rdc;			// remain data counter 
> > - what is rest to lock
> > +  MT_size_t delta;			// he size of the last 
> > not full page of the first segment
> >    MOSAL_iobuf_seg_t iobuf_seg_p; 	// pointer to current 
> > segment object
> >    unsigned page_size;
> > 
> > @@ -297,6 +297,13 @@
> >    MOSAL_dlist_init_head( &new_iobuf->seg_que );
> >    new_iobuf->seg_num = 0;
> > 
> > +  // Round the seg_va down to a page boundary so that we
> > always get a
> > + seg_size  // that is an integral number of pages.
> > +  delta = va & (PAGE_SIZE - 1);
> > +  seg_va = va - delta;
> > +  // Since we rounded down the seg_va, we need to round up
> > the rdc and size.
> > +  seg_size = rdc = size + delta;
> > +
> >    // allocate segments
> >    while (rdc > 0) {
> >    	// map a segment
> > 
> _______________________________________________
> openib-windows mailing list
> openib-windows at openib.org
> http://openib.org/mailman/listinfo/openib-windows
> 



More information about the ofw mailing list