[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v13 2/7] net/vmnet: add vmnet backends to qapi/net
|
From: |
Markus Armbruster |
|
Subject: |
Re: [PATCH v13 2/7] net/vmnet: add vmnet backends to qapi/net |
|
Date: |
Tue, 18 Jan 2022 16:00:31 +0100 |
|
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) |
Vladislav Yaroshchuk <yaroshchuk2000@gmail.com> writes:
> Create separate netdevs for each vmnet operating mode:
> - vmnet-host
> - vmnet-shared
> - vmnet-bridged
>
> Signed-off-by: Vladislav Yaroshchuk <yaroshchuk2000@gmail.com>
I acked v8 of the QAPI schema part. You should add Acked-by and
Reviewed-by you receive in later revisions, unless you make changes that
invalidate them. When in doubt, drop them.
> diff --git a/qapi/net.json b/qapi/net.json
> index 7fab2e7cd8..b922e2e34f 100644
> --- a/qapi/net.json
> +++ b/qapi/net.json
> @@ -452,6 +452,120 @@
> '*vhostdev': 'str',
> '*queues': 'int' } }
>
> +##
> +# @NetdevVmnetHostOptions:
> +#
> +# vmnet (host mode) network backend.
> +#
> +# Allows the vmnet interface to communicate with other vmnet
> +# interfaces that are in host mode and also with the host.
> +#
> +# @start-address: The starting IPv4 address to use for the interface.
> +# Must be in the private IP range (RFC 1918). Must be
> +# specified along with @end-address and @subnet-mask.
> +# This address is used as the gateway address. The
> +# subsequent address up to and including end-address are
> +# placed in the DHCP pool.
> +#
> +# @end-address: The DHCP IPv4 range end address to use for the
> +# interface. Must be in the private IP range (RFC 1918).
> +# Must be specified along with @start-address and
> +# @subnet-mask.
> +#
> +# @subnet-mask: The IPv4 subnet mask to use on the interface. Must
> +# be specified along with @start-address and @subnet-mask.
> +#
> +# @isolated: Enable isolation for this interface. Interface isolation
> +# ensures that vmnet interface is not able to communicate
> +# with any other vmnet interfaces. Only communication with
> +# host is allowed. Available since macOS Big Sur 11.0.
What happens when the host is too old?
> +#
> +# @net-uuid: The identifier (UUID) to uniquely identify the isolated
> +# network vmnet interface should be added to. If
> +# set, no DHCP service is provided for this interface and
> +# network communication is allowed only with other interfaces
> +# added to this network identified by the UUID. Available
> +# since macOS Big Sur 11.0.
Same question.
> +#
> +# Since: 7.0
> +##
> +{ 'struct': 'NetdevVmnetHostOptions',
> + 'data': {
> + '*start-address': 'str',
> + '*end-address': 'str',
> + '*subnet-mask': 'str',
> + '*isolated': 'bool',
> + '*net-uuid': 'str' },
> + 'if': 'CONFIG_VMNET' }
> +
> +##
> +# @NetdevVmnetSharedOptions:
> +#
> +# vmnet (shared mode) network backend.
> +#
> +# Allows traffic originating from the vmnet interface to reach the
> +# Internet through a network address translator (NAT).
> +# The vmnet interface can communicate with the host and with
> +# other shared mode interfaces on the same subnet. If no DHCP
> +# settings, subnet mask and IPv6 prefix specified, the interface can
> +# communicate with any of other interfaces in shared mode.
> +#
> +# @start-address: The starting IPv4 address to use for the interface.
> +# Must be in the private IP range (RFC 1918). Must be
> +# specified along with @end-address and @subnet-mask.
> +# This address is used as the gateway address. The
> +# subsequent address up to and including end-address are
> +# placed in the DHCP pool.
> +#
> +# @end-address: The DHCP IPv4 range end address to use for the
> +# interface. Must be in the private IP range (RFC 1918).
> +# Must be specified along with @start-address and @subnet-mask.
> +#
> +# @subnet-mask: The IPv4 subnet mask to use on the interface. Must
> +# be specified along with @start-address and @subnet-mask.
> +#
> +# @isolated: Enable isolation for this interface. Interface isolation
> +# ensures that vmnet interface is not able to communicate
> +# with any other vmnet interfaces. Only communication with
> +# host is allowed. Available since macOS Big Sur 11.0.
Same question.
> +#
> +# @nat66-prefix: The IPv6 prefix to use into guest network. Must be a
> +# unique local address i.e. start with fd00::/8 and have
> +# length of 64.
> +#
> +# Since: 7.0
> +##
> +{ 'struct': 'NetdevVmnetSharedOptions',
> + 'data': {
> + '*start-address': 'str',
> + '*end-address': 'str',
> + '*subnet-mask': 'str',
> + '*isolated': 'bool',
> + '*nat66-prefix': 'str' },
> + 'if': 'CONFIG_VMNET' }
> +
> +##
> +# @NetdevVmnetBridgedOptions:
> +#
> +# vmnet (bridged mode) network backend.
> +#
> +# Bridges the vmnet interface with a physical network interface.
> +#
> +# @ifname: The name of the physical interface to be bridged.
> +#
> +# @isolated: Enable isolation for this interface. Interface isolation
> +# ensures that vmnet interface is not able to communicate
> +# with any other vmnet interfaces. Only communication with
> +# host is allowed. Available since macOS Big Sur 11.0.
Same question.
> +#
> +# Since: 7.0
> +##
> +{ 'struct': 'NetdevVmnetBridgedOptions',
> + 'data': {
> + 'ifname': 'str',
> + '*isolated': 'bool' },
> + 'if': 'CONFIG_VMNET' }
> +
> ##
> # @NetClientDriver:
> #
> @@ -460,10 +574,16 @@
> # Since: 2.7
> #
> # @vhost-vdpa since 5.1
> +# @vmnet-host since 7.0
> +# @vmnet-shared since 7.0
> +# @vmnet-bridged since 7.0
> ##
> { 'enum': 'NetClientDriver',
> 'data': [ 'none', 'nic', 'user', 'tap', 'l2tpv3', 'socket', 'vde',
> - 'bridge', 'hubport', 'netmap', 'vhost-user', 'vhost-vdpa' ] }
> + 'bridge', 'hubport', 'netmap', 'vhost-user', 'vhost-vdpa',
> + { 'name': 'vmnet-host', 'if': 'CONFIG_VMNET' },
> + { 'name': 'vmnet-shared', 'if': 'CONFIG_VMNET' },
> + { 'name': 'vmnet-bridged', 'if': 'CONFIG_VMNET' }] }
>
> ##
> # @Netdev:
> @@ -477,6 +597,9 @@
> # Since: 1.2
> #
> # 'l2tpv3' - since 2.1
> +# 'vmnet-host' - since 7.0
> +# 'vmnet-shared' - since 7.0
> +# 'vmnet-bridged' - since 7.0
> ##
> { 'union': 'Netdev',
> 'base': { 'id': 'str', 'type': 'NetClientDriver' },
> @@ -492,7 +615,13 @@
> 'hubport': 'NetdevHubPortOptions',
> 'netmap': 'NetdevNetmapOptions',
> 'vhost-user': 'NetdevVhostUserOptions',
> - 'vhost-vdpa': 'NetdevVhostVDPAOptions' } }
> + 'vhost-vdpa': 'NetdevVhostVDPAOptions',
> + 'vmnet-host': { 'type': 'NetdevVmnetHostOptions',
> + 'if': 'CONFIG_VMNET' },
> + 'vmnet-shared': { 'type': 'NetdevVmnetSharedOptions',
> + 'if': 'CONFIG_VMNET' },
> + 'vmnet-bridged': { 'type': 'NetdevVmnetBridgedOptions',
> + 'if': 'CONFIG_VMNET' } } }
>
> ##
> # @RxState:
Re: [PATCH v13 2/7] net/vmnet: add vmnet backends to qapi/net, Roman Bolshakov, 2022/01/24