From owner-freebsd-hackers@FreeBSD.ORG Thu Feb 12 06:33:14 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 41CCF16A4D0 for ; Thu, 12 Feb 2004 06:33:14 -0800 (PST) Received: from digitalme.com (smtp.digitalme.com [193.97.97.75]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0321D43D2F for ; Thu, 12 Feb 2004 06:33:14 -0800 (PST) (envelope-from dkt@digitalme.com) Received: from dkt [61.10.7.113] by digitalme.com with NIMS ModWeb Module; Thu, 12 Feb 2004 22:33:06 +0800 From: Dung Patrick To: gallatin@cs.duke.edu, Date: Thu, 12 Feb 2004 22:33:06 +0800 X-Mailer: NIMS ModWeb Module X-Sender: dkt MIME-Version: 1.0 Message-ID: <1076596386.c6c7c260dkt@digitalme.com> Content-Type: text/plain; charset="BIG5" Content-Transfer-Encoding: quoted-printable cc: freebsd-hackers@freebsd.org Subject: Re: Re: Zero copy sockets question X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Feb 2004 14:33:14 -0000 Correct me if I am wrong: To use the zero copy 'receive' on i386, you need to set the MTU to 4096 byt= es(page size) or 4096 multiples. If it is true, until zero copy receive can do auto fitting, I think zero co= py receive is more useful in gigabit ethernet than in fast ethernet (I as= sume MTU 1500(or smaller) is suitable for fast ethernet/Internet.) Patrick -----Original Message----- From: Andrew Gallatin To: Dung Patrick Date: Thu, 12 Feb 2004 09:17:46 -0500 (EST) Subject: Re: Zero copy sockets question Dung Patrick writes: > Hi >=20 > I have read http://people.freebsd.org/~ken/zero_copy/ >=20 > 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