summaryrefslogtreecommitdiff
path: root/sys/dev/netmap
diff options
context:
space:
mode:
authorLuigi Rizzo <luigi@FreeBSD.org>2015-02-14 18:59:31 +0000
committerLuigi Rizzo <luigi@FreeBSD.org>2015-02-14 18:59:31 +0000
commitc929ca72c93bc519ac32790778525394ee4bb446 (patch)
treeba723e81dc36d1c19c18f3561c9703bb9a77bb46 /sys/dev/netmap
parent8e6dd301f024e47999997479f0bff219e73b4588 (diff)
Notes
Diffstat (limited to 'sys/dev/netmap')
-rw-r--r--sys/dev/netmap/netmap.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/sys/dev/netmap/netmap.c b/sys/dev/netmap/netmap.c
index 959b2703fc8f..4f4d6c6108ca 100644
--- a/sys/dev/netmap/netmap.c
+++ b/sys/dev/netmap/netmap.c
@@ -3071,16 +3071,14 @@ netmap_init(void)
error = netmap_mem_init();
if (error != 0)
goto fail;
- /* XXX could use make_dev_credv() to get error number */
-#ifdef __FreeBSD__
- /* support for the 'eternal' flag */
+ /*
+ * MAKEDEV_ETERNAL_KLD avoids an expensive check on syscalls
+ * when the module is compiled in.
+ * XXX could use make_dev_credv() to get error number
+ */
netmap_dev = make_dev_credf(MAKEDEV_ETERNAL_KLD,
&netmap_cdevsw, 0, NULL, UID_ROOT, GID_WHEEL, 0600,
"netmap");
-#else
- netmap_dev = make_dev(&netmap_cdevsw, 0, UID_ROOT, GID_WHEEL, 0600,
- "netmap");
-#endif
if (!netmap_dev)
goto fail;