Hi,

I noticed that for some offloading-capable em controllers checksum
offloading is still disabled and I couldn't find a reason for that.

It was assumed during initial implementation:
https://marc.info/?l=openbsd-tech&m=137875739832438&w=2

According to the datasheets of the i350 controllers listed below,
they do support the usual offloading features.
https://www.intel.com/content/www/us/en/products/details/ethernet/gigabit-controllers/i350-controllers.html

tested with
em0 at pci3 dev 0 function 0 "Intel I350" rev 0x01: msi
and
em0 at pci0 dev 31 function 6 "Intel I219-LM" rev 0x21: msi

I would appreciate any further feedback, discussion and especially testing.

mbuhl


Index: sys/dev/pci/if_em.c
===================================================================
RCS file: /cvs/src/sys/dev/pci/if_em.c,v
retrieving revision 1.361
diff -u -p -r1.361 if_em.c
--- sys/dev/pci/if_em.c 11 Mar 2022 18:00:45 -0000      1.361
+++ sys/dev/pci/if_em.c 24 May 2022 08:47:41 -0000
@@ -1217,9 +1217,7 @@ em_encap(struct em_queue *que, struct mb
        }
 
        if (sc->hw.mac_type >= em_82543 && sc->hw.mac_type != em_82575 &&
-           sc->hw.mac_type != em_82576 &&
-           sc->hw.mac_type != em_82580 && sc->hw.mac_type != em_i210 &&
-           sc->hw.mac_type != em_i350) {
+           sc->hw.mac_type != em_82576 && sc->hw.mac_type != em_82580) {
                used += em_transmit_checksum_setup(que, m, head,
                    &txd_upper, &txd_lower);
        } else {
@@ -1966,9 +1964,7 @@ em_setup_interface(struct em_softc *sc)
 #endif
 
        if (sc->hw.mac_type >= em_82543 && sc->hw.mac_type != em_82575 &&
-           sc->hw.mac_type != em_82576 &&
-           sc->hw.mac_type != em_82580 && sc->hw.mac_type != em_i210 &&
-           sc->hw.mac_type != em_i350)
+           sc->hw.mac_type != em_82576 && sc->hw.mac_type != em_82580)
                ifp->if_capabilities |= IFCAP_CSUM_TCPv4 | IFCAP_CSUM_UDPv4;
 
        /* 

Reply via email to