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)
Sep 12 2024, 6:36 AM
Unknown Object (File)
Sep 8 2024, 6:28 AM
Unknown Object (File)
Sep 8 2024, 5:28 AM
Unknown Object (File)
Aug 18 2024, 3:39 PM
Unknown Object (File)
Aug 14 2024, 11:59 PM
Unknown Object (File)
Aug 13 2024, 1:07 PM
Unknown Object (File)
Aug 11 2024, 9:57 PM
Unknown Object (File)
Aug 5 2024, 1:08 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.