From owner-freebsd-hackers@FreeBSD.ORG Thu Feb 12 06:26:27 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 0D04516A4CE for ; Thu, 12 Feb 2004 06:26:27 -0800 (PST) Received: from duke.cs.duke.edu (duke.cs.duke.edu [152.3.140.1]) by mx1.FreeBSD.org (Postfix) with ESMTP id C59A143D2F for ; Thu, 12 Feb 2004 06:26:26 -0800 (PST) (envelope-from gallatin@cs.duke.edu) Received: from grasshopper.cs.duke.edu (grasshopper.cs.duke.edu [152.3.145.30]) by duke.cs.duke.edu (8.12.10/8.12.10) with ESMTP id i1CEQM5P006218 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 12 Feb 2004 09:26:22 -0500 (EST) Received: (from gallatin@localhost) by grasshopper.cs.duke.edu (8.12.9p2/8.12.9/Submit) id i1CEQHCg041354; Thu, 12 Feb 2004 09:26:17 -0500 (EST) (envelope-from gallatin) From: Andrew Gallatin MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <16427.36104.975516.452339@grasshopper.cs.duke.edu> Date: Thu, 12 Feb 2004 09:26:16 -0500 (EST) To: Dung Patrick In-Reply-To: <1076577152.c8c39c40dkt@digitalme.com> References: <1076577152.c8c39c40dkt@digitalme.com> X-Mailer: VM 6.75 under 21.1 (patch 12) "Channel Islands" XEmacs Lucid cc: freebsd-hackers@freebsd.org Subject: 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:26:27 -0000 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