qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Akihiko Odaki <akihiko.odaki@gmail.com>
To: Vladislav Yaroshchuk <vladislav.yaroshchuk@jetbrains.com>,
	qemu-devel@nongnu.org
Cc: peter.maydell@linaro.org, alex.bennee@linaro.org,
	jasowang@redhat.com, phillip.ennen@gmail.com, armbru@redhat.com,
	dirty@apple.com, f4bug@amsat.org, r.bolshakov@yadro.com,
	agraf@csgraf.de, phillip@axleos.com, roman@roolebo.dev,
	hsp.cat7@gmail.com, hello@adns.io, qemu_oss@crudebyte.com,
	eblake@redhat.com, kraxel@redhat.com
Subject: Re: [PATCH v14 1/8] net/vmnet: add vmnet dependency and customizable option
Date: Sat, 26 Feb 2022 02:06:56 +0900	[thread overview]
Message-ID: <18305576-d7de-f307-68bc-164ecba9a275@gmail.com> (raw)
In-Reply-To: <20220225165238.63646-2-Vladislav.Yaroshchuk@jetbrains.com>

On 2022/02/26 1:52, Vladislav Yaroshchuk wrote:
> vmnet.framework dependency is added with 'vmnet' option
> to enable or disable it. Default value is 'auto'.
> 
> vmnet features to be used are available since macOS 11.0,
> corresponding probe is created into meson.build.
> 
> Signed-off-by: Vladislav Yaroshchuk <Vladislav.Yaroshchuk@jetbrains.com>
> ---
>   meson.build                   | 16 +++++++++++++++-
>   meson_options.txt             |  2 ++
>   scripts/meson-buildoptions.sh |  3 +--
>   3 files changed, 18 insertions(+), 3 deletions(-)
> 
> diff --git a/meson.build b/meson.build
> index 8df40bfac4..d3a791e6c4 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -522,6 +522,18 @@ if cocoa.found() and get_option('gtk').enabled()
>     error('Cocoa and GTK+ cannot be enabled at the same time')
>   endif
>   
> +vmnet = dependency('appleframeworks', modules: 'vmnet', required: get_option('vmnet'))
> +if vmnet.found() and not cc.has_header_symbol('vmnet/vmnet.h',
> +                                              'VMNET_BRIDGED_MODE',
> +                                              dependencies: vmnet)
> +  vmnet = not_found
> +  if get_option('vmnet').enabled()
> +    error('vmnet.framework API is outdated')
> +  else
> +    warning('vmnet.framework API is outdated, disabling')
> +  endif
> +endif
> +
>   seccomp = not_found
>   if not get_option('seccomp').auto() or have_system or have_tools
>     seccomp = dependency('libseccomp', version: '>=2.3.0',
> @@ -1536,6 +1548,7 @@ config_host_data.set('CONFIG_SNAPPY', snappy.found())
>   config_host_data.set('CONFIG_TPM', have_tpm)
>   config_host_data.set('CONFIG_USB_LIBUSB', libusb.found())
>   config_host_data.set('CONFIG_VDE', vde.found())
> +config_host_data.set('CONFIG_VMNET', vmnet.found())
>   config_host_data.set('CONFIG_VHOST_USER_BLK_SERVER', have_vhost_user_blk_server)
>   config_host_data.set('CONFIG_VNC', vnc.found())
>   config_host_data.set('CONFIG_VNC_JPEG', jpeg.found())
> @@ -3564,7 +3577,8 @@ summary(summary_info, bool_yn: true, section: 'Crypto')
>   # Libraries
>   summary_info = {}
>   if targetos == 'darwin'
> -  summary_info += {'Cocoa support':   cocoa}
> +  summary_info += {'Cocoa support':           cocoa}
> +  summary_info += {'vmnet.framework support': vmnet}
>   endif
>   summary_info += {'SDL support':       sdl}
>   summary_info += {'SDL image support': sdl_image}
> diff --git a/meson_options.txt b/meson_options.txt
> index 52b11cead4..d2c0b6b412 100644
> --- a/meson_options.txt
> +++ b/meson_options.txt
> @@ -175,6 +175,8 @@ option('netmap', type : 'feature', value : 'auto',
>          description: 'netmap network backend support')
>   option('vde', type : 'feature', value : 'auto',
>          description: 'vde network backend support')
> +option('vmnet', type : 'feature', value : 'auto',
> +       description: 'vmnet.framework network backend support')
>   option('virglrenderer', type : 'feature', value : 'auto',
>          description: 'virgl rendering support')
>   option('vnc', type : 'feature', value : 'auto',
> diff --git a/scripts/meson-buildoptions.sh b/scripts/meson-buildoptions.sh
> index 9ee684ef03..7c37f13384 100644
> --- a/scripts/meson-buildoptions.sh
> +++ b/scripts/meson-buildoptions.sh
> @@ -116,6 +116,7 @@ meson_options_help() {
>     printf "%s\n" '  usb-redir       libusbredir support'
>     printf "%s\n" '  vde             vde network backend support'
>     printf "%s\n" '  vdi             vdi image format support'
> +  printf "%s\n" '  vmnet           vmnet.framework network backend support'
>     printf "%s\n" '  vhost-user-blk-server'
>     printf "%s\n" '                  build vhost-user-blk server'
>     printf "%s\n" '  virglrenderer   virgl rendering support'
> @@ -333,8 +334,6 @@ _meson_option_parse() {
>       --disable-usb-redir) printf "%s" -Dusb_redir=disabled ;;
>       --enable-vde) printf "%s" -Dvde=enabled ;;
>       --disable-vde) printf "%s" -Dvde=disabled ;;
> -    --enable-vdi) printf "%s" -Dvdi=enabled ;;
> -    --disable-vdi) printf "%s" -Dvdi=disabled ;;
>       --enable-vhost-user-blk-server) printf "%s" -Dvhost_user_blk_server=enabled ;;
>       --disable-vhost-user-blk-server) printf "%s" -Dvhost_user_blk_server=disabled ;;
>       --enable-virglrenderer) printf "%s" -Dvirglrenderer=enabled ;;

