Page MenuHomeFreeBSD

iflib: update rs_pending based on descriptors consumed by isc_txd_encap
AcceptedPublic

Authored by gallatin on Wed, Sep 2, 1:01 PM.
Tags
None
Referenced Files
F169849579: D59321.id185620.diff
Wed, Sep 2, 6:21 PM
F169838041: D59321.id.diff
Wed, Sep 2, 5:30 PM
F169837920: D59321.diff
Wed, Sep 2, 5:29 PM
F169821680: D59321.diff
Wed, Sep 2, 4:25 PM
F169821454: D59321.id185620.diff
Wed, Sep 2, 4:24 PM
F169821446: D59321.diff
Wed, Sep 2, 4:24 PM
F169821408: D59321.diff
Wed, Sep 2, 4:24 PM
F169821329: D59321.diff
Wed, Sep 2, 4:24 PM

Details

Reviewers
kbowling
netchild
shurd
Group Reviewers
iflib
Summary

The new watchdog code is triggering spurious watchdog resets on my out-of-tree NICs using ktls.

The issue is that rs_pending is updated using the descriptors for the current packet, based on what bus_dma produced.
However, NICs which support ktls offload may do extra DMAs (and consume extra segs) to derive crypto state when re-transmitting
TLS segments. This is the reason for allowing drivers to control ift_pad. When this happens, rs_pending may
be undercounted. This was harmless before, but is causing spurious watchdog resets now.

Fix this by using the actual segments consumed by the NICs isc_txd_encap.

Note this removes this historical overcount by one.

This patch has been stable on my test hardware (in combination with https://reviews.freebsd.org/D59204)

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

I think this is a strict accounting improvement. e1000 manufactures some descriptors in a couple situations to work around hw errata, although I'm not sure that direct RS wb would've faulted.

This revision is now accepted and ready to land.Wed, Sep 2, 4:38 PM