[ofw] Buffer alignment in IPoIB

Tzachi Dar tzachid at mellanox.co.il
Tue Jan 19 01:55:50 PST 2010


We currently don't have such an option.
 
>From my observation on my machines it seems that eth buffers always seem
to start with xxxxA
 
for example:
 
eth.pkt starts at 0xFFFFFA800DD5F38A
eth.pkt starts at 0xFFFFFA800DD6042A
eth.pkt starts at 0xFFFFFA800DD614CA
eth.pkt starts at 0xFFFFFA800DD6256A
eth.pkt starts at 0xFFFFFA800DD6360A
eth.pkt starts at 0xFFFFFA800DD646AA
eth.pkt starts at 0xFFFFFA800DD6574A
eth.pkt starts at 0xFFFFFA800DD667EA

(this was printed with the line "    cl_dbg_out("eth.pkt starts at
0x%p\n", &p_desc->buf.eth.pkt);")
 
Since the eth header starts 14 bytes later it will always start on
0xa+0xE = 0x18.
In other words the addresses on "my machine" are always aligned to a 64
bits boundary (that is take the 8 from the 0x18 and multiply it with 8)
which is probably right.
 
Still, if you want to be sure that buffers are always aligned well, you
probably need to allocate bigger buffers and use whatever part from
them.
 
Here is some more technical data:
 
allocation is being done at the function __buf_mgr_init()
 
on the line "  0, 0, sizeof(ipoib_recv_desc_t), __recv_ctor, NULL,
p_port );"
 
you can increase the size that is allocated there, and on the function 
__recv_ctor you can change the line  
    p_desc = (ipoib_recv_desc_t*)p_object;
to align to where ever you want.
 
Thanks
Tzachi




________________________________

	From: ofw-bounces at lists.openfabrics.org
[mailto:ofw-bounces at lists.openfabrics.org] On Behalf Of John Russo
	Sent: Monday, January 18, 2010 8:40 PM
	To: ofw at lists.openfabrics.org
	Subject: [ofw] Buffer alignment in IPoIB
	
	

	We have found that in IPoIB, packets that were handed over from
IPoIB had their buffer addresses misaligned. 

	 

	In OFED there is an option to align buffers. Do we have that
same option in the WinOF version?.

	 

	 

	 

	John F. Russo

	Engineering Manager

	QLogic Corporation

	780 Fifth Avenue

	Suite 140

	King of Prussia, PA 19406

	Direct: 610-233-4866

	Fax:      610-233-4777

	Cell:     610-246-9903

	www.qlogic.com <http://www.qlogic.com> 

	 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openfabrics.org/pipermail/ofw/attachments/20100119/0e35b242/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.jpg
Type: image/jpeg
Size: 1173 bytes
Desc: image001.jpg
URL: <http://lists.openfabrics.org/pipermail/ofw/attachments/20100119/0e35b242/attachment.jpg>


More information about the ofw mailing list