From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 4E255A04F0 for ; Tue, 10 Dec 2019 16:02:09 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 44EC71BF6E; Tue, 10 Dec 2019 16:02:09 +0100 (CET) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) by dpdk.org (Postfix) with ESMTP id 495DC37A2 for ; Tue, 10 Dec 2019 16:02:07 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1575990126; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=G/FQeOJWK7SyErTVduhmWJlIZxE3NWwCo1lH+PU2d4A=; b=Rz5zltP68ek/5wTHXbzKYhAVco3juju7NRPHzgoUAyXVlHat5wRrTX7IT/BDYr7m7pRUFm nr4OIoJDnFXbpP/fq38nFfA4sdL6hhy6tRjG1Po/N7Bp4XWntyo92eS0/2CExvOQzpdbaf cwdv+b9ZonAobd4qldP/TUPKOxRks6E= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-364-TLVI6P9_OgSb1YQt1FRuqg-1; Tue, 10 Dec 2019 10:02:03 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 2E876806006; Tue, 10 Dec 2019 15:02:02 +0000 (UTC) Received: from rh.redhat.com (ovpn-116-64.ams2.redhat.com [10.36.116.64]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1DB345D9C5; Tue, 10 Dec 2019 15:02:00 +0000 (UTC) From: Kevin Traynor To: Bruce Richardson Cc: Cristian Bidea , dpdk stable Date: Tue, 10 Dec 2019 14:59:37 +0000 Message-Id: <20191210145937.32755-63-ktraynor@redhat.com> In-Reply-To: <20191210145937.32755-1-ktraynor@redhat.com> References: <20191210145937.32755-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-MC-Unique: TLVI6P9_OgSb1YQt1FRuqg-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Subject: [dpdk-stable] patch 'port: fix pcap support with meson' has been queued to LTS release 18.11.6 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" Hi, FYI, your patch has been queued to LTS release 18.11.6 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 12/16/19. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasi= ng (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable-queue This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable-queue/commit/5e8a1c2a3bfe0f7ec1= e1fe01b00ecf7112f29e3b Thanks. Kevin. --- >From 5e8a1c2a3bfe0f7ec1e1fe01b00ecf7112f29e3b Mon Sep 17 00:00:00 2001 From: Bruce Richardson Date: Tue, 24 Sep 2019 13:04:14 +0100 Subject: [PATCH] port: fix pcap support with meson [ upstream commit 268fa581b1ffbd3077279c18f5a86992b747a9c0] The meson build was missing the define to enable pcap port support if libpcap (development) package was found on the build platform. Rather than duplicating the checks for libpcap found in the pcap net PMD build file, we can move the checks to the top-level config directory and reference the RTE_PCAP_PORT setting elsewhere in the build. Bugzilla ID: 351 Fixes: 5b9656b157d3 ("lib: build with meson") Reported-by: Cristian Bidea Signed-off-by: Bruce Richardson Tested-by: Cristian Bidea --- config/meson.build | 13 +++++++++++++ drivers/net/pcap/meson.build | 6 ++---- lib/librte_port/meson.build | 4 ++++ 3 files changed, 19 insertions(+), 4 deletions(-) diff --git a/config/meson.build b/config/meson.build index d76776137..616af9746 100644 --- a/config/meson.build +++ b/config/meson.build @@ -90,4 +90,17 @@ if host_machine.system() =3D=3D 'linux' and cc.find_libr= ary('bsd', endif =20 +# check for pcap +pcap_dep =3D dependency('pcap', required: false) +if pcap_dep.found() +=09# pcap got a pkg-config file only in 1.9.0 and before that meson uses +=09# an internal pcap-config finder, which is not compatible with +=09# cross-compilation, so try to fallback to find_library +=09pcap_dep =3D cc.find_library('pcap', required: false) +endif +if pcap_dep.found() and cc.has_header('pcap.h', dependencies: pcap_dep) +=09dpdk_conf.set('RTE_PORT_PCAP', 1) +=09dpdk_extra_ldflags +=3D '-lpcap' +endif + # add -include rte_config to cflags add_project_arguments('-include', 'rte_config.h', language: 'c') diff --git a/drivers/net/pcap/meson.build b/drivers/net/pcap/meson.build index 0c4e0201a..2e84a5efc 100644 --- a/drivers/net/pcap/meson.build +++ b/drivers/net/pcap/meson.build @@ -2,9 +2,7 @@ # Copyright(c) 2017 Intel Corporation =20 -pcap_dep =3D cc.find_library('pcap', required: false) -if pcap_dep.found() and cc.has_header('pcap.h', dependencies: pcap_dep) -=09build =3D true -else +if not dpdk_conf.has('RTE_PORT_PCAP') =09build =3D false +=09reason =3D 'missing dependency, "libpcap"' endif sources =3D files('rte_eth_pcap.c') diff --git a/lib/librte_port/meson.build b/lib/librte_port/meson.build index 0d11456f0..1b48127c1 100644 --- a/lib/librte_port/meson.build +++ b/lib/librte_port/meson.build @@ -24,4 +24,8 @@ headers =3D files( deps +=3D ['ethdev', 'sched', 'ip_frag', 'cryptodev'] =20 +if dpdk_conf.has('RTE_PORT_PCAP') +=09ext_deps +=3D pcap_dep # dependency provided in config/meson.build +endif + if dpdk_conf.has('RTE_LIBRTE_KNI') =09sources +=3D files('rte_port_kni.c') --=20 2.21.0 --- Diff of the applied patch vs upstream commit (please double-check if non-= empty: --- --- -=092019-12-10 14:49:43.207549387 +0000 +++ 0063-port-fix-pcap-support-with-meson.patch=092019-12-10 14:49:39.11145= 6667 +0000 @@ -0,0 +1,79 @@ +From 5e8a1c2a3bfe0f7ec1e1fe01b00ecf7112f29e3b Mon Sep 17 00:00:00 2001 +From: Bruce Richardson +Date: Tue, 24 Sep 2019 13:04:14 +0100 +Subject: [PATCH] port: fix pcap support with meson + +[ upstream commit 268fa581b1ffbd3077279c18f5a86992b747a9c0] + +The meson build was missing the define to enable pcap port support if +libpcap (development) package was found on the build platform. Rather than +duplicating the checks for libpcap found in the pcap net PMD build file, w= e +can move the checks to the top-level config directory and reference the +RTE_PCAP_PORT setting elsewhere in the build. + +Bugzilla ID: 351 +Fixes: 5b9656b157d3 ("lib: build with meson") + +Reported-by: Cristian Bidea +Signed-off-by: Bruce Richardson +Tested-by: Cristian Bidea +--- + config/meson.build | 13 +++++++++++++ + drivers/net/pcap/meson.build | 6 ++---- + lib/librte_port/meson.build | 4 ++++ + 3 files changed, 19 insertions(+), 4 deletions(-) + +diff --git a/config/meson.build b/config/meson.build +index d76776137..616af9746 100644 +--- a/config/meson.build ++++ b/config/meson.build +@@ -90,4 +90,17 @@ if host_machine.system() =3D=3D 'linux' and cc.find_lib= rary('bsd', + endif +=20 ++# check for pcap ++pcap_dep =3D dependency('pcap', required: false) ++if pcap_dep.found() ++=09# pcap got a pkg-config file only in 1.9.0 and before that meson uses ++=09# an internal pcap-config finder, which is not compatible with ++=09# cross-compilation, so try to fallback to find_library ++=09pcap_dep =3D cc.find_library('pcap', required: false) ++endif ++if pcap_dep.found() and cc.has_header('pcap.h', dependencies: pcap_dep) ++=09dpdk_conf.set('RTE_PORT_PCAP', 1) ++=09dpdk_extra_ldflags +=3D '-lpcap' ++endif ++ + # add -include rte_config to cflags + add_project_arguments('-include', 'rte_config.h', language: 'c') +diff --git a/drivers/net/pcap/meson.build b/drivers/net/pcap/meson.build +index 0c4e0201a..2e84a5efc 100644 +--- a/drivers/net/pcap/meson.build ++++ b/drivers/net/pcap/meson.build +@@ -2,9 +2,7 @@ + # Copyright(c) 2017 Intel Corporation +=20 +-pcap_dep =3D cc.find_library('pcap', required: false) +-if pcap_dep.found() and cc.has_header('pcap.h', dependencies: pcap_dep) +-=09build =3D true +-else ++if not dpdk_conf.has('RTE_PORT_PCAP') + =09build =3D false ++=09reason =3D 'missing dependency, "libpcap"' + endif + sources =3D files('rte_eth_pcap.c') +diff --git a/lib/librte_port/meson.build b/lib/librte_port/meson.build +index 0d11456f0..1b48127c1 100644 +--- a/lib/librte_port/meson.build ++++ b/lib/librte_port/meson.build +@@ -24,4 +24,8 @@ headers =3D files( + deps +=3D ['ethdev', 'sched', 'ip_frag', 'cryptodev'] +=20 ++if dpdk_conf.has('RTE_PORT_PCAP') ++=09ext_deps +=3D pcap_dep # dependency provided in config/meson.build ++endif ++ + if dpdk_conf.has('RTE_LIBRTE_KNI') + =09sources +=3D files('rte_port_kni.c') +--=20 +2.21.0 +