All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vladislav Yaroshchuk <yaroshchuk2000@gmail.com>
To: Eric Blake <eblake@redhat.com>
Cc: jasowang@redhat.com, Roman Bolshakov <r.bolshakov@yadro.com>,
	qemu-devel@nongnu.org
Subject: Re: [PATCH 2/7] net/vmnet: add new netdevs to qapi/net
Date: Tue, 17 Aug 2021 12:28:09 +0300	[thread overview]
Message-ID: <CADO9X9T=BOUZf+8nz5khmNbggQXBLwR5WdVFsDmqxTXusYnC8g@mail.gmail.com> (raw)
In-Reply-To: <20210806211927.dvsn7xvy2ghmonip@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 5940 bytes --]

Hi Eric,
Thank you for your review.

сб, 7 авг. 2021 г. в 00:19, Eric Blake <eblake@redhat.com>:

> On Thu, Jun 17, 2021 at 05:32:41PM +0300, Vladislav Yaroshchuk wrote:
> > Created separate netdev per each vmnet operating mode
> > because they use quite different settings. Especially since
> > macOS 11.0 (vmnet.framework API gets lots of updates)
> >
> > Three new netdevs are added:
> > - vmnet-host
> > - vmnet-shared
> > - vmnet-bridged
> >
> > Signed-off-by: Vladislav Yaroshchuk <yaroshchuk2000@gmail.com>
> > ---
>
> > +++ b/qapi/net.json
> > @@ -452,6 +452,89 @@
> >      '*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.
> > +#
> > +# @dhcpstart: The starting IPv4 address to use for the interface. Must
> be in the
> > +#             private IP range (RFC 1918). Must be specified along
> > +#             with @dhcpend and @subnetmask.
> > +#             This address is used as the gateway address. The
> subsequent address
> > +#             up to and including dhcpend are  placed in the DHCP pool.
> > +#
> > +# @dhcpend: 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 @dhcpstart and @subnetmask.
> > +#
> > +# @subnetmask: The IPv4 subnet mask to use on the interface. Must be
> specified
> > +#              along with @dhcpstart and @subnetmask.
> > +#
> > +#
> > +# Since: 6.1,
> > +##
>
> Same comments about 6.1 vs. 6.2 as before (I'll quit pointing it out).
> Spurious trailing comma.
>
> > +{ 'struct': 'NetdevVmnetHostOptions',
> > +  'data': {
> > +    '*dhcpstart':   'str',
> > +    '*dhcpend':     'str',
> > +    '*subnetmask':  'str'
>
> Hmm. You listed all three as optional, but document that they must all
> be specified together.  Why not just make them all required, and
> simplify the documentation?
>
> All three options can be not specified at all, or, if specified, must be
used all together. It's the user's choice to adjust DHCP settings or leave
it for vmnet.framework.
`-netdev vmnet-host` is correct and `-netdev
vmnet-host,dhcpstart="..",dhcpend="..",subnetmask=".."` is correct too. So
we can't make all the options required

> > +  },
> > +  'if': 'defined(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 also communicate with the native host. By default, the vmnet
> interface
> > +# is able to communicate with other shared mode interfaces. If a subnet
> range
> > +# is specified, the vmnet interface can communicate with other shared
> mode
> > +# interfaces on the same subnet.
> > +#
> > +# @dhcpstart: The starting IPv4 address to use for the interface. Must
> be in the
> > +#             private IP range (RFC 1918). Must be specified along
> > +#             with @dhcpend and @subnetmask.
> > +#             This address is used as the gateway address. The
> subsequent address
> > +#             up to and including dhcpend are  placed in the DHCP pool.
>
> Spurious double space.
>
> > +#
> > +# @dhcpend: 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 @dhcpstart and @subnetmask.
> > +#
> > +# @subnetmask: The IPv4 subnet mask to use on the interface. Must be
> specified
> > +#              along with @dhcpstart and @subnetmask.
> > +#
> > +#
> > +# Since: 6.1,
> > +##
> > +{ 'struct': 'NetdevVmnetSharedOptions',
> > +  'data': {
> > +    '*dhcpstart':    'str',
> > +    '*dhcpend':      'str',
> > +    '*subnetmask':   'str'
> > +  },
> > +  'if': 'defined(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.
> > +#
> > +# Since: 6.1
> > +##
> > +{ 'struct': 'NetdevVmnetBridgedOptions',
> > +  'data': { 'ifname': 'str' },
> > +  'if': 'defined(CONFIG_VMNET)' }
> > +
> >  ##
> >  # @NetClientDriver:
> >  #
> > @@ -460,11 +543,16 @@
> >  # Since: 2.7
> >  #
> >  #        @vhost-vdpa since 5.1
> > -#        @vmnet since 6.1
>
> Why are you dropping vmnet?  Especially since you just added it in the
> previous patch?  That feels like needless churn.
>
> Yep, that was my mistake, on that stage I decided to create separate
backends for each vmnet operational mode. Will remove redundant change the
next series.

> +#        @vmnet-host since 6.1
> > +#        @vmnet-shared since 6.1
> > +#        @vmnet-bridged since 6.1
> >  ##
> >  { 'enum': 'NetClientDriver',
> >    'data': [ 'none', 'nic', 'user', 'tap', 'l2tpv3', 'socket', 'vde',
> > -            'bridge', 'hubport', 'netmap', 'vhost-user', 'vhost-vdpa',
> 'vmnet' ] }
> > +            'bridge', 'hubport', 'netmap', 'vhost-user', 'vhost-vdpa',
> > +            { 'name': 'vmnet-host', 'if': 'defined(CONFIG_VMNET)' },
> > +            { 'name': 'vmnet-shared', 'if': 'defined(CONFIG_VMNET)' },
> > +            { 'name': 'vmnet-bridged', 'if': 'defined(CONFIG_VMNET)' }]
> }
>
> --
> Eric Blake, Principal Software Engineer
> Red Hat, Inc.           +1-919-301-3266
> Virtualization:  qemu.org | libvirt.org
>
>
Will fix all other issues asap, thank you!

Regards,
Vladislav

[-- Attachment #2: Type: text/html, Size: 8174 bytes --]

  reply	other threads:[~2021-08-17  9:29 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-17 14:32 [PATCH 0/7] Add vmnet.framework based network backend Vladislav Yaroshchuk
2021-06-17 14:32 ` [PATCH 1/7] net/vmnet: dependencies setup, initial preparations Vladislav Yaroshchuk
2021-08-06 21:13   ` Eric Blake
2021-06-17 14:32 ` [PATCH 2/7] net/vmnet: add new netdevs to qapi/net Vladislav Yaroshchuk
2021-08-06 21:19   ` Eric Blake
2021-08-17  9:28     ` Vladislav Yaroshchuk [this message]
2021-06-17 14:32 ` [PATCH 3/7] net/vmnet: create common netdev state structure Vladislav Yaroshchuk
2021-06-17 14:32 ` [PATCH 4/7] net/vmnet: implement shared mode (vmnet-shared) Vladislav Yaroshchuk
2021-06-17 14:32 ` [PATCH 5/7] net/vmnet: implement host mode (vmnet-host) Vladislav Yaroshchuk
2021-06-17 14:32 ` [PATCH 6/7] net/vmnet: implement bridged mode (vmnet-bridged) Vladislav Yaroshchuk
2021-06-17 14:32 ` [PATCH 7/7] net/vmnet: update qemu-options.hx Vladislav Yaroshchuk
2021-08-06 19:03 ` [PATCH 0/7] Add vmnet.framework based network backend Vladislav Yaroshchuk
2021-08-09  3:23   ` Jason Wang
2021-08-12  6:00 ` Roman Bolshakov
2021-08-17  9:10   ` 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='CADO9X9T=BOUZf+8nz5khmNbggQXBLwR5WdVFsDmqxTXusYnC8g@mail.gmail.com' \
    --to=yaroshchuk2000@gmail.com \
    --cc=eblake@redhat.com \
    --cc=jasowang@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=r.bolshakov@yadro.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.