DM9000A
APPLICATION NOTES
Preliminary 37
Version: DM9000A-AN-V121
November 27, 2007
6.4 IP/TCP/UDP checksums Offload
The DM9000A chip supports the IP/TCP/UDP checksum generations and status checking.
And enable the IP/TCP/UDP checksums offload function in the TCP/IP upper layers of the
embedded OS, while setting the DM9000A IP/TCP/UDP checksum generations and checking.
List powerful function bits in TCSCR & RCSCSR:
TX Check Sum Control Register (TCSCR REG. 31H):
Bit Name Description
2
UDPCSE UDP Check Sum Generation Enable
1
TCPCSE TCP Check Sum Generation Enable
0
IPCSE
IP Check Sum Generation Enable
RX Check Sum Control Status Register (RCSCSR REG. 32H):
Bit Name Description
7
UDPS
UDP Check Sum Status
0: checksum OK, if UDP packet received.
6
TCPS
TCP Check Sum Status
0: checksum OK, if TCP packet received.
5
IPS
IP Check Sum Status
0: checksum OK, if IP packet received.
4
UDPP
UDP Packet if indicating 1
3
TCPP
TCP Packet if indicating 1
2
IPP
IP Packet if indicating 1
1
RCSEN
Receive Check Sum Enable Checking
When set, the checksum status will be stored in packet first byte of status header.
0
DCSE
Discard Check Sum Error Packets
When set, if IP/TCP/UDP checksum field is error, this packet will be discarded.
For example,
#define TCSCR
0x31
#define RCSCSR 0x32
iow ( TCSCR , 0x07 );
/* TX IPCSE + UDPCSE cs-generation enable */
iow ( RCSCSR , 0x03 );
/* RX checksums checking bad-pkt-discard enable */
/* IPS/TCPS/UDPS indicating check-sum status, while RX IP/TCP/UDP (good) packets */