Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 17 Jul 2002 07:59:07 -0700
From:      Alfred Perlstein <bright@mu.org>
To:        shubha mr <shubha_mr@yahoo.com>
Cc:        net@freebsd.org
Subject:   Re: IP Fragmentation
Message-ID:  <20020717145907.GY77219@elvis.mu.org>
In-Reply-To: <20020717104943.57136.qmail@web14605.mail.yahoo.com>
References:  <20020717104943.57136.qmail@web14605.mail.yahoo.com>

next in thread | previous in thread | raw e-mail | index | archive | help
* shubha mr <shubha_mr@yahoo.com> [020717 03:50] wrote:
> Hi,
> I am writing a gigabit ethernet driver for one of the
> NICs.My hardware is capable of computing the checksum
> and hence I am enabling per-packet handling of
> TCP/IP/UDP checksum offload in transmit side.I would
> like to know if there is a way by which I can tell the
> upperguy that I will not be able to compute the tcp
> checksum for the fragmented packets.That is I want to
> indicate that checksum offload can be offloaded only
> for the non fragmented and hence complete packets
> only.

From mbuf.h:

#define CSUM_IP                 0x0001          /* will csum IP */
#define CSUM_TCP                0x0002          /* will csum TCP */
#define CSUM_UDP                0x0004          /* will csum UDP */
#define CSUM_IP_FRAGS           0x0008          /* will csum IP fragments */
#define CSUM_FRAGMENT           0x0010          /* will do IP fragmentation */

Just use the first 3, have a look at the if_bge.c driver for
an example.

-- 
-Alfred Perlstein [alfred@freebsd.org]
'Instead of asking why a piece of software is using "1970s technology,"
 start asking why software is ignoring 30 years of accumulated wisdom.'
Tax deductible donations for FreeBSD: http://www.freebsdfoundation.org/

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-net" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020717145907.GY77219>