Page MenuHomeFreeBSD

sfxge: assert either kernel or internal copy of interface flags
ClosedPublic

Authored by arybchik on Mar 16 2015, 12:14 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Nov 25, 12:23 AM
Unknown Object (File)
Sat, Nov 23, 10:19 AM
Unknown Object (File)
Nov 17 2024, 5:43 PM
Unknown Object (File)
Nov 9 2024, 10:32 AM
Unknown Object (File)
Nov 8 2024, 8:50 AM
Unknown Object (File)
Oct 10 2024, 3:00 AM
Unknown Object (File)
Oct 2 2024, 4:55 PM
Unknown Object (File)
Oct 2 2024, 3:30 AM
Subscribers

Details

Summary

ioctl to put interface down sets ifp->if_flags which holds the intended
administratively defined state and calls driver callback to apply it.
When everything is done, driver updates internal copy of
interface flags sc->if_flags which holds the operational state.
So, transmit from Rx path is possible when interface is intended to be
administratively down in accordance with ifp->if_flags, but not applied
yet and the operational state is up in accordance with sc->if_flags.

Sponsored by: Solarflare Communications, Inc.

Test Plan

Module build tested.
Driver tested with invariants.
Interface up/down tested under traffic.
Interface is tested as port in link aggregation.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

arybchik retitled this revision from to sfxge: assert either kernel or internal copy of interface flags.
arybchik updated this object.
arybchik edited the test plan for this revision. (Show Details)
arybchik added a reviewer: gnn.

Why is this an assert rather than an error return?

It is an extra conditional. The check exists and packets are dropped when deferred packet list is served.
Assert is useful to double-check driver prerequisites.

arybchik updated this revision to Diff 4348.

Closed by commit rS280374 (authored by @arybchik).