aboutsummaryrefslogtreecommitdiff
path: root/sys/net/vnet.h
diff options
context:
space:
mode:
authorGleb Smirnoff <glebius@FreeBSD.org>2014-02-07 13:47:33 +0000
committerGleb Smirnoff <glebius@FreeBSD.org>2014-02-07 13:47:33 +0000
commitb5c32cf48155b27ed591f9da15ee5f8683012ba4 (patch)
tree392f902b4f5323d7707e1fabb463a780a854b961 /sys/net/vnet.h
parent5de8a0fdf4b02001ced7347f103029cef15c3a8e (diff)
downloadsrc-b5c32cf48155b27ed591f9da15ee5f8683012ba4.tar.gz
src-b5c32cf48155b27ed591f9da15ee5f8683012ba4.zip
Remove identical vnet sysctl handlers, and handle CTLFLAG_VNET
in the sysctl_root(). Note: SYSCTL_VNET_* macros can be removed as well. All is needed to virtualize a sysctl oid is set CTLFLAG_VNET on it. But for now keep macros in place to avoid large code churn. Sponsored by: Nginx, Inc.
Notes
Notes: svn path=/head/; revision=261590
Diffstat (limited to 'sys/net/vnet.h')
-rw-r--r--sys/net/vnet.h13
1 files changed, 4 insertions, 9 deletions
diff --git a/sys/net/vnet.h b/sys/net/vnet.h
index 4e9de11efa1c..b3a2a3442410 100644
--- a/sys/net/vnet.h
+++ b/sys/net/vnet.h
@@ -290,15 +290,10 @@ void vnet_data_free(void *start_arg, int size);
* arguments themselves, if required.
*/
#ifdef SYSCTL_OID
-int vnet_sysctl_handle_int(SYSCTL_HANDLER_ARGS);
-int vnet_sysctl_handle_opaque(SYSCTL_HANDLER_ARGS);
-int vnet_sysctl_handle_string(SYSCTL_HANDLER_ARGS);
-int vnet_sysctl_handle_uint(SYSCTL_HANDLER_ARGS);
-
#define SYSCTL_VNET_INT(parent, nbr, name, access, ptr, val, descr) \
SYSCTL_OID(parent, nbr, name, \
CTLTYPE_INT|CTLFLAG_MPSAFE|CTLFLAG_VNET|(access), \
- ptr, val, vnet_sysctl_handle_int, "I", descr)
+ ptr, val, sysctl_handle_int, "I", descr)
#define SYSCTL_VNET_PROC(parent, nbr, name, access, ptr, arg, handler, \
fmt, descr) \
CTASSERT(((access) & CTLTYPE) != 0); \
@@ -312,16 +307,16 @@ int vnet_sysctl_handle_uint(SYSCTL_HANDLER_ARGS);
#define SYSCTL_VNET_STRING(parent, nbr, name, access, arg, len, descr) \
SYSCTL_OID(parent, nbr, name, \
CTLTYPE_STRING|CTLFLAG_VNET|(access), \
- arg, len, vnet_sysctl_handle_string, "A", descr)
+ arg, len, sysctl_handle_string, "A", descr)
#define SYSCTL_VNET_STRUCT(parent, nbr, name, access, ptr, type, descr) \
SYSCTL_OID(parent, nbr, name, \
CTLTYPE_OPAQUE|CTLFLAG_VNET|(access), ptr, \
- sizeof(struct type), vnet_sysctl_handle_opaque, "S," #type, \
+ sizeof(struct type), sysctl_handle_opaque, "S," #type, \
descr)
#define SYSCTL_VNET_UINT(parent, nbr, name, access, ptr, val, descr) \
SYSCTL_OID(parent, nbr, name, \
CTLTYPE_UINT|CTLFLAG_MPSAFE|CTLFLAG_VNET|(access), \
- ptr, val, vnet_sysctl_handle_uint, "IU", descr)
+ ptr, val, sysctl_handle_int, "IU", descr)
#define VNET_SYSCTL_ARG(req, arg1) do { \
if (arg1 != NULL) \
arg1 = (void *)(TD_TO_VNET((req)->td)->vnet_data_base + \