[PATCH 055/111] GRETH: avoid hw generated UDP/TCP cksum generation

Daniel Hellstrom daniel at gaisler.com
Thu Feb 26 16:38:57 UTC 2015


Hardware generated checksum UDP packets does not work for
IP fragmented UDP packets. It seems as if the BSD stack never
signals to the GRETH driver to generate or not to generate
TCP/UDP checksum for different cases. The GRETH driver never
tells the BSD stack about it capabilities either so there is
no point generating the cksums in HW when its done in SW any
way.

This patch disables hardware generated UDP and TCP checksums.
---
 c/src/lib/libbsp/sparc/shared/net/greth.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/c/src/lib/libbsp/sparc/shared/net/greth.c b/c/src/lib/libbsp/sparc/shared/net/greth.c
index d721586..71562a1 100644
--- a/c/src/lib/libbsp/sparc/shared/net/greth.c
+++ b/c/src/lib/libbsp/sparc/shared/net/greth.c
@@ -920,9 +920,9 @@ sendpacket_gbit (struct ifnet *ifp, struct mbuf *m)
 
             /* Wrap around? */
             if (dp->tx_ptr < dp->txbufs-1) {
-                ctrl = GRETH_TXD_ENABLE | GRETH_TXD_CS;
+                ctrl = GRETH_TXD_ENABLE;
             }else{
-                ctrl = GRETH_TXD_ENABLE | GRETH_TXD_CS | GRETH_TXD_WRAP;
+                ctrl = GRETH_TXD_ENABLE | GRETH_TXD_WRAP;
             }
 
             /* Enable Descriptor */  
-- 
1.7.0.4




More information about the devel mailing list