Page MenuHomeFreeBSD

sys/net: only panic on unset tx_csum_flags if cap is disabled
AbandonedPublic

Authored by corvink on Aug 16 2023, 11:55 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Apr 28, 2:57 AM
Unknown Object (File)
Fri, Apr 26, 5:09 PM
Unknown Object (File)
Fri, Apr 26, 1:27 AM
Unknown Object (File)
Mon, Apr 22, 7:45 PM
Unknown Object (File)
Apr 6 2024, 11:01 AM
Unknown Object (File)
Feb 4 2024, 9:07 PM
Unknown Object (File)
Jan 1 2024, 12:46 PM
Unknown Object (File)
Dec 23 2023, 8:34 AM

Details

Summary
isc_capabilites contains all capabilities of the device. isc_capenable
contains all capabilities which should be enabled. If the TXCSUM should
be disabled, it's valid to set tx_csum_flags to zero.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

This revision is now accepted and ready to land.Aug 16 2023, 12:06 PM
kbowling added a subscriber: kbowling.

What is triggering this for you?

The invariant is designed to catch a driver bug where the driver expresses TXCSUM capability but does not define what isc_tx_csum_flags it supports (see i.e. recent e1000 lem fix). It shouldn't occur that you have the capability but no isc_tx_csum_flags.

This revision now requires changes to proceed.Aug 16 2023, 5:49 PM

I'm going to agree with @kbowling here -- it looks like it's a driver bug / reasonable to fail if the driver sets IFCAP_TXCSUM without setting the CSUM_* bits that it supports for transmit checksumming.

I think I agree with Eric and Kevin after looking at this further, and withdraw my approval

Got confused by the meaning of isc_capabilites and isc_capenable. Sry for the noise.