* [9fans] on board IP/TCP/UDP checksums
@ 2003-02-12 18:54 David Presotto
0 siblings, 0 replies; only message in thread
From: David Presotto @ 2003-02-12 18:54 UTC (permalink / raw)
To: 9fans
Anyone out there know the details of checksum calculations on
various ether chips/cards? Jmk and I are currently sticking in
support for hardware checksuming on the intel 82543gc. We
created flags in the Block header that mean 'do IP and/or
UDP and/or TCP checksum for this packet' outbound to the
interface and mean 'IP and/or UDP and/or TCP checksum
already done' for incoming packets. We also added a ushort
that can be used to carry the whole packet checksum
so that we can support v6:
/* flag values */
enum
{
BINTR = (1<<0),
BFREE = (1<<1),
Bipck = (1<<2), /* ip checksum */
Budpck = (1<<3), /* udp checksum */
Btcpck = (1<<4), /* tcp checksum */
Bpktck = (1<<5), /* packet checksum */
};
struct Block
{
Block* next;
Block* list;
uchar* rp; /* first unconsumed byte */
uchar* wp; /* first empty byte */
uchar* lim; /* 1 past the end of the buffer */
uchar* base; /* start of the buffer */
void (*free)(Block*);
ushort flag;
ushort checksum; /* IP checksum of complete packet (minus media header) */
};
I'm wondering if this will be sufficient for other chips/cards but
know nothing about them and would appreciate any elucidation from the
community.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2003-02-12 18:54 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-02-12 18:54 [9fans] on board IP/TCP/UDP checksums David Presotto
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).