[Differential] [Requested Changes To] D1707: sfxge: access statistics buffers under port lock

gnn (George Neville-Neil) phabric-noreply at FreeBSD.org
Thu Jan 29 15:57:29 UTC 2015


gnn requested changes to this revision.
gnn added a comment.
This revision now requires changes to proceed.

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.

REVISION DETAIL
  https://reviews.freebsd.org/D1707

To: arybchik, gnn
Cc: freebsd-net


More information about the freebsd-net mailing list