Subject: Re: Hardware IPv4/TCP/UDP checksumming support
To: Ignatios Souvatzis <ignatios@theory.cs.uni-bonn.de>
From: =?iso-8859-1?Q?P=E5l_Halvorsen?= <paalh@unik.no>
List: tech-net
Date: 09/06/2001 13:48:46
On Thu, 6 Sep 2001, Ignatios Souvatzis wrote:

> On Thu, Sep 06, 2001 at 01:17:57PM +0200, P=E5l Halvorsen wrote:
> >=20
> > If we assume using NIC DMA to access main memory and using UDP/IP
> > calculating UDP checksum, filling the IP header and caclulating IP head=
er
> > checksum.
> >=20
> > Does this mean that the checksum offload requires more bus transfers th=
an
> > native checksum mechanisms only transfering the original packet once?
> > (data and UDP header twice, and IP header three times - including the
> > UDPIP pseudo header used during UDP checksum)=20
> > Or is the data transfered to the NIC during UDP checksum and only the
> > headers are transfered several times?
>=20
> There is a third option. Never return the checksum to the cpu's main memo=
ry.

Nevertheless, the headers are used both before and after checksum
operations. Thus, the header itself must be available in the cpu's main
memory during the rest of the protocol processing. Which means that at
least the headers should be transfered several times over the bus!???
That is if not the whole protocol processing is done on-board the NIC...
=20
> I don't know what is implemented by the hardware & driver in question, bu=
t
> you can easily check that yourself.

I'm using the ti driver. How do you tell the system to use HW
checksumming, setsockopt/ioctl? Or is it default if an on-board NIC CPU is
present? Do you know a nice starting point to look at the code?
=20
> =09-is
>=20

-ph