Page MenuHomeFreeBSD

sfxge: access statistics buffers under port lock
ClosedPublic

Authored by arybchik on Jan 28 2015, 9:12 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Sep 27, 12:32 AM
Unknown Object (File)
Sat, Sep 20, 3:48 PM
Unknown Object (File)
Sep 2 2025, 7:56 PM
Unknown Object (File)
Sep 1 2025, 10:07 AM
Unknown Object (File)
Sep 1 2025, 4:15 AM
Unknown Object (File)
Sep 1 2025, 12:06 AM
Unknown Object (File)
Aug 31 2025, 11:57 PM
Unknown Object (File)
Aug 31 2025, 6:22 PM
Subscribers

Details

Reviewers
gnn
Summary

Allow access to statistics data not only from sysctl handlers.

Submitted by: Boris Misenov <Boris.Misenov at oktetlabs.ru>
Sponsored by: Solarflare Communications, Inc.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

arybchik retitled this revision from to sfxge: access statistics buffers under port lock.
arybchik updated this object.
arybchik edited the test plan for this revision. (Show Details)
arybchik added a reviewer: gnn.
arybchik added a subscriber: Unknown Object (MLST).
gnn requested changes to this revision.Jan 29 2015, 3:57 PM
gnn edited edge metadata.

If you look at other drivers you'll see they have #define'd macros for the locks, rather than direct calls. This allows us to name the lock in the macro. See, for instance, this example from cxgbe/adapter.h:

#define ADAPTER_LOCK(sc) mtx_lock(&(sc)->sc_lock)
#define ADAPTER_UNLOCK(sc) mtx_unlock(&(sc)->sc_lock)
#define ADAPTER_LOCK_ASSERT_OWNED(sc) mtx_assert(&(sc)->sc_lock, MA_OWNED)
#define ADAPTER_LOCK_ASSERT_NOTOWNED(sc) mtx_assert(&(sc)->sc_lock, MA_NOTOWNED)

You should move to this model and then update the patch.

This revision now requires changes to proceed.Jan 29 2015, 3:57 PM

I've published review request D1772 to add macros. Please, review.
Also I have a patch to make lock names unique - will follow.

arybchik edited subscribers, added: network; removed: Unknown Object (MLST).
arybchik edited edge metadata.

Use macros to acquire, release and assert locks

gnn edited edge metadata.
This revision is now accepted and ready to land.Feb 5 2015, 11:27 AM