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-kern
Date: 09/06/2001 13:17:57
If we assume using NIC DMA to access main memory and using UDP/IP
calculating UDP checksum, filling the IP header and caclulating IP header
checksum.
Does this mean that the checksum offload requires more bus transfers than
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?
-ph
On Thu, 6 Sep 2001, Ignatios Souvatzis wrote:
> On Thu, Sep 06, 2001 at 10:59:58AM +0200, P=E5l Halvorsen wrote:
> =20
> > Is the packet transmitted to the NIC memory or can the NIC CPU access t=
he
> > main memory?
>=20
> This depends on the NIC and the machine it is plugged into.
>=20
> Modern NICs can do DMA, so yes, they do access (some of) the main machine=
s
> memory. Depending on PCI bus implementation, this might be any memory the=
=20
> packet happens to be in, or just some specialized memory accessible to th=
e
> bus, and some copy might happen later. The details of this are hidden fro=
m
> the NIC and the NIC driver by the NetBSD bus_dma abstraction. Read more a=
bout
> it with "man bus_dma".
>=20
> =09-is
>=20
-ph
--- . o o . o . o .. o .. o .. o oo . o . o o o
_n_n_n____i_i _++++++_ _______ ________ _+++++++++++_
*>(____________I I______I I_____I I______I I___________I
__^__ /ooOOOO OOOOoo oo ooo oo oo oo oo ooo ooo __^__
( ___ )--------------------------------------------------------( ___ )
| / | Paal Halvorsen UniK - Center for technology at Kjeller | \ |
| / | University of Oslo | \ |
| / | Phone: +47 64844731 PB. 70 | \ |
| / | Phone: +47 64844700 (switchboard) N - 2027 KJELLER | \ |
|_/_| Fax: +47 63818146 Norway |__|
(_____)-- E-mail: paalh@unik.no -- http://www.unik.no/~paalh --(_____)