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 AC799A0546; Sun, 14 Feb 2021 03:17:12 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9DD0A22A24E; Sun, 14 Feb 2021 03:16:35 +0100 (CET) Received: from mail-lf1-f50.google.com (mail-lf1-f50.google.com [209.85.167.50]) by mails.dpdk.org (Postfix) with ESMTP id DE36D22A1FA for ; Sun, 14 Feb 2021 03:16:31 +0100 (CET) Received: by mail-lf1-f50.google.com with SMTP id v24so5186827lfr.7 for ; Sat, 13 Feb 2021 18:16:31 -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=s8PuvtpBArwF7/fq6Qc20DtErKfxIucrH76q8EaTAGU5Sm63yNcY4ZA5pbV+DvrdnH 7isxw78SVJCX+2pgX0pFISIb+3JrQD8ogkHkAsXJ/WXJ5z2qtoypRUuL4RsQ6G6LAd9/ OKQ2QUDtOXop3PkVFmQwjHioXBLs4JFshN1PK8tHG6padTAJtVrtDVE2ifyqm+qzBRsL AkpeTYYyivm7Z7ywBymPKD9dcJl0a+OeeoWUnbDgoO6ryF3exIF3ST/ZaZltGSmo19ip /5BSHWPWJfcck8X4hNnEy4Z3037lFPR90nxnd0tL3IPLf18wbwU74hCEIdftJPpquPJQ xW/A== 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=q3jLGi7OSwm+BQfo1yhqf/NgCO835VtIbjAIQWCMP9KwoOFiwOuXKGrifTHgm2OUYa x0jNYQjCizz5B9UePfNMBMvYJDgaZGRautfiHeWt0auDxBhT6nN0hhwpRQHPRH7SYuab m6lxXoilhXEepKXLsvlJIOM33L3gGUqBNC2FFDxh28Yb55sem4SvKUHwiJD9yfNhPCmP qtpTf81DiJOsVvECyXlGFbn/5uRqm7uFNzu+E9eXo1TqaXQPjZvtMdohulUJmZOyGi8D x1YishiUx/gKUAJMDNhpDlr4mseeKlUq7kcftlqBxbhQ90bcMqVx/EgxmBHK32wtatCU V0Vw== X-Gm-Message-State: AOAM5312wdb5wSvZSHfFUmFjV4jf8RqP5C8nlwc55/fyTTxbol7/lGGE qsg88YVF+PB7hpEdXRwWaVXZXsdFJy7PKw== X-Google-Smtp-Source: ABdhPJyT5IGVPfhPSbyiUur1R4D4WIoSS1QcrtpjewOc4AgIkaWwHr7ZE70f+5Ek5ILjLReUsAnxrg== X-Received: by 2002:a05:6512:10c5:: with SMTP id k5mr5119758lfg.583.1613268991323; Sat, 13 Feb 2021 18:16:31 -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 l19sm3017158lji.53.2021.02.13.18.16.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 13 Feb 2021 18:16:30 -0800 (PST) From: Dmitry Kozlyuk To: dev@dpdk.org Cc: Tyler Retzlaff , Mike Wells , Dmitry Kozlyuk , Bruce Richardson Date: Sun, 14 Feb 2021 05:16:15 +0300 Message-Id: <20210214021616.26970-6-dmitry.kozliuk@gmail.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210214021616.26970-1-dmitry.kozliuk@gmail.com> References: <20210214012013.23165-1-dmitry.kozliuk@gmail.com> <20210214021616.26970-1-dmitry.kozliuk@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v2 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