]> git.proxmox.com Git - mirror_qemu.git/commit
cryptodev: support QoS
authorzhenwei pi <pizhenwei@bytedance.com>
Wed, 1 Mar 2023 10:58:45 +0000 (18:58 +0800)
committerMichael S. Tsirkin <mst@redhat.com>
Tue, 7 Mar 2023 17:38:59 +0000 (12:38 -0500)
commit2580b452ffccfb2bcba97dbfcb0d6067d06bc453
treefce09a3465596c8360ea326e91f3b9a86b0db472
parente7a775fd9fc08550c4525bc331b1cda342b459dd
cryptodev: support QoS

Add 'throttle-bps' and 'throttle-ops' limitation to set QoS. The
two arguments work with both QEMU command line and QMP command.

Example of QEMU command line:
-object cryptodev-backend-builtin,id=cryptodev1,throttle-bps=1600,\
throttle-ops=100

Example of QMP command:
virsh qemu-monitor-command buster --hmp qom-set /objects/cryptodev1 \
throttle-ops 100

or cancel limitation:
virsh qemu-monitor-command buster --hmp qom-set /objects/cryptodev1 \
throttle-ops 0

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: zhenwei pi <pizhenwei@bytedance.com>
Message-Id: <20230301105847.253084-11-pizhenwei@bytedance.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
backends/cryptodev.c
include/sysemu/cryptodev.h
qapi/qom.json