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)
Wed, Apr 17, 5:58 AM
Unknown Object (File)
Wed, Apr 17, 5:54 AM
Unknown Object (File)
Feb 12 2024, 8:13 AM
Unknown Object (File)
Dec 31 2023, 9:48 AM
Unknown Object (File)
Dec 31 2023, 9:48 AM
Unknown Object (File)
Dec 20 2023, 10:53 AM
Unknown Object (File)
Dec 2 2023, 10:37 PM
Unknown Object (File)
Nov 1 2023, 10:12 PM
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).