From: Markus Armbruster <armbru@redhat.com>
To: Vladislav Yaroshchuk <yaroshchuk2000@gmail.com>
Cc: jasowang@redhat.com, phillip.ennen@gmail.com,
qemu-devel@nongnu.org, r.bolshakov@yadro.com, phillip@axleos.com,
akihiko.odaki@gmail.com, hsp.cat7@gmail.com, hello@adns.io,
eblake@redhat.com
Subject: Re: [PATCH v7 2/7] net/vmnet: add vmnet backends to qapi/net
Date: Fri, 10 Dec 2021 07:23:21 +0100 [thread overview]
Message-ID: <8735n1dlly.fsf@dusky.pond.sub.org> (raw)
In-Reply-To: <20211207101828.22033-3-yaroshchuk2000@gmail.com> (Vladislav Yaroshchuk's message of "Tue, 7 Dec 2021 13:18:23 +0300")
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>
> ---
[...]
> diff --git a/qapi/net.json b/qapi/net.json
> index 7fab2e7cd8..8ed7bf0c04 100644
> --- a/qapi/net.json
> +++ b/qapi/net.json
> @@ -452,6 +452,122 @@
> '*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 native host.
We don't say "native host" elsewhere, just "host". Let's drop
"native".
> +#
> +# @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.
> +#
> +# @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.
> +#
> +# Since: 7.0
> +##
> +{ 'struct': 'NetdevVmnetHostOptions',
> + 'data': {
> + '*start-address': 'str',
> + '*end-address': 'str',
> + '*subnet-mask': 'str',
> + '*isolated': 'bool',
> + '*net-uuid': 'str'
> + },
Unusual formatting. The common one is
'*net-uuid': 'str' },
Let's stick to it.
> + '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 native host and with
Drop "native".
> +# 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.
> +#
> +# @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'
> + },
Unusual formatting again.
> + '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.
> +#
> +# Since: 7.0
> +##
> +{ 'struct': 'NetdevVmnetBridgedOptions',
> + 'data': {
> + 'ifname': 'str',
> + '*isolated': 'str'
> + },
And again.
> + 'if': 'CONFIG_VMNET' }
> +
> ##
> # @NetClientDriver:
> #
> @@ -460,10 +576,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 +599,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 +617,10 @@
> 'hubport': 'NetdevHubPortOptions',
> 'netmap': 'NetdevNetmapOptions',
> 'vhost-user': 'NetdevVhostUserOptions',
> - 'vhost-vdpa': 'NetdevVhostVDPAOptions' } }
> + 'vhost-vdpa': 'NetdevVhostVDPAOptions',
> + 'vmnet-host': 'NetdevVmnetHostOptions',
> + 'vmnet-shared': 'NetdevVmnetSharedOptions',
> + 'vmnet-bridged': 'NetdevVmnetBridgedOptions' } }
>
> ##
> # @RxState:
With the minor tweaks, QAPI schema
Acked-by: Markus Armbruster <armbru@redhat.com>
next prev parent reply other threads:[~2021-12-10 6:28 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-07 10:18 [PATCH v7 0/7] Add vmnet.framework based network backend Vladislav Yaroshchuk
2021-12-07 10:18 ` [PATCH v7 1/7] net/vmnet: add vmnet dependency and customizable option Vladislav Yaroshchuk
2021-12-07 14:12 ` Markus Armbruster
2021-12-07 17:39 ` Vladislav Yaroshchuk
2021-12-08 8:24 ` Markus Armbruster
2021-12-07 10:18 ` [PATCH v7 2/7] net/vmnet: add vmnet backends to qapi/net Vladislav Yaroshchuk
2021-12-10 6:23 ` Markus Armbruster [this message]
2021-12-07 10:18 ` [PATCH v7 3/7] net/vmnet: implement shared mode (vmnet-shared) Vladislav Yaroshchuk
2021-12-07 10:18 ` [PATCH v7 4/7] net/vmnet: implement host mode (vmnet-host) Vladislav Yaroshchuk
2021-12-07 10:18 ` [PATCH v7 5/7] net/vmnet: implement bridged mode (vmnet-bridged) Vladislav Yaroshchuk
2021-12-07 10:18 ` [PATCH v7 6/7] net/vmnet: update qemu-options.hx Vladislav Yaroshchuk
2021-12-07 10:18 ` [PATCH v7 7/7] net/vmnet: update MAINTAINERS list Vladislav Yaroshchuk
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8735n1dlly.fsf@dusky.pond.sub.org \
--to=armbru@redhat.com \
--cc=akihiko.odaki@gmail.com \
--cc=eblake@redhat.com \
--cc=hello@adns.io \
--cc=hsp.cat7@gmail.com \
--cc=jasowang@redhat.com \
--cc=phillip.ennen@gmail.com \
--cc=phillip@axleos.com \
--cc=qemu-devel@nongnu.org \
--cc=r.bolshakov@yadro.com \
--cc=yaroshchuk2000@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.