--enable-vdi and --disable-vdi are mistakenly dropped.


  reply	other threads:[~2022-02-25 17:54 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-25 16:52 [PATCH v14 0/8] Add vmnet.framework based network backend Vladislav Yaroshchuk
2022-02-25 16:52 ` [PATCH v14 1/8] net/vmnet: add vmnet dependency and customizable option Vladislav Yaroshchuk
2022-02-25 17:06   ` Akihiko Odaki [this message]
2022-02-25 16:52 ` [PATCH v14 2/8] net/vmnet: add vmnet backends to qapi/net Vladislav Yaroshchuk
2022-02-25 16:52 ` [PATCH v14 3/8] net/vmnet: implement shared mode (vmnet-shared) Vladislav Yaroshchuk
2022-02-25 16:52 ` [PATCH v14 4/8] net/vmnet: implement host mode (vmnet-host) Vladislav Yaroshchuk
2022-02-25 16:52 ` [PATCH v14 5/8] net/vmnet: implement bridged mode (vmnet-bridged) Vladislav Yaroshchuk
2022-02-25 16:52 ` [PATCH v14 6/8] net/vmnet: update qemu-options.hx Vladislav Yaroshchuk
2022-02-25 16:52 ` [PATCH v14 7/8] net/vmnet: update hmp-commands.hx Vladislav Yaroshchuk
2022-02-25 16:52 ` [PATCH v14 8/8] 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=18305576-d7de-f307-68bc-164ecba9a275@gmail.com \
    --to=akihiko.odaki@gmail.com \
    --cc=agraf@csgraf.de \
    --cc=alex.bennee@linaro.org \
    --cc=armbru@redhat.com \
    --cc=dirty@apple.com \
    --cc=eblake@redhat.com \
    --cc=f4bug@amsat.org \
    --cc=hello@adns.io \
    --cc=hsp.cat7@gmail.com \
    --cc=jasowang@redhat.com \
    --cc=kraxel@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=phillip.ennen@gmail.com \
    --cc=phillip@axleos.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu_oss@crudebyte.com \
    --cc=r.bolshakov@yadro.com \
    --cc=roman@roolebo.dev \
    --cc=vladislav.yaroshchuk@jetbrains.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).