Page MenuHomeFreeBSD

netfront: remove XN_LOCK_{INIT,DESTROY}
ClosedPublic

Authored by liuw_liuw.name on Oct 14 2015, 2:45 PM.
Referenced Files
Unknown Object (File)
Fri, Nov 7, 2:57 AM
Unknown Object (File)
Thu, Nov 6, 4:06 AM
Unknown Object (File)
Mon, Oct 20, 5:27 PM
Unknown Object (File)
Oct 8 2025, 5:40 PM
Unknown Object (File)
Sep 23 2025, 4:16 AM
Unknown Object (File)
Sep 21 2025, 4:27 AM
Unknown Object (File)
Sep 20 2025, 1:59 PM
Unknown Object (File)
Sep 20 2025, 1:25 PM
Subscribers

Details

Reviewers
royger
Group Reviewers
network
Summary

Multiqueue feature will make the number of queues dynamic, so XN_LOCK_INIT won't be that useful. Remove the macro and call mtx_init directly.

XN_LOCK_DESTROY is just dead code.

Diff Detail

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

Event Timeline

liuw_liuw.name retitled this revision from to netfront: remove XN_LOCK_{INIT,DESTROY}.
liuw_liuw.name updated this object.
liuw_liuw.name edited the test plan for this revision. (Show Details)
liuw_liuw.name added reviewers: royger, network.
liuw_liuw.name set the repository for this revision to rS FreeBSD src repository - subversion.
liuw_liuw.name added a project: network.
royger edited edge metadata.

LGTM, only a minor comment that I can fix while committing.

sys/dev/xen/netfront/netfront.c
1877

The lock names should be shorter so they can be properly displayed when using top, I would rename "_xennet_tx" to "xntx" and the same for the others ("xnrx", "xnsc").

And "network transmit lock" -> "netfront transmit lock".

This revision is now accepted and ready to land.Oct 15 2015, 7:33 AM
sys/dev/xen/netfront/netfront.c
1877

Didn't bother to change existing long names when I wrote the patch, but of course the changes you suggested are fine by me.