[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Hardware checksums on bge(4) interfaces
hello. Could you try the following patch and let me know if you get
better results? I'm testing it on a couple of machines here, and, so far,
things look promising.
Our driver initializes the Broadcom hardware to peform a tcp and udp
checksum on only the payload of the tcp or udp packet, rather than the
entire packet. The FreeBSD and Linux drivers instruct the hardware to compute
the checksum for the entire packet. I believe the bug is that some revisions
of the BCM hardware, under certain circumstances, revert to doing the
complete checksum calculation, as the FreeBSD and Linux drivers request, while
things are running. As
a result, when we pull the computed checksum from the hardware and pass it
up to the upper layers, we assume the checksum is the more minimal
one, and the upper layers perform the appropriate checks, which, when this
happens, cause the packet to be rejected because the resultant checksum is
This patch changes the driver to instruct the hardware to perform the
checksum over the entire packet, just as the FreeBSD and Linux drivers do,
and to notify the upper layers appropriately.
If this patch works, I'll amend the bug report to include the patch
and this explanation.
The patch file below was made against 5.x sources, but applies cleanly
to 4.x and 3.x sources as well. I haven't tried, but I assume it will apply
cleanly to -current sources too.
Let me know what you find.
RCS file: /cvsroot/src/sys/dev/pci/if_bge.c,v
retrieving revision 184.108.40.206
diff -u -r220.127.116.11 if_bge.c
--- if_bge.c 2 Feb 2009 20:44:16 -0000 18.104.22.168
+++ if_bge.c 15 Sep 2010 07:12:43 -0000
@@ -1444,7 +1444,7 @@
CSR_WRITE_4(sc, BGE_MODE_CTL, BGE_DMA_SWAP_OPTIONS|
/* Get cache line size. */
cachesize = pci_conf_read(sc->sc_pc, sc->sc_pcitag, BGE_PCI_CACHESZ);
@@ -3276,7 +3276,7 @@
Main Index |
Thread Index |