Previously, we couldn't enable TCP/UDP transmit checksum offload
on chipsets that require the checksum field to be initialized with
the pseudo-header checksum because this would break rdr-to 127.0.0.1.
Henning's epic rewrite of the checksum handling has fixed this
problem, so let's enable TCP/UDP checksumming on bge(4). This
_might_ break on some of the gazillion chipset versions. There's
no way to find out but try.
FWIW, it works fine with VLAN on this one:
bge0 at pci0 dev 5 function 0 "Broadcom BCM5702X" rev 0x02, BCM5702/5703
A2 (0x1002)
Index: if_bge.c
===================================================================
RCS file: /cvs/src/sys/dev/pci/if_bge.c,v
retrieving revision 1.312
diff -u -p -r1.312 if_bge.c
--- if_bge.c 13 Sep 2012 04:15:18 -0000 1.312
+++ if_bge.c 2 Nov 2012 22:13:39 -0000
@@ -2157,10 +2157,8 @@ bge_attach(struct device *parent, struct
* to hardware bugs.
*/
if (sc->bge_chipid != BGE_CHIPID_BCM5700_B0)
- ifp->if_capabilities |= IFCAP_CSUM_IPv4;
-#if 0 /* TCP/UDP checksum offload breaks with pf(4) */
- ifp->if_capabilities |= IFCAP_CSUM_TCPv4|IFCAP_CSUM_UDPv4;
-#endif
+ ifp->if_capabilities |= IFCAP_CSUM_IPv4 | IFCAP_CSUM_TCPv4 |
+ IFCAP_CSUM_UDPv4;
if (BGE_IS_JUMBO_CAPABLE(sc))
ifp->if_hardmtu = BGE_JUMBO_MTU;
--
Christian "naddy" Weisgerber [email protected]