Hello,

I have a network driver that supports hardware checksums.
Thanks to offset parameters, it also supports VLAN checksums.
However, it does not handle hardware tagging (not sure the underlying network 
adapter can actually do it)

Unfortunately, the VLAN hardware checksums seem to be done only if 
IFCAP_VLAN_HWTAGGING is set [1]
I do not understand this assertion: if I force the propagation of the hardware 
checksuming only based on the IFCAP_VLAN_HWCSUM, it works fine with my driver.

What do you think?

Emeric


[1]:
In ./net/if_vlan.c, function vlan_capabilities :

    /*  
     * If the parent interface can do checksum offloading
     * on VLANs, then propagate its hardware-assisted
     * checksumming flags. Also assert that checksum
     * offloading requires hardware VLAN tagging.
     */
    if (p->if_capabilities & IFCAP_VLAN_HWCSUM)
        ifp->if_capabilities = p->if_capabilities & IFCAP_HWCSUM;

    if (p->if_capenable & IFCAP_VLAN_HWCSUM &&
        p->if_capenable & IFCAP_VLAN_HWTAGGING) {
        ifp->if_capenable = p->if_capenable & IFCAP_HWCSUM;
        ifp->if_hwassist = p->if_hwassist & (CSUM_IP | CSUM_TCP |
            CSUM_UDP | CSUM_SCTP);
    } else {
        ifp->if_capenable = 0;
        ifp->if_hwassist = 0;
    }
_______________________________________________
freebsd-net@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"

Reply via email to