From owner-svn-src-all@freebsd.org Thu Feb 1 16:53:09 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6D2D7EDDC0F; Thu, 1 Feb 2018 16:53:09 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1ED3377962; Thu, 1 Feb 2018 16:53:09 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 182447B1B; Thu, 1 Feb 2018 16:53:09 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w11Gr8aU031850; Thu, 1 Feb 2018 16:53:08 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w11Gr8p4031848; Thu, 1 Feb 2018 16:53:08 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201802011653.w11Gr8p4031848@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Thu, 1 Feb 2018 16:53:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r328692 - in stable/11/sys: conf dev/nvme X-SVN-Group: stable-11 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: in stable/11/sys: conf dev/nvme X-SVN-Commit-Revision: 328692 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Feb 2018 16:53:09 -0000 Author: mav Date: Thu Feb 1 16:53:08 2018 New Revision: 328692 URL: https://svnweb.freebsd.org/changeset/base/328692 Log: MFC r322995 (by imp): 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. Modified: stable/11/sys/conf/options stable/11/sys/dev/nvme/nvme_sysctl.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/conf/options ============================================================================== --- stable/11/sys/conf/options Thu Feb 1 16:52:03 2018 (r328691) +++ stable/11/sys/conf/options Thu Feb 1 16:53:08 2018 (r328692) @@ -1001,3 +1001,6 @@ UINPUT_DEBUG opt_evdev.h # Hyper-V network driver HN_DEBUG opt_hn.h + +# NVME options +NVME_USE_NVD opt_nvme.h Modified: stable/11/sys/dev/nvme/nvme_sysctl.c ============================================================================== --- stable/11/sys/dev/nvme/nvme_sysctl.c Thu Feb 1 16:52:03 2018 (r328691) +++ stable/11/sys/dev/nvme/nvme_sysctl.c Thu Feb 1 16:53:08 2018 (r328692) @@ -27,13 +27,19 @@ #include __FBSDID("$FreeBSD$"); +#include "opt_nvme.h" + #include #include #include #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,