Re: Re: Zero copy sockets question

2004-02-12 Thread Andrew Gallatin

Dung Patrick writes:
 > Correct me if I am wrong:
 > 
 > To use the zero copy 'receive' on i386, you need to set the MTU to 4096 bytes(page 
 > size) or 4096 multiples.

No, just larger than a page-size plus headers.  FreeBSD's tcp
automagically sets the mss to a page-sized multiple for large MTUs.

And you need a nic which can do header splitting (ie, DMA the headers
and the payload to different places in the host).

 > If it is true, until zero copy receive can do auto fitting, I think zero copy 
 > receive is more useful in gigabit ethernet than in fast ethernet (I assume MTU 
 > 1500(or smaller) is suitable for fast ethernet/Internet.)

Fast ethernet is slow enough, it doesn't really make sense there.
These days, one could argue that it really only makes sense for 10GbE.

Drew
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Re: Zero copy sockets question

2004-02-12 Thread Dung Patrick
Correct me if I am wrong:

To use the zero copy 'receive' on i386, you need to set the MTU to 4096 bytes(page 
size) or 4096 multiples.

If it is true, until zero copy receive can do auto fitting, I think zero copy receive 
is more useful in gigabit ethernet than in fast ethernet (I assume MTU 1500(or 
smaller) is suitable for fast ethernet/Internet.)

Patrick

-Original Message-
From: Andrew Gallatin <[EMAIL PROTECTED]>
To: Dung Patrick <[EMAIL PROTECTED]>
Date: Thu, 12 Feb 2004 09:17:46 -0500 (EST)
Subject: Re: Zero copy sockets question


Dung Patrick writes:
 > Hi
 > 
 > I have read http://people.freebsd.org/~ken/zero_copy/
 > 
 > To correctly use zero copy receive, it seems it need to set the MTU to:
 > have to be at least page sized, and be aligned on page boundaries.

Yes.

 > So is the default MTU for ethernet network card 1500 works?

No, you need to have an MTU of at least PAGE_SIZE + headers.
And a NIC which is smart enough to do the header splitting.
Currently, the Alteon Tigon2 is the only nic which fits the bill.
I keep meaning to implement header splitting in the Myricom Myrinet
firmware, and I keep not getting time for it..

Note that send-side zero-copy works on any NIC, and with a standard
MTU.


Drew



___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Zero copy sockets question

2004-02-12 Thread Andrew Gallatin

Dung Patrick writes:
 > Hi
 > 
 > I have read http://people.freebsd.org/~ken/zero_copy/
 > 
 > To correctly use zero copy receive, it seems it need to set the MTU to:
 > have to be at least page sized, and be aligned on page boundaries.

Yes.

 > So is the default MTU for ethernet network card 1500 works?

No, you need to have an MTU of at least PAGE_SIZE + headers.
And a NIC which is smart enough to do the header splitting.
Currently, the Alteon Tigon2 is the only nic which fits the bill.
I keep meaning to implement header splitting in the Myricom Myrinet
firmware, and I keep not getting time for it..

Note that send-side zero-copy works on any NIC, and with a standard
MTU.


Drew
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"