All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vladislav Yaroshchuk <vladislav.yaroshchuk@jetbrains.com>
To: qemu-devel@nongnu.org
Cc: jasowang@redhat.com, r.bolshakov@yadro.com, eblake@redhat.com,
	phillip.ennen@gmail.com, phillip@axleos.com,
	akihiko.odaki@gmail.com, armbru@redhat.com, hsp.cat7@gmail.com,
	hello@adns.io, roman@roolebo.dev, peter.maydell@linaro.org,
	dirty@apple.com, f4bug@amsat.org, agraf@csgraf.de,
	kraxel@redhat.com, alex.bennee@linaro.org,
	qemu_oss@crudebyte.com,
	Vladislav Yaroshchuk <Vladislav.Yaroshchuk@jetbrains.com>
Subject: [PATCH v15 1/8] net/vmnet: add vmnet dependency and customizable option
Date: Fri, 25 Feb 2022 20:13:55 +0300	[thread overview]
Message-ID: <20220225171402.64861-2-Vladislav.Yaroshchuk@jetbrains.com> (raw)
In-Reply-To: <20220225171402.64861-1-Vladislav.Yaroshchuk@jetbrains.com>

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 |  1 +
 3 files changed, 18 insertions(+), 1 deletion(-)

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..30946f3798 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'
-- 
2.34.1.vfs.0.0



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

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-25 17:13 [PATCH v15 0/8] Add vmnet.framework based network backend Vladislav Yaroshchuk
2022-02-25 17:13 ` Vladislav Yaroshchuk [this message]
2022-02-25 17:13 ` [PATCH v15 2/8] net/vmnet: add vmnet backends to qapi/net Vladislav Yaroshchuk
2022-02-28 10:07   ` Markus Armbruster
2022-02-28 10:47     ` Vladislav Yaroshchuk
2022-02-25 17:13 ` [PATCH v15 3/8] net/vmnet: implement shared mode (vmnet-shared) Vladislav Yaroshchuk
2022-02-25 17:46   ` Akihiko Odaki
2022-02-26  8:37     ` Vladislav Yaroshchuk
2022-02-26  9:16       ` Akihiko Odaki
2022-02-26 11:33         ` Vladislav Yaroshchuk
2022-02-26 12:26           ` Akihiko Odaki
2022-02-28 11:59             ` Vladislav Yaroshchuk
2022-03-01  5:52               ` Akihiko Odaki
2022-03-01  8:09                 ` Vladislav Yaroshchuk
2022-03-01  8:21                   ` Akihiko Odaki
2022-03-03 15:43                     ` Vladislav Yaroshchuk
2022-03-03 18:34                       ` Akihiko Odaki
2022-03-04  4:39                         ` Akihiko Odaki
2022-03-04  1:37                       ` Jason Wang
2022-03-04  4:37                         ` Akihiko Odaki
2022-03-07  3:59                           ` Jason Wang
2022-03-07  4:25                             ` Akihiko Odaki
2022-03-07  4:51                               ` Jason Wang
2022-03-07  6:54                                 ` Akihiko Odaki
2022-02-25 17:13 ` [PATCH v15 4/8] net/vmnet: implement host mode (vmnet-host) Vladislav Yaroshchuk
2022-02-25 17:13 ` [PATCH v15 5/8] net/vmnet: implement bridged mode (vmnet-bridged) Vladislav Yaroshchuk
2022-02-25 17:50   ` Akihiko Odaki
2022-02-25 17:14 ` [PATCH v15 6/8] net/vmnet: update qemu-options.hx Vladislav Yaroshchuk
2022-02-25 17:14 ` [PATCH v15 7/8] net/vmnet: update hmp-commands.hx Vladislav Yaroshchuk
2022-02-25 17:14 ` [PATCH v15 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=20220225171402.64861-2-Vladislav.Yaroshchuk@jetbrains.com \
    --to=vladislav.yaroshchuk@jetbrains.com \
    --cc=agraf@csgraf.de \
    --cc=akihiko.odaki@gmail.com \
    --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 \
    /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.