From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [IPv6:2a01:7e0:0:424::9]) by lore.proxmox.com (Postfix) with ESMTPS id DF9281FF142 for ; Fri, 05 Jun 2026 21:41:06 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 7B3593302F; Fri, 5 Jun 2026 21:40:56 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=budzowski.pl; s=default; t=1780672545; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=buTjJCZbpchyX7KfDHnCwRdV35BaeuZGK0v0a3euzxw=; b=Z9FZgt+5Zl2llAEUIa4jkCuoEXj5PnF2rIKri3ih40LCNXyLRUvKmEGZo1fIv7cZX3U3kp LiIgmDDHxV2lNgTMLT3byvT0rcvYt7uef5PswDBdoElXtWmzdf7LoYEZsphEgJnK5AF+4t wxIhfM4ySlWTJzOjybmErUWS8QHh9kFbNGRcNhPEMgkYAaMAfihjAdX3/t/tfsNlGRcodt t63SnSs7opxVTdhwz7t2/0082eq/ZEkRZror/OWr2UPr4wzBGrbL4kU4Wr2uEqPI0O2mns FhFfrIZoA3aTTWs2spcD3T2LImEh5esHXAtLMSmSGcFzb5MHf+4adgbhGWYuFg== Authentication-Results: mail.alfaline.pl; auth=pass smtp.auth=dominik@budzowski.pl smtp.mailfrom=dominik@budzowski.pl From: Dominik Budzowski To: pve-devel@lists.proxmox.com Subject: [PATCH pve-manager] ui: qemu: HDEdit: add iothread-vq-mapping UI controls Date: Fri, 5 Jun 2026 17:15:45 +0200 Message-ID: <20260605151545.6622-1-dominik@budzowski.pl> X-Mailer: git-send-email 2.47.3 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from domain DMARC_PASS -0.1 DMARC pass policy SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record X-MailFrom: dominik@budzowski.pl X-Mailman-Rule-Hits: nonmember-moderation X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation Message-ID-Hash: 2NGTHKHK5DSW4G2G2TPPGB4WMREWRXXC X-Message-ID-Hash: 2NGTHKHK5DSW4G2G2TPPGB4WMREWRXXC X-Mailman-Approved-At: Fri, 05 Jun 2026 21:40:56 +0200 CC: Dominik Budzowski X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Add a 'VQ Mapping' checkbox and 'VQ count' integer field (2-16) to the hard disk edit panel. When VQ Mapping is enabled, the standard IO thread checkbox is disabled (they are mutually exclusive), and the selected count is stored as iothread_vq_mapping on the drive config. Loading an existing drive with iothread_vq_mapping set pre-selects the VQ Mapping checkbox and restores the count value. Resolves: https://bugzilla.proxmox.com/show_bug.cgi?id=6350 Signed-off-by: Dominik Budzowski --- www/manager6/qemu/HDEdit.js | 59 ++++++++++++++++++++++++++++++++++++- 1 file changed, 58 insertions(+), 1 deletion(-) diff --git a/www/manager6/qemu/HDEdit.js b/www/manager6/qemu/HDEdit.js index 1bb2bfd..7f52f5c 100644 --- a/www/manager6/qemu/HDEdit.js +++ b/www/manager6/qemu/HDEdit.js @@ -92,7 +92,11 @@ Ext.define('PVE.qemu.HDInputPanel', { PVE.Utils.propertyStringSet(me.drive, values.noreplicate, 'replicate', 'no'); PVE.Utils.propertyStringSet(me.drive, values.discard, 'discard', 'on'); PVE.Utils.propertyStringSet(me.drive, values.ssd, 'ssd', 'on'); - PVE.Utils.propertyStringSet(me.drive, values.iothread, 'iothread', 'on'); + let vqCb = me.down('[name=vq_mapping_enabled]'); + let vqField = me.down('[name=iothread_vq_mapping]'); + let vqCount = (vqCb && !vqCb.disabled && vqCb.getValue() && vqField) ? vqField.getValue() : undefined; + PVE.Utils.propertyStringSet(me.drive, vqCount ? undefined : values.iothread, 'iothread', 'on'); + PVE.Utils.propertyStringSet(me.drive, vqCount || undefined, 'iothread_vq_mapping'); PVE.Utils.propertyStringSet(me.drive, values.readOnly, 'ro', 'on'); PVE.Utils.propertyStringSet(me.drive, values.cache, 'cache'); PVE.Utils.propertyStringSet(me.drive, values.aio, 'aio'); @@ -154,6 +158,8 @@ Ext.define('PVE.qemu.HDInputPanel', { values.discard = drive.discard === 'on'; values.ssd = PVE.Parser.parseBoolean(drive.ssd); values.iothread = PVE.Parser.parseBoolean(drive.iothread); + values.vq_mapping_enabled = !!drive.iothread_vq_mapping; + values.iothread_vq_mapping = drive.iothread_vq_mapping ? parseInt(drive.iothread_vq_mapping, 10) : 4; values.readOnly = PVE.Parser.parseBoolean(drive.ro); values.aio = drive.aio || '__default__'; @@ -332,6 +338,57 @@ Ext.define('PVE.qemu.HDInputPanel', { : { disabled: '{!isVirtIO && !isSCSI}', }, + listeners: { + change: function(cb, val) { + let win = cb.up('window'); + let vqCb = win.down('[name=vq_mapping_enabled]'); + let countField = win.down('[name=iothread_vq_mapping]'); + if (vqCb) { + vqCb.setDisabled(!!val); + if (val && vqCb.getValue()) { + vqCb.setValue(false); + if (countField) countField.setDisabled(true); + } + } + }, + }, + }, + { + xtype: 'proxmoxcheckbox', + name: 'vq_mapping_enabled', + fieldLabel: 'VQ Mapping', + submitValue: false, + clearOnDisable: true, + bind: { + disabled: '{!isVirtIO && !isSCSI}', + }, + listeners: { + change: function(cb, val) { + let win = cb.up('window'); + let countField = win.down('[name=iothread_vq_mapping]'); + if (countField) { + countField.setDisabled(!val); + if (!val) countField.setValue(4); + } + let iothreadCb = win.down('[name=iothread]'); + if (iothreadCb) { + iothreadCb.setDisabled(!!val); + if (val && iothreadCb.getValue()) { + iothreadCb.setValue(false); + } + } + }, + }, + }, + { + xtype: 'proxmoxintegerfield', + name: 'iothread_vq_mapping', + fieldLabel: 'VQ count', + minValue: 2, + maxValue: 16, + value: 4, + disabled: true, + allowBlank: false, }, ); -- 2.47.3