From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 70620A0546; Sun, 14 Feb 2021 02:21:07 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id AA96822A1FA; Sun, 14 Feb 2021 02:20:33 +0100 (CET) Received: from mail-lf1-f41.google.com (mail-lf1-f41.google.com [209.85.167.41]) by mails.dpdk.org (Postfix) with ESMTP id 369FA1CC502 for ; Sun, 14 Feb 2021 02:20:29 +0100 (CET) Received: by mail-lf1-f41.google.com with SMTP id f1so5149416lfu.3 for ; Sat, 13 Feb 2021 17:20:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Whr/pMS4CpIAeA7lnJmuhxngW4VKQ3qReJqGWS8gbbg=; b=RUTFUCK1YT+5EKK8CEaR4uO2AZuY+UXVzJD2RP6csps5JXiPILDv5fsFRPI/pb3Jyv VjltmC2icrzc/rpbYQpMyd8VljlKAWUMwcaMWJl76dz4kk4lGAKJ5iB4XPihRU+Cg0vs Rm4QEcs7vNNzyZfgf0a3qf3a0l4QVKLkUyPCWoMTtq4jdXg1afQp4gtBSrrzy703mjcE 4H/+sUm4h6GIrh0MMcBm7f+P/tk4Q6yJciz31NTJyiRQdyr/ImoAIwib9BCCCr62ZFPK LgcNn7t2DMe8COZoQHvUtwS3ptWxSY0NDY7IhzghXwN8tm8UITuS+TnrmPdc06QjDX8q wc0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Whr/pMS4CpIAeA7lnJmuhxngW4VKQ3qReJqGWS8gbbg=; b=kF/MfFTeQ8xc/cdj4lMNhNQGUxZvaPsLIAydtvoCEJOGuSW35Yg8QghiqGxNgA4Y0N ZN5mZDtmDjS9fPDV1678qQ/g02PHRsswNq4f8AjKo3ChhXSbagB+KNdh+Bgj1FcwUvVv xj8EQvS2lEfAy4Sh6jWvCWicr9WlidyyU6sf51KJ3vImCl66n+mqVwbTvce+cO1MRkbO EnB5YatyEPT847/2m67CQrE7nVhF6e3JM9OQIu0BCFgAtlrx5zCY0hQYSuEZigWcIIc9 BKCwi53Ah8hiSChKfGbkFhsA/yFE+wYtOzFol3uAxaFz0z8tYj0GaZPxk0lXk789lutu cHMQ== X-Gm-Message-State: AOAM531dzPee9BZZZLivh/6WbYBP2M55dsGlaX79PRWtpY0YSycYT/1S WH02YYjEbS/DMfTsKw/ksyE/duv/haZhhQ== X-Google-Smtp-Source: ABdhPJxpIH4LMxLmwOlDNF97Liaj+sy4UIV3J1g41Y05KJcPmPBiZxqhDUD1fdnmtUcyLQr070TPCA== X-Received: by 2002:a05:6512:3184:: with SMTP id i4mr5341365lfe.314.1613265628539; Sat, 13 Feb 2021 17:20:28 -0800 (PST) Received: from localhost.localdomain (broadband-37-110-65-23.ip.moscow.rt.ru. [37.110.65.23]) by smtp.gmail.com with ESMTPSA id h11sm2237648lfd.243.2021.02.13.17.20.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 13 Feb 2021 17:20:27 -0800 (PST) From: Dmitry Kozlyuk To: dev@dpdk.org Cc: Tyler Retzlaff , Mike Wells , Dmitry Kozlyuk , Bruce Richardson Date: Sun, 14 Feb 2021 04:20:12 +0300 Message-Id: <20210214012013.23165-6-dmitry.kozliuk@gmail.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210214012013.23165-1-dmitry.kozliuk@gmail.com> References: <20210214012013.23165-1-dmitry.kozliuk@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH 5/6] config: discover libpcap on Windows X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" WinPcap or Npcap, can be installed anywhere. Add a Meson option to specify SDK path. Signed-off-by: Dmitry Kozlyuk --- config/meson.build | 21 ++++++++++++++++++--- meson_options.txt | 6 ++++-- 2 files changed, 22 insertions(+), 5 deletions(-) diff --git a/config/meson.build b/config/meson.build index 3cf560b8a..6aae8276c 100644 --- a/config/meson.build +++ b/config/meson.build @@ -178,9 +178,24 @@ if not pcap_dep.found() # pcap got a pkg-config file only in 1.9.0 pcap_dep = cc.find_library('pcap', required: false) endif -if pcap_dep.found() and cc.has_header('pcap.h', dependencies: pcap_dep) - dpdk_conf.set('RTE_PORT_PCAP', 1) - dpdk_extra_ldflags += '-lpcap' +if is_windows + # npcap SDK can be installed anywhere + pcap_sdk = get_option('pcap_sdk') + if pcap_sdk != '' + pcap_ldflags = ['-L@0@/Lib/x64'.format(pcap_sdk), '-lwpcap'] + pcap_dep = declare_dependency( + compile_args: ['-I@0@/Include'.format(pcap_sdk)], + link_args: pcap_ldflags) + endif + if pcap_dep.found() + dpdk_conf.set('RTE_PORT_PCAP', 1) + dpdk_extra_ldflags += pcap_ldflags + endif +else + if pcap_dep.found() and cc.has_header('pcap.h', dependencies: pcap_dep) + dpdk_conf.set('RTE_PORT_PCAP', 1) + dpdk_extra_ldflags += '-lpcap' + endif endif # for clang 32-bit compiles we need libatomic for 64-bit atomic ops diff --git a/meson_options.txt b/meson_options.txt index 6eff62e47..d74146d3a 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -10,6 +10,8 @@ option('enable_docs', type: 'boolean', value: false, description: 'build documentation') option('enable_kmods', type: 'boolean', value: false, description: 'build kernel modules') +option('enable_trace_fp', type: 'boolean', value: false, + description: 'enable fast path trace points.') option('examples', type: 'string', value: '', description: 'Comma-separated list of examples to build by default') option('flexran_sdk', type: 'string', value: '', @@ -28,8 +30,8 @@ option('max_lcores', type: 'integer', value: 128, description: 'maximum number of cores/threads supported by EAL') option('max_numa_nodes', type: 'integer', value: 32, description: 'maximum number of NUMA nodes supported by EAL') -option('enable_trace_fp', type: 'boolean', value: false, - description: 'enable fast path trace points.') +option('pcap_sdk', type: 'string', value: '', + description: 'Path to libpcap SDK used on Windows') option('tests', type: 'boolean', value: true, description: 'build unit tests') option('use_hpet', type: 'boolean', value: false, -- 2.29.2