On Tue, Nov 22, 2022 at 10:07:46PM +0800, zhenwei pi wrote: > Introduce QCryptodevBackendType in cryptodev.json, also apply this to > related codes. Then we can drop 'enum CryptoDevBackendOptionsType'. > > Signed-off-by: zhenwei pi <pizhen...@bytedance.com> > --- > MAINTAINERS | 1 + > backends/cryptodev-builtin.c | 2 +- > backends/cryptodev-lkcf.c | 2 +- > backends/cryptodev-vhost-user.c | 4 ++-- > backends/cryptodev-vhost.c | 4 ++-- > include/sysemu/cryptodev.h | 11 ++--------- > qapi/cryptodev.json | 20 ++++++++++++++++++++ > qapi/meson.build | 1 + > qapi/qapi-schema.json | 1 + > 9 files changed, 31 insertions(+), 15 deletions(-) > create mode 100644 qapi/cryptodev.json
> @@ -215,16 +216,8 @@ struct CryptoDevBackendClass { > void *opaque); > }; > > -typedef enum CryptoDevBackendOptionsType { > - CRYPTODEV_BACKEND_TYPE_NONE = 0, > - CRYPTODEV_BACKEND_TYPE_BUILTIN = 1, > - CRYPTODEV_BACKEND_TYPE_VHOST_USER = 2, > - CRYPTODEV_BACKEND_TYPE_LKCF = 3, > - CRYPTODEV_BACKEND_TYPE__MAX, > -} CryptoDevBackendOptionsType; Old code has a 'NONE' value as the default > +## > +# @QCryptodevBackendType: > +# > +# The crypto device backend type > +# > +# @builtin: the QEMU builtin support > +# @vhost-user: vhost-user > +# @lkcf: Linux kernel cryptographic framework > +# > +# Since: 8.0 > +## > +{ 'enum': 'QCryptodevBackendType', > + 'prefix': 'QCRYPTODEV_BACKEND_TYPE', > + 'data': ['builtin', 'vhost-user', 'lkcf']} ...but new code has no 'none'. None the less I think that is OK, as I'm not seeing anything that needed the 'none' type. Reviewed-by: Daniel P. Berrangé <berra...@redhat.com> With regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|