Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E28D4C433EF for ; Tue, 11 Jan 2022 21:16:55 +0000 (UTC) Received: from localhost ([::1]:39186 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n7OVi-0000Nw-TO for qemu-devel@archiver.kernel.org; Tue, 11 Jan 2022 16:16:54 -0500 Received: from eggs.gnu.org ([209.51.188.92]:33436) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n7OTf-0005yc-I3 for qemu-devel@nongnu.org; Tue, 11 Jan 2022 16:14:47 -0500 Received: from [2a00:1450:4864:20::136] (port=38419 helo=mail-lf1-x136.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1n7OTd-000318-TF for qemu-devel@nongnu.org; Tue, 11 Jan 2022 16:14:47 -0500 Received: by mail-lf1-x136.google.com with SMTP id x6so1146430lfa.5 for ; Tue, 11 Jan 2022 13:14:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=/b+YJtOqXN4cQx3onq7fYH5j1qiIM+TTZPlN+ePk8FU=; b=Gs9ndj5RJ1Z5sxfnhv+vib6MswmWL2AXaqRc/W96wPnn6WfZ2e7zoxO3IBPWuUI9gJ a7SeInzD5HOVfuasHLcZ8gA6GT/3xSsk8+m2LiNiofaa0DjKh5ItOrp6YixDHQKnJHTT QAavigx/u/b+4d8nArX5o2da1RnhFH7xq22hUPgBZxC0hCpyCemxOE1BLvh2mktoAJki bvfXLeRxDb+sF3SOR+EUFNgcw48AXfcjE2b4e3Vp0ZvD8Xt5DSE1nJAE+Df9P5dSCLZX TYgTqM6cLVpz035lgrrGNoo5whHKGLlPBuDQ2yLFJhnaooN/trhzn907uLBTCCnlEnNe M7Ng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=/b+YJtOqXN4cQx3onq7fYH5j1qiIM+TTZPlN+ePk8FU=; b=rKJ889sZ+iP46MsVAzvN9mb1q03RAh85XzwANL602M5PamI0QxfgeDimMJEBeY6Oa2 gaiJEKDAQewi/NTyqY83+3l997YKb/qNp2z4YBh6DDe+RwbFUYlVk6UbC4F54EpE2IFZ PejBX4zs3MhW53eWaOm2nEP3XLPISD65deldnosF5eiO5Y5t2lwehjdENWgFNAiKQguy ABrwY4Ng2wBJgA3j0b/zh35WfBp4xsRCFgJZdJFIgjAqhEqD1sNzQ5xF4i8Ggi2YKpMS DviJHT5qVeipHkO8ITJgkSn4B2UbJYyqleSBEMZq00GLSp6w0FZJ1QNSS+3bjRWhTTpq hWZQ== X-Gm-Message-State: AOAM530Kro2TUyWGYWVDym4NOR6DbsP6VhbAkxZyl5gT6mr/KGxzr0qc nOJm7cLyAscNujqp0A3nMNOj3wxnxTL3TA== X-Google-Smtp-Source: ABdhPJxoN1mw3zlJw0cWF4m9dghDclQuZb8TuJAiGk8k/ELvR7B67fVxhmq5N4LGH9DWuSurMX8sgQ== X-Received: by 2002:ac2:53b0:: with SMTP id j16mr4810747lfh.512.1641935683839; Tue, 11 Jan 2022 13:14:43 -0800 (PST) Received: from UNIT-808.lan ([2a02:2698:6c2a:6a8d:c51:3b28:285b:bcad]) by smtp.gmail.com with ESMTPSA id u5sm1422045lja.36.2022.01.11.13.14.42 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Jan 2022 13:14:43 -0800 (PST) From: Vladislav Yaroshchuk To: qemu-devel@nongnu.org Subject: [PATCH v10 1/7] net/vmnet: add vmnet dependency and customizable option Date: Wed, 12 Jan 2022 00:14:16 +0300 Message-Id: <20220111211422.21789-2-yaroshchuk2000@gmail.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20220111211422.21789-1-yaroshchuk2000@gmail.com> References: <20220111211422.21789-1-yaroshchuk2000@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::136 (failed) Received-SPF: pass client-ip=2a00:1450:4864:20::136; envelope-from=yaroshchuk2000@gmail.com; helo=mail-lf1-x136.google.com X-Spam_score_int: -10 X-Spam_score: -1.1 X-Spam_bar: - X-Spam_report: (-1.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Vladislav Yaroshchuk , jasowang@redhat.com, phillip.ennen@gmail.com, armbru@redhat.com, r.bolshakov@yadro.com, phillip@axleos.com, akihiko.odaki@gmail.com, hsp.cat7@gmail.com, hello@adns.io, eblake@redhat.com Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" 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 --- meson.build | 16 +++++++++++++++- meson_options.txt | 2 ++ scripts/meson-buildoptions.sh | 3 +++ 3 files changed, 20 insertions(+), 1 deletion(-) diff --git a/meson.build b/meson.build index c1b1db1e28..a6751ec946 100644 --- a/meson.build +++ b/meson.build @@ -496,6 +496,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_SHARING_SERVICE_BUSY', + 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', @@ -1492,6 +1504,7 @@ config_host_data.set('CONFIG_SECCOMP', seccomp.found()) config_host_data.set('CONFIG_SNAPPY', snappy.found()) 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()) @@ -3406,7 +3419,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 921967eddb..701e1381f9 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -151,6 +151,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 50bd7bed4d..cdcece4b05 100644 --- a/scripts/meson-buildoptions.sh +++ b/scripts/meson-buildoptions.sh @@ -84,6 +84,7 @@ meson_options_help() { printf "%s\n" ' u2f U2F emulation support' printf "%s\n" ' usb-redir libusbredir support' printf "%s\n" ' vde vde network 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" ' virglrenderer virgl rendering support' @@ -248,6 +249,8 @@ _meson_option_parse() { --disable-usb-redir) printf "%s" -Dusb_redir=disabled ;; --enable-vde) printf "%s" -Dvde=enabled ;; --disable-vde) printf "%s" -Dvde=disabled ;; + --enable-vmnet) printf "%s" -Dvmnet=enabled ;; + --disable-vmnet) printf "%s" -Dvmnet=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 ;; -- 2.23.0