diff options
| author | Gleb Smirnoff <glebius@FreeBSD.org> | 2017-10-09 20:35:31 +0000 |
|---|---|---|
| committer | Gleb Smirnoff <glebius@FreeBSD.org> | 2017-10-09 20:35:31 +0000 |
| commit | e8fd18f306915c411b08ab4664ec0aa3bc03d4d4 (patch) | |
| tree | 889c5459ce4e793e93ed7c8618572e602b4bf058 /sys/dev/netmap/netmap_generic.c | |
| parent | 32b413d7f0c47e033002e639b2049667b0891113 (diff) | |
Shorten list of arguments to mbuf external storage freeing function.
All of these arguments are stored in m_ext, so there is no reason
to pass them in the argument list. Not all functions need the second
argument, some don't even need the first one. The second argument
lives in next cache line, so not dereferencing it is a performance
gain. This was discovered in sendfile(2), which will be covered by
next commits.
The second goal of this commit is to bring even more flexibility
to m_ext mbufs, allowing to create more fields in m_ext, opaque to
the generic mbuf code, and potentially set and dereferenced by
subsystems.
Reviewed by: gallatin, kbowling
Differential Revision: https://reviews.freebsd.org/D12615
Notes
svn path=/head/; revision=324446
Diffstat (limited to 'sys/dev/netmap/netmap_generic.c')
| -rw-r--r-- | sys/dev/netmap/netmap_generic.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/netmap/netmap_generic.c b/sys/dev/netmap/netmap_generic.c index 30f83a920825..939fed5b573b 100644 --- a/sys/dev/netmap/netmap_generic.c +++ b/sys/dev/netmap/netmap_generic.c @@ -166,7 +166,7 @@ nm_os_get_mbuf(struct ifnet *ifp, int len) * has a KASSERT(), checking that the mbuf dtor function is not NULL. */ -static void void_mbuf_dtor(struct mbuf *m, void *arg1, void *arg2) { } +static void void_mbuf_dtor(struct mbuf *m) { } #define SET_MBUF_DESTRUCTOR(m, fn) do { \ (m)->m_ext.ext_free = (fn != NULL) ? \ @@ -624,7 +624,7 @@ generic_mbuf_destructor(struct mbuf *m) * txsync. */ netmap_generic_irq(na, r, NULL); #ifdef __FreeBSD__ - void_mbuf_dtor(m, NULL, NULL); + void_mbuf_dtor(m); #endif } |
