On 27/01/14 3:30 PM, Christian Weisgerber wrote:
Some bge(4) chips support IPv6 TCP checksum transmit offload.
Unfortunately, I have no idea which. My best guess is that this
is symmetrical with the receive offload capability:
if (BGE_IS_5755_PLUS(sc))
mode |= BGE_RXMODE_IPV6_ENABLE;
After taking a look around at the various datasheets I was
going to propose more or less the same diff. The only difference
I had was moving it outside of the if (sc->bge_chipid !=
BGE_CHIPID_BCM5700_B0) check as 5755 and newer ASICs are
newer than the BCM5700 anyway.
So here is an experimental patch to enable it on 5755 and later
chips. Courageous people who use both IPv6 and bge(4) might want
to try it. If you do, please let me know about success and failure
and what chip.
$ dmesg | grep ^bge
bge0 at pci2 dev 0 function 0 "Broadcom BCM5761" rev 0x10, BCM5761 A1
(0x5761100)
That's one that works.
I have also verified that UDP checksum offload is indeed broken as
the comment in the driver claims. For both IPv4 and IPv6, some
packets with checksum 0 are generated.
Index: if_bge.c
===================================================================
RCS file: /cvs/src/sys/dev/pci/if_bge.c,v
retrieving revision 1.346
diff -u -p -r1.346 if_bge.c
--- if_bge.c 30 Dec 2013 18:47:45 -0000 1.346
+++ if_bge.c 27 Jan 2014 19:43:18 -0000
@@ -2942,8 +2942,11 @@ bge_attach(struct device *parent, struct
* offloading is enabled. Generating UDP checksum value 0 is
* a violation of RFC 768.
*/
- if (sc->bge_chipid != BGE_CHIPID_BCM5700_B0)
+ if (sc->bge_chipid != BGE_CHIPID_BCM5700_B0) {
ifp->if_capabilities |= IFCAP_CSUM_IPv4 | IFCAP_CSUM_TCPv4;
+ if (BGE_IS_5755_PLUS(sc))
+ ifp->if_capabilities |= IFCAP_CSUM_TCPv6;
+ }
if (BGE_IS_JUMBO_CAPABLE(sc))
ifp->if_hardmtu = BGE_JUMBO_MTU;
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.