From owner-freebsd-net@FreeBSD.ORG Fri Feb 3 10:30:56 2006 Return-Path: X-Original-To: freebsd-net@freebsd.org Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1D1EB16A420 for ; Fri, 3 Feb 2006 10:30:56 +0000 (GMT) (envelope-from kamal_ckk@yahoo.com) Received: from web30007.mail.mud.yahoo.com (web30007.mail.mud.yahoo.com [68.142.200.70]) by mx1.FreeBSD.org (Postfix) with SMTP id 9BCF043D4C for ; Fri, 3 Feb 2006 10:30:55 +0000 (GMT) (envelope-from kamal_ckk@yahoo.com) Received: (qmail 38503 invoked by uid 60001); 3 Feb 2006 10:30:54 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=tUFyhSErf/RCuxsewKIG7O03QrRuXX3P8DbN53LfsOZaMU4O1JUhZNyOFNwx4ZpGeu2Cw1onGpIEtxjWga0gRKpHOEhCIHvSOAA2UcyguAeg5/suZ9J50+zOOJMIS4QX+V3ahekE+iGDoSoF3zxZIK3T7DPqP6LNs6cwxkugGMU= ; Message-ID: <20060203103054.38501.qmail@web30007.mail.mud.yahoo.com> Received: from [202.161.131.69] by web30007.mail.mud.yahoo.com via HTTP; Fri, 03 Feb 2006 02:30:54 PST Date: Fri, 3 Feb 2006 02:30:54 -0800 (PST) From: kamal kc To: freebsd-net@freebsd.org In-Reply-To: <20060203082021.GL60276@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Subject: Re: offloading ip checksum calculation to the NIC X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Feb 2006 10:30:56 -0000 --- Gleb Smirnoff wrote: > On Thu, Feb 02, 2006 at 10:20:46PM -0800, kamal kc wrote: > k> i want to offload ip checksum calculation to the NIC. > k> I use 3Com 3c905B-TX NIC cards. > k> > k> I found that there are variables::>> > k> > k> int csum_flags; /* flags regarding checksum */ > k> int csum_data; /* data field used by csum routines */ > k> > k> in struct pkthdr in mbuf.h. > k> > k> also i found the various flags for the hardware checksumming. > k> but i don't know the exact steps i need to do > k> in order to offload checksumming. > k> > k> should i set the csum_flags to CSUM_IP and point > k> csum_data to the start of the ip header ?? > k> > k> it would be a great help if anybody > k> could tell me what do i need to do ? > > afaik, the xl(4) driver already supports checksum calculation. > > -- so what do i need to do if i don't want to calculate the ip checksum myself ? right now i am taking off packet from the kernel and modifying some of the data content, and outputting to the IFQ_HANDOFF myself. and i am calculating the checksum myself. i guess if xl would support the hardware checksumming i could use that feature. i am just a beginner and i am not getting the clear picture. thanks, kamal __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com