From: Jason Wang <jasowang@redhat.com>
To: jasowang@redhat.com, qemu-devel@nongnu.org, peter.maydell@linaro.org
Cc: Vladislav Yaroshchuk <vladislav.yaroshchuk@jetbrains.com>,
Akihiko Odaki <akihiko.odaki@gmail.com>,
Vladislav Yaroshchuk <Vladislav.Yaroshchuk@jetbrains.com>
Subject: [PULL 1/8] net/vmnet: add vmnet dependency and customizable option
Date: Wed, 18 May 2022 11:12:07 +0800 [thread overview]
Message-ID: <20220518031214.93760-2-jasowang@redhat.com> (raw)
In-Reply-To: <20220518031214.93760-1-jasowang@redhat.com>
From: Vladislav Yaroshchuk <vladislav.yaroshchuk@jetbrains.com>
vmnet.framework dependency is added with 'vmnet' option
to enable or disable it. Default value is 'auto'.
used vmnet features are available since macOS 11.0,
but new backend can be built and work properly with
subset of them on 10.15 too.
Reviewed-by: Akihiko Odaki <akihiko.odaki@gmail.com>
Tested-by: Akihiko Odaki <akihiko.odaki@gmail.com>
Signed-off-by: Vladislav Yaroshchuk <Vladislav.Yaroshchuk@jetbrains.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
---
meson.build | 16 +++++++++++++++-
meson_options.txt | 2 ++
scripts/meson-buildoptions.sh | 1 +
3 files changed, 18 insertions(+), 1 deletion(-)
diff --git a/meson.build b/meson.build
index 53a4728250..52f6befc0f 100644
--- a/meson.build
+++ b/meson.build
@@ -580,6 +580,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',
@@ -1741,6 +1753,7 @@ config_host_data.set('CONFIG_VHOST_KERNEL', have_vhost_kernel)
config_host_data.set('CONFIG_VHOST_USER', have_vhost_user)
config_host_data.set('CONFIG_VHOST_CRYPTO', have_vhost_user_crypto)
config_host_data.set('CONFIG_VHOST_VDPA', have_vhost_vdpa)
+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_PNG', png.found())
config_host_data.set('CONFIG_VNC', vnc.found())
@@ -3897,7 +3910,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 29c6b90cec..7325cdad45 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -197,6 +197,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('png', type : 'feature', value : 'auto',
diff --git a/scripts/meson-buildoptions.sh b/scripts/meson-buildoptions.sh
index 5d2172bfb4..9b0d151dad 100644
--- a/scripts/meson-buildoptions.sh
+++ b/scripts/meson-buildoptions.sh
@@ -158,6 +158,7 @@ meson_options_help() {
printf "%s\n" ' vhost-kernel vhost kernel backend support'
printf "%s\n" ' vhost-net vhost-net kernel acceleration support'
printf "%s\n" ' vhost-user vhost-user backend 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" ' vhost-vdpa vhost-vdpa kernel backend support'
--
2.25.1
next prev parent reply other threads:[~2022-05-18 3:18 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-18 3:12 [PULL 0/8] Net patches Jason Wang
2022-05-18 3:12 ` Jason Wang [this message]
2022-05-18 3:12 ` [PULL 2/8] net/vmnet: add vmnet backends to qapi/net Jason Wang
2022-05-18 3:12 ` [PULL 3/8] net/vmnet: implement shared mode (vmnet-shared) Jason Wang
2022-05-18 3:12 ` [PULL 4/8] net/vmnet: implement host mode (vmnet-host) Jason Wang
2022-05-18 3:12 ` [PULL 5/8] net/vmnet: implement bridged mode (vmnet-bridged) Jason Wang
2022-05-18 3:12 ` [PULL 6/8] net/vmnet: update qemu-options.hx Jason Wang
2022-05-18 3:12 ` [PULL 7/8] net/vmnet: update hmp-commands.hx Jason Wang
2022-05-18 3:12 ` [PULL 8/8] tulip: Assign default MAC address if not specified Jason Wang
2022-05-18 14:10 ` [PULL 0/8] Net patches Richard Henderson
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=20220518031214.93760-2-jasowang@redhat.com \
--to=jasowang@redhat.com \
--cc=akihiko.odaki@gmail.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--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 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.