Author: imp
Date: Mon Aug 28 23:54:25 2017
New Revision: 322995
URL: https://svnweb.freebsd.org/changeset/base/322995

Log:
  Add new compile-time option NVME_USE_NVD that sets the default value
  of the runtime hw.nvme.use_vnd tunable. We still default to nvd unless
  otherwise requested.
  
  Sponsored by: Netflix

Modified:
  head/sys/conf/options
  head/sys/dev/nvme/nvme_sysctl.c

Modified: head/sys/conf/options
==============================================================================
--- head/sys/conf/options       Mon Aug 28 23:54:20 2017        (r322994)
+++ head/sys/conf/options       Mon Aug 28 23:54:25 2017        (r322995)
@@ -998,3 +998,6 @@ HN_DEBUG    opt_hn.h
 MMCCAM
 # Encrypted kernel crash dumps
 EKCD           opt_ekcd.h
+
+# NVME options
+NVME_USE_NVD   opt_nvme.h

Modified: head/sys/dev/nvme/nvme_sysctl.c
==============================================================================
--- head/sys/dev/nvme/nvme_sysctl.c     Mon Aug 28 23:54:20 2017        
(r322994)
+++ head/sys/dev/nvme/nvme_sysctl.c     Mon Aug 28 23:54:25 2017        
(r322995)
@@ -27,13 +27,19 @@
 #include <sys/cdefs.h>
 __FBSDID("$FreeBSD$");
 
+#include "opt_nvme.h"
+
 #include <sys/param.h>
 #include <sys/bus.h>
 #include <sys/sysctl.h>
 
 #include "nvme_private.h"
 
-int nvme_use_nvd = 1;
+#ifndef NVME_USE_NVD
+#define NVME_USE_NVD 1
+#endif
+
+int nvme_use_nvd = NVME_USE_NVD;
 
 SYSCTL_NODE(_hw, OID_AUTO, nvme, CTLFLAG_RD, 0, "NVMe sysctl tunables");
 SYSCTL_INT(_hw_nvme, OID_AUTO, use_nvd, CTLFLAG_RDTUN,
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to