Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1299637pxu; Sat, 5 Dec 2020 10:38:55 -0800 (PST) X-Google-Smtp-Source: ABdhPJz3xqd6fM9Iq7LTZ168VXdMtbLw13AiVADCJ0boGS3i7ASAlwWEMH8G8qkEZK9W/bDBV5SH X-Received: by 2002:a50:d2d2:: with SMTP id q18mr12893377edg.346.1607193535280; Sat, 05 Dec 2020 10:38:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607193535; cv=none; d=google.com; s=arc-20160816; b=erA9Ze5ruAzlsOwhiTHthTzm+aH+TTvqlHu6X1BR4fbguNWpzztkZFGu/pCx4ZZYq+ qdgMCoh83aCUEtOwlEOEW2450F1Gtr/4hILft5k8w4YnH/hD4DC9n3g0RI8+7hG5tXtd rZ57BQ85FrrKiKZWjbJ48lyRFphxl6YhQKyqViYSO/fjWjV3+7cRJO2ot0mqk9qlfafF Mpxbn8/RfDjAaDhoP9dzwFMs2nY5iGWM+XirjcPT8udeMn67W32/pbRxYRHOXA0Qfdli ASuCoCjmGFO3aK2aCHe+aJC0ihuZ2cMrfqFA6082Xg3isgO/HLEJM2WSIDx8CQjJKDR/ rRog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=DGGoQSG0Un9wM+arnXQR3Zkr/F6/OfaJAJiiaONz5HI=; b=hpPVn8iplV2Th0bwOoKjioXqag42Xs1bKwlRnDAAje1N4Cdtu1d3QsIsuZu7RH0DuF eL+CoCZtxUVW49ZbxVXCDWBPjvFKq5ZalGJ8k1ZsClWQWZYVLbcKuP40dpfssl902Uy2 K7NnoBtYdvmpqI5AW1nX5jdGn7lA7LVn8D4R9pi68jg7Mbmkbn64tCeqkybaV+bl6VWe 86JsCgUvBY0Tik1+0wwZhYwRpfErdrW8R9ITvwzpeoiVhDyjAsKhQGE1UkcHpoLMHWA2 g5Z8og//HizUSE77e0i6asyabZSXC6wQT9MiR/1SkvzPc45khQuVwoXbXw0MpPm5TVGJ YCtA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h7si3417560ejj.159.2020.12.05.10.38.32; Sat, 05 Dec 2020 10:38:55 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729758AbgLESTl (ORCPT + 99 others); Sat, 5 Dec 2020 13:19:41 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35296 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727846AbgLERqn (ORCPT ); Sat, 5 Dec 2020 12:46:43 -0500 Received: from faui03.informatik.uni-erlangen.de (faui03.informatik.uni-erlangen.de [IPv6:2001:638:a000:4130:131:188:30:103]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A193AC02B8F7; Sat, 5 Dec 2020 09:30:36 -0800 (PST) Received: from cip4d0.informatik.uni-erlangen.de (cip4d0.cip.cs.fau.de [IPv6:2001:638:a000:4160:131:188:60:59]) by faui03.informatik.uni-erlangen.de (Postfix) with ESMTP id 4784E241063; Sat, 5 Dec 2020 18:30:35 +0100 (CET) Received: by cip4d0.informatik.uni-erlangen.de (Postfix, from userid 68457) id 44CE8D8049E; Sat, 5 Dec 2020 18:30:35 +0100 (CET) From: Stefan Eschenbacher To: "K. Y. Srinivasan" , Haiyang Zhang , Stephen Hemminger , Wei Liu Cc: Stefan Eschenbacher , linux-hyperv@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kernel@i4.cs.fau.de, Max Stolze Subject: [PATCH 3/3] drivers/hv: add default number of vmbus channels to Kconfig Date: Sat, 5 Dec 2020 18:30:34 +0100 Message-Id: <20201205173034.2695-1-stefan.eschenbacher@fau.de> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201205172650.2290-1-stefan.eschenbacher@fau.de> References: <20201205172650.2290-1-stefan.eschenbacher@fau.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Co-developed-by: Max Stolze Signed-off-by: Max Stolze --- 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