lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20201205173034.2695-1-stefan.eschenbacher@fau.de>
Date:   Sat,  5 Dec 2020 18:30:34 +0100
From:   Stefan Eschenbacher <stefan.eschenbacher@....de>
To:     "K. Y. Srinivasan" <kys@...rosoft.com>,
        Haiyang Zhang <haiyangz@...rosoft.com>,
        Stephen Hemminger <sthemmin@...rosoft.com>,
        Wei Liu <wei.liu@...nel.org>
Cc:     Stefan Eschenbacher <stefan.eschenbacher@....de>,
        linux-hyperv@...r.kernel.org, linux-kernel@...r.kernel.org,
        linux-kernel@...cs.fau.de, Max Stolze <max.stolze@....de>
Subject: [PATCH 3/3] drivers/hv: add default number of vmbus channels to Kconfig

The default number of vmbus channels (macro
MAX_NUM_CHANNELS_SUPPORTED_DEFAULT) is made configurable through the new
Kconfig option HYPERV_VMBUS_DEFAULT_CHANNELS.

Signed-off-by: Stefan Eschenbacher <stefan.eschenbacher@....de>
Co-developed-by: Max Stolze <max.stolze@....de>
Signed-off-by: Max Stolze <max.stolze@....de>
---
 drivers/hv/Kconfig        | 13 +++++++++++++
 drivers/hv/hyperv_vmbus.h |  2 +-
 2 files changed, 14 insertions(+), 1 deletion(-)

diff --git a/drivers/hv/Kconfig b/drivers/hv/Kconfig
index 79e5356a737a..40bee5b05ccd 100644
--- a/drivers/hv/Kconfig
+++ b/drivers/hv/Kconfig
@@ -26,4 +26,17 @@ config HYPERV_BALLOON
 	help
 	  Select this option to enable Hyper-V Balloon driver.
 
+config HYPERV_VMBUS_DEFAULT_CHANNELS
+	int "Default number of VMBus channels (as multiple of 32)"
+	range 0 512
+	default 8
+	depends on HYPERV
+	help
+	  Specify the default number of VMBus channels here as nth multiple of
+	  32. The value must be equal to or less than 512.
+	  The default is 8 meaning the number of channels is 8 * 32 = 256.
+	  A different value can be set when loading the hv_vmbus module by
+	  setting the parameter max_num_channels_supported directly to the
+	  number of channels and not as a multiple of 32.
+
 endmenu
diff --git a/drivers/hv/hyperv_vmbus.h b/drivers/hv/hyperv_vmbus.h
index 52dcfa1c17ef..47af2c76ce57 100644
--- a/drivers/hv/hyperv_vmbus.h
+++ b/drivers/hv/hyperv_vmbus.h
@@ -194,7 +194,7 @@ int hv_ringbuffer_read(struct vmbus_channel *channel,
 #define MAX_NUM_CHANNELS	((HV_HYP_PAGE_SIZE >> 1) << 3)
 
 /* The value here must be in multiple of 32 */
-#define MAX_NUM_CHANNELS_SUPPORTED_DEFAULT	256
+#define MAX_NUM_CHANNELS_SUPPORTED_DEFAULT	(CONFIG_HYPERV_VMBUS_DEFAULT_CHANNELS * 32)
 extern uint max_num_channels_supported;
 
 #define MAX_CHANNEL_RELIDS					\
-- 
2.20.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