From patchwork Sun Dec 3 01:00:00 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Github ODP bot X-Patchwork-Id: 120430 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp2863808qgn; Sat, 2 Dec 2017 17:00:48 -0800 (PST) X-Google-Smtp-Source: AGs4zMaftXsdFGV4NFKDfLDgSYmkpWsR3fr8PKt3rFgJY7hJUNhzVyMrCtv+Qg3SxqcuHrFw4ysl X-Received: by 10.55.162.84 with SMTP id l81mr13574457qke.29.1512262848702; Sat, 02 Dec 2017 17:00:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1512262848; cv=none; d=google.com; s=arc-20160816; b=VMW/q+E6zKavhQgeVjyHQgv6r1NmfYcaBhfzR4RjTchbdK6N3mgM2HFnjJB/ycMj6m PaO0sMTqztSLu0DUZ58zcxac6NQ6xnTtlzWazM5FADynYnohc9u8FryGFdZYopVt08RD PvP0roeC8sQOmj22Ew4DzDvuvQmcI0+rAoUOWbkK8rooXyHFTBBK7N1qV9NPG/JyHwhR 2JER7Xa9qYcF+8pCIrpgmhn0Wy5UqEjwDCMZjG/UCj2Mho5dj+7zCb/3a8317YIbRZx6 lO2bq0WWqeqAOiZ7Cy5UnXacOBSk2NIlRaB0wf6o+vXS/F4RTx6Rgs8oTw0nqkJ3qhNa zFQg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:github-pr-num :references:in-reply-to:message-id:date:to:from:delivered-to :arc-authentication-results; bh=62uAgKrK/yVWjzzJy2EJfZ6UAcfeccbHOrF+gpH47N0=; b=Pv9ySrGtsV924Z4yTng7v9bZ4d0LueLTIPU3gULlaCLsneO/xQTb/nmh0ew9gvNtJk RtCtPvuwKGkXmJyXHfpTIL4/79CMRaEnuB9IFH4eSr4ulkA36Pdo8PAjVhZYDp955xxe dil6hyMsJ6/RR09s175tOdEOZMxUoMtBbtVirUHjiMhnkJgLSqnodi6qGnOylkiL+kvl 2o4pN+QMj7po3qM/4FBFMTCab9OENa/aYjLzkrlgSoBsq3IfxxbVxM3fCrfM9L3jrCg0 BTf/+9uFaiwC4knZMqoZM3SssO+liiTCGFaijS/jFHy3Iqb059rNDWgxDRpIsbg08Fg/ DrxA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Return-Path: Received: from lists.linaro.org (ec2-54-197-127-237.compute-1.amazonaws.com. [54.197.127.237]) by mx.google.com with ESMTP id 2si5653622qkm.450.2017.12.02.17.00.48; Sat, 02 Dec 2017 17:00:48 -0800 (PST) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) client-ip=54.197.127.237; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Received: by lists.linaro.org (Postfix, from userid 109) id 663A26094A; Sun, 3 Dec 2017 01:00:48 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id 5B92D6073F; Sun, 3 Dec 2017 01:00:16 +0000 (UTC) X-Original-To: lng-odp@lists.linaro.org Delivered-To: lng-odp@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id E6DBB6073F; Sun, 3 Dec 2017 01:00:11 +0000 (UTC) Received: from forward102p.mail.yandex.net (forward102p.mail.yandex.net [77.88.28.102]) by lists.linaro.org (Postfix) with ESMTPS id E1ECF60690 for ; Sun, 3 Dec 2017 01:00:09 +0000 (UTC) Received: from mxback1j.mail.yandex.net (mxback1j.mail.yandex.net [IPv6:2a02:6b8:0:1619::10a]) by forward102p.mail.yandex.net (Yandex) with ESMTP id E988C430190F for ; Sun, 3 Dec 2017 04:00:07 +0300 (MSK) Received: from smtp3o.mail.yandex.net (smtp3o.mail.yandex.net [2a02:6b8:0:1a2d::27]) by mxback1j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id XXCK7krCZb-07C4psrh; Sun, 03 Dec 2017 04:00:07 +0300 Received: by smtp3o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id rRTmwan6So-06dmtCNK; Sun, 03 Dec 2017 04:00:06 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client certificate not present) From: Github ODP bot To: lng-odp@lists.linaro.org Date: Sun, 3 Dec 2017 04:00:00 +0300 Message-Id: <1512262805-15125-2-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1512262805-15125-1-git-send-email-odpbot@yandex.ru> References: <1512262805-15125-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 321 Subject: [lng-odp] [PATCH v1 1/6] configure: separate common DPDK check to odp_dpdk.m4 X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "The OpenDataPlane \(ODP\) List" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" From: Dmitry Eremin-Solenikov Signed-off-by: Dmitry Eremin-Solenikov --- /** Email created from pull request 321 (lumag:dpdk-system-master) ** https://github.com/Linaro/odp/pull/321 ** Patch: https://github.com/Linaro/odp/pull/321.patch ** Base sha: 5329e5211c447b9b823149baf76112eedfeb07fb ** Merge commit sha: 527862cca98549d4fc5bd0f966d3609477b20443 **/ m4/odp_dpdk.m4 | 49 +++++++++++++++++++++++++++++++++++ platform/linux-generic/m4/odp_dpdk.m4 | 35 +++++-------------------- 2 files changed, 56 insertions(+), 28 deletions(-) create mode 100644 m4/odp_dpdk.m4 diff --git a/m4/odp_dpdk.m4 b/m4/odp_dpdk.m4 new file mode 100644 index 000000000..636170a7f --- /dev/null +++ b/m4/odp_dpdk.m4 @@ -0,0 +1,49 @@ +# ODP_DPDK_PMDS(DPDK_DRIVER_PATH) +# ------------------------------- +# Build a list of DPDK PMD drivers in DPDK_PMDS variable +AC_DEFUN([ODP_DPDK_PMDS], [dnl +AS_VAR_SET([DPDK_PMDS], [-Wl,--whole-archive,]) +for filename in "$1"/librte_pmd_*.a; do +cur_driver=`basename "$filename" .a | sed -e 's/^lib//'` +# rte_pmd_nfp has external dependencies which break linking +if test "$cur_driver" = "rte_pmd_nfp"; then + echo "skip linking rte_pmd_nfp" +else + AS_VAR_APPEND([DPDK_PMDS], [-l$cur_driver,]) +fi +done +AS_VAR_APPEND([DPDK_PMDS], [--no-whole-archive]) +AC_SUBST([DPDK_PMDS]) +]) + +# ODP_DPDK_CHECK(CPPFLAGS, LDFLAGS, ACTION-IF-FOUND, ACTION-IF-NOT-FOUND) +# ----------------------------------------------------------------------- +# Check for DPDK availability +AC_DEFUN([ODP_DPDK_CHECK], [dnl +########################################################################## +# Save and set temporary compilation flags +########################################################################## +OLD_LDFLAGS=$LDFLAGS +OLD_LIBS=$LIBS +OLD_CPPFLAGS=$CPPFLAGS +LDFLAGS="$2 $LDFLAGS" +CPPFLAGS="$1 $CPPFLAGS" + +dpdk_check_ok=yes + +AC_CHECK_HEADERS([rte_config.h], [], + [dpdk_check_ok=no]) + +AC_CHECK_LIB([dpdk], [rte_eal_init], [], + [dpdk_check_ok=no], [-ldl -lpthread -lnuma]) +AS_IF([test "x$dpdk_check_ok" != "xno"], + [m4_default([$3], [:])], + [m4_default([$4], [:])]) + +########################################################################## +# Restore old saved variables +########################################################################## +LDFLAGS=$OLD_LDFLAGS +LIBS=$OLD_LIBS +CPPFLAGS=$OLD_CPPFLAGS +]) diff --git a/platform/linux-generic/m4/odp_dpdk.m4 b/platform/linux-generic/m4/odp_dpdk.m4 index 1e8fa2de9..ba0fdc935 100644 --- a/platform/linux-generic/m4/odp_dpdk.m4 +++ b/platform/linux-generic/m4/odp_dpdk.m4 @@ -3,9 +3,10 @@ ########################################################################## pktio_dpdk_support=no AC_ARG_WITH([dpdk-path], -AS_HELP_STRING([--with-dpdk-path=DIR path to dpdk build directory]), +[AS_HELP_STRING([--with-dpdk-path=DIR], [path to dpdk build directory])], [DPDK_PATH="$withval" DPDK_CPPFLAGS="-msse4.2 -isystem $DPDK_PATH/include" + DPDK_LDFLAGS="-L$DPDK_PATH/lib" pktio_dpdk_support=yes],[]) ########################################################################## @@ -13,17 +14,11 @@ AS_HELP_STRING([--with-dpdk-path=DIR path to dpdk build directory]), ########################################################################## zero_copy=0 AC_ARG_ENABLE([dpdk-zero-copy], - [ --enable-dpdk-zero-copy enable experimental zero-copy DPDK pktio mode], + [AS_HELP_STRING([--enable-dpdk-zero-copy], [enable experimental zero-copy DPDK pktio mode])], [if test x$enableval = xyes; then zero_copy=1 fi]) -########################################################################## -# Save and set temporary compilation flags -########################################################################## -OLD_CPPFLAGS="$CPPFLAGS" -CPPFLAGS="$DPDK_CPPFLAGS $CPPFLAGS" - ########################################################################## # Check for DPDK availability # @@ -32,37 +27,21 @@ CPPFLAGS="$DPDK_CPPFLAGS $CPPFLAGS" ########################################################################## if test x$pktio_dpdk_support = xyes then - AC_CHECK_HEADERS([rte_config.h], [], - [AC_MSG_FAILURE(["can't find DPDK header"])]) + ODP_DPDK_CHECK([$DPDK_CPPFLAGS], [$DPDK_LDFLAGS], [], + [AC_MSG_FAILURE([can't find DPDK])]) - AS_VAR_SET([DPDK_PMDS], [-Wl,--whole-archive,]) - for filename in "$DPDK_PATH"/lib/librte_pmd_*.a; do - cur_driver=`basename "$filename" .a | sed -e 's/^lib//'` - # rte_pmd_nfp has external dependencies which break linking - if test "$cur_driver" = "rte_pmd_nfp"; then - echo "skip linking rte_pmd_nfp" - else - AS_VAR_APPEND([DPDK_PMDS], [-l$cur_driver,]) - fi - done - AS_VAR_APPEND([DPDK_PMDS], [--no-whole-archive]) + ODP_DPDK_PMDS([$DPDK_PATH/lib]) AC_DEFINE([ODP_PKTIO_DPDK], [1], [Define to 1 to enable DPDK packet I/O support]) AC_DEFINE_UNQUOTED([ODP_DPDK_ZERO_COPY], [$zero_copy], [Define to 1 to enable DPDK zero copy support]) - DPDK_LIBS="-L$DPDK_PATH/lib -ldpdk -lpthread -ldl -lpcap -lm -lnuma" + DPDK_LIBS="$DPDK_LDFLAGS -ldpdk -lpthread -ldl -lpcap -lm -lnuma" AC_SUBST([DPDK_CPPFLAGS]) AC_SUBST([DPDK_LIBS]) - AC_SUBST([DPDK_PMDS]) else pktio_dpdk_support=no fi -########################################################################## -# Restore old saved variables -########################################################################## -CPPFLAGS=$OLD_CPPFLAGS - AM_CONDITIONAL([PKTIO_DPDK], [test x$pktio_dpdk_support = xyes ]) From patchwork Sun Dec 3 01:00:01 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Github ODP bot X-Patchwork-Id: 120432 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp2864975qgn; Sat, 2 Dec 2017 17:02:07 -0800 (PST) X-Google-Smtp-Source: AGs4zMY3I55emNlRZ35xod1QcmMMO9c94uBvjoaCj49wcHgqm9cJJEo/OABL5sorw55u6bDAfwcV X-Received: by 10.200.37.203 with SMTP id f11mr16188105qtf.230.1512262927047; Sat, 02 Dec 2017 17:02:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1512262927; cv=none; d=google.com; s=arc-20160816; b=QKyfTTqMI678BpvY+jfoqVfUh1F5K5PU4Q8epGooW2Q6Yuu0hcLIj8Yk3cQlmd/r6j +Le/k2tVwwSFnOSSXDZiplUKWMghKs+kLtc/ol7FR35qhpaBQkuUTdJ9XZx/+xFn5X3n EmOzpnSlU0hOOnGJVVe3EnDWuMovWqv6obniecT8G8wWtNQS92sOl0Qu0JRCJ1j5GmC9 z80a6zNVIOMhGhgnrEWeVnDRgq1lD/ouPPYNm/PkmBLNTr1BlKGWZC5ucjao+rjtiafV PQju8RpQzL0YC8LyqMOydXobrSMD5MPF+KE7UAFFOrwMilVaWPlg6mgwDiYBCgs1NPEJ 9X+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:github-pr-num :references:in-reply-to:message-id:date:to:from:delivered-to :arc-authentication-results; bh=aUoss//EdVjKofQkeAOZI740biDX7f4XmXVKONnz3/c=; b=QMuvYkDsg0+qfp8RsfLQpuwXv5D8B7RMXCM9WKld+r07BCChaYJS2ILmrOEaNCStDn eFImHevCnMru/HPuD5cVYF5Jo6+aomqJDZ0xKtqRD486ckEdP+JeNmu7ao4ShdQ1ZGUi YEcj3nWDrcHvkqHWDbCmfiw40Az1wa0Gjv/OKOAz5jhRkeJV6Jlb2FDCCBesG2IZbI/5 fiP9Ha6OmNaEJCZHz6pq7NKN2WFRMbJvbuGTqz3uyrKID4LA8OEeJjlY2WXV0lCU0VKo w29MOP8t9Zy8SIpPH8MB5WdmmHy6Bgc1C6eGTdGsgRIHzHDdWl6Tf30uBvZumsHWJZkO ef7A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Return-Path: Received: from lists.linaro.org (ec2-54-197-127-237.compute-1.amazonaws.com. [54.197.127.237]) by mx.google.com with ESMTP id v15si10115906qtc.47.2017.12.02.17.02.06; Sat, 02 Dec 2017 17:02:07 -0800 (PST) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) client-ip=54.197.127.237; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Received: by lists.linaro.org (Postfix, from userid 109) id C00F5609EF; Sun, 3 Dec 2017 01:02:06 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id 1AE07609C0; Sun, 3 Dec 2017 01:00:24 +0000 (UTC) X-Original-To: lng-odp@lists.linaro.org Delivered-To: lng-odp@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id F1DA960724; Sun, 3 Dec 2017 01:00:13 +0000 (UTC) Received: from forward101j.mail.yandex.net (forward101j.mail.yandex.net [5.45.198.241]) by lists.linaro.org (Postfix) with ESMTPS id 5B02260692 for ; Sun, 3 Dec 2017 01:00:10 +0000 (UTC) Received: from mxback14j.mail.yandex.net (mxback14j.mail.yandex.net [IPv6:2a02:6b8:0:1619::90]) by forward101j.mail.yandex.net (Yandex) with ESMTP id A8D3C1242479 for ; Sun, 3 Dec 2017 04:00:08 +0300 (MSK) Received: from smtp3o.mail.yandex.net (smtp3o.mail.yandex.net [2a02:6b8:0:1a2d::27]) by mxback14j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id TT9QChEy9h-08kiKCAx; Sun, 03 Dec 2017 04:00:08 +0300 Received: by smtp3o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id rRTmwan6So-07dKmKGE; Sun, 03 Dec 2017 04:00:08 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client certificate not present) From: Github ODP bot To: lng-odp@lists.linaro.org Date: Sun, 3 Dec 2017 04:00:01 +0300 Message-Id: <1512262805-15125-3-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1512262805-15125-1-git-send-email-odpbot@yandex.ru> References: <1512262805-15125-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 321 Subject: [lng-odp] [PATCH v1 2/6] linux-gen: add support for using system-wide DPDK X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "The OpenDataPlane \(ODP\) List" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" From: Dmitry Eremin-Solenikov Signed-off-by: Dmitry Eremin-Solenikov --- /** Email created from pull request 321 (lumag:dpdk-system-master) ** https://github.com/Linaro/odp/pull/321 ** Patch: https://github.com/Linaro/odp/pull/321.patch ** Base sha: 5329e5211c447b9b823149baf76112eedfeb07fb ** Merge commit sha: 527862cca98549d4fc5bd0f966d3609477b20443 **/ m4/odp_dpdk.m4 | 20 +++++++++++++++++--- platform/linux-generic/m4/odp_dpdk.m4 | 21 ++++++++++++++++++--- 2 files changed, 35 insertions(+), 6 deletions(-) diff --git a/m4/odp_dpdk.m4 b/m4/odp_dpdk.m4 index 636170a7f..03ad80c71 100644 --- a/m4/odp_dpdk.m4 +++ b/m4/odp_dpdk.m4 @@ -34,10 +34,24 @@ dpdk_check_ok=yes AC_CHECK_HEADERS([rte_config.h], [], [dpdk_check_ok=no]) -AC_CHECK_LIB([dpdk], [rte_eal_init], [], - [dpdk_check_ok=no], [-ldl -lpthread -lnuma]) +DPDK_LIBS="" +LIBS="$LIBS -ldpdk" +AS_IF([test "x$DPDK_LIBS" = "x"], + [AC_LINK_IFELSE([AC_LANG_CALL([], [rte_eal_init])], + [DPDK_LIBS="$2 -ldpdk"])]) +LIBS="$LIBS -ldl -lpthread" +AS_IF([test "x$DPDK_LIBS" = "x"], + [AC_LINK_IFELSE([AC_LANG_CALL([], [rte_eal_init])], + [DPDK_LIBS="$2 -ldpdk -lm -ldl -lpthread"])]) +LIBS="$LIBS -lnuma" +AS_IF([test "x$DPDK_LIBS" = "x"], + [AC_LINK_IFELSE([AC_LANG_CALL([], [rte_eal_init])], + [DPDK_LIBS="$2 -ldpdk -lm -ldl -lpthread -lnuma"])]) +AS_IF([test "x$DPDK_LIBS" = "x"], + [dpdk_check_ok=no]) AS_IF([test "x$dpdk_check_ok" != "xno"], - [m4_default([$3], [:])], + [AC_SUBST([DPDK_LIBS]) + m4_default([$3], [:])], [m4_default([$4], [:])]) ########################################################################## diff --git a/platform/linux-generic/m4/odp_dpdk.m4 b/platform/linux-generic/m4/odp_dpdk.m4 index ba0fdc935..c0d468c2a 100644 --- a/platform/linux-generic/m4/odp_dpdk.m4 +++ b/platform/linux-generic/m4/odp_dpdk.m4 @@ -5,9 +5,21 @@ pktio_dpdk_support=no AC_ARG_WITH([dpdk-path], [AS_HELP_STRING([--with-dpdk-path=DIR], [path to dpdk build directory])], [DPDK_PATH="$withval" + pktio_dpdk_support=yes],[]) + +if test "x$DPDK_PATH" = "xsystem" ; then + DPDK_CPPFLAGS="-msse4.2 -isystem/usr/include/dpdk" + DPDK_LDFLAGS="" + DPDK_PMD_PATH="`$CC --print-file-name=librte_pmd_null.a`" + DPDK_PMD_PATH="`dirname "$DPDK_PMD_PATH"`" + if test "x$DPDK_PMD_PATH" = "x" ; then + AC_MSG_FAILURE([Could not locate system DPDK PMD directory]) + fi +else DPDK_CPPFLAGS="-msse4.2 -isystem $DPDK_PATH/include" DPDK_LDFLAGS="-L$DPDK_PATH/lib" - pktio_dpdk_support=yes],[]) + DPDK_PMD_PATH="$DPDK_PATH/lib" +fi ########################################################################## # Enable zero-copy DPDK pktio @@ -30,14 +42,17 @@ then ODP_DPDK_CHECK([$DPDK_CPPFLAGS], [$DPDK_LDFLAGS], [], [AC_MSG_FAILURE([can't find DPDK])]) - ODP_DPDK_PMDS([$DPDK_PATH/lib]) + ODP_DPDK_PMDS([$DPDK_PMD_PATH]) AC_DEFINE([ODP_PKTIO_DPDK], [1], [Define to 1 to enable DPDK packet I/O support]) AC_DEFINE_UNQUOTED([ODP_DPDK_ZERO_COPY], [$zero_copy], [Define to 1 to enable DPDK zero copy support]) - DPDK_LIBS="$DPDK_LDFLAGS -ldpdk -lpthread -ldl -lpcap -lm -lnuma" + if test -r "$DPDK_PMD_PATH/librte_pmd_pcap.a" && + ! test -r "$DPDK_PMD_PATH/librte_pmd_pcap.so" ; then + DPDK_LIBS="$DPDK_LIBS -lpcap" + fi AC_SUBST([DPDK_CPPFLAGS]) AC_SUBST([DPDK_LIBS]) else From patchwork Sun Dec 3 01:00:02 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Github ODP bot X-Patchwork-Id: 120431 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp2864506qgn; Sat, 2 Dec 2017 17:01:35 -0800 (PST) X-Google-Smtp-Source: AGs4zMb2Rz8TVDvv7SELJMhrF4m21K3f9RWfWX7ALM82t9U+OQzcI/agSduETaRkf+Hq/AgQozB6 X-Received: by 10.55.221.212 with SMTP id u81mr14330998qku.174.1512262895132; Sat, 02 Dec 2017 17:01:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1512262895; cv=none; d=google.com; s=arc-20160816; b=GGDUzF9r07F02K92oIM4H0ndeAH9r3jhIMurBjjNk5RfCgE364fKfcMxCqSP7QwQDs YgNFu8iZFG/tkFHDtteNAtYZFos1/bLtviTat3zfWg7UpkltWx3t05p/8JTEcL3wfjBn 34n5vqxEA1b3S34AwvFVGqrKm6x6woaEXtPDJAYcp3Z/jceBYvaA84NYGuCZMaCNLI2F 5O8A90gvexSL7JBRDNmqb416g9NknXVZ1co0T88bwAxenWmoc+coJ+EokSME0MgS4dfS e9PUlLa1iEve748BeZqK4CqPK727Y/VYYZli+bOwUEkhEbCoAY6N67vk/rOpr0bUg1z9 6HVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:github-pr-num :references:in-reply-to:message-id:date:to:from:delivered-to :arc-authentication-results; bh=Roqow9/JQXlypIvFbd6N64+GSFGZG/bdb4gr+71qw0M=; b=RGA0qf5m7BRtYBcEVkll22lgE0rA6muhUbf3C7zrcc6iy6TOKRv9350ubhYNw0NMca URwap0bcteE7T4VN3fqhpbZVdBRri/cGDVKnSgycWCHSacD4s1y88xigkSaP9uFP0K37 Rp9oLAFdIk6jsEHHb6aisNy5+xiMoXjs7goEPt64wUaIdcmQjKhT7RImmUGdvTs3NJPR 2W5N87NQrOD1VfUq9KEMrhvVZodui6wYaB9p3iOKC/qDgm8sLbinyPRkTk5aRArGsFA2 XdFJORuPF3x5DOoAAjnC9oJ+ZCOaAK48Lmuy6oybIBg8fLXg7JdxuYqcvJNUWg+iRgHh jnsg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Return-Path: Received: from lists.linaro.org (ec2-54-197-127-237.compute-1.amazonaws.com. [54.197.127.237]) by mx.google.com with ESMTP id l20si6500695qtl.109.2017.12.02.17.01.34; Sat, 02 Dec 2017 17:01:35 -0800 (PST) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) client-ip=54.197.127.237; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Received: by lists.linaro.org (Postfix, from userid 109) id CD2C260804; Sun, 3 Dec 2017 01:01:34 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: X-Spam-Status: No, score=-5.4 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id CCD7460840; Sun, 3 Dec 2017 01:00:20 +0000 (UTC) X-Original-To: lng-odp@lists.linaro.org Delivered-To: lng-odp@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id A81BB60730; Sun, 3 Dec 2017 01:00:13 +0000 (UTC) Received: from forward101p.mail.yandex.net (forward101p.mail.yandex.net [77.88.28.101]) by lists.linaro.org (Postfix) with ESMTPS id CE59B60724 for ; Sun, 3 Dec 2017 01:00:10 +0000 (UTC) Received: from mxback3g.mail.yandex.net (mxback3g.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b7:164]) by forward101p.mail.yandex.net (Yandex) with ESMTP id 63B6C6A8302D for ; Sun, 3 Dec 2017 04:00:09 +0300 (MSK) Received: from smtp3o.mail.yandex.net (smtp3o.mail.yandex.net [2a02:6b8:0:1a2d::27]) by mxback3g.mail.yandex.net (nwsmtp/Yandex) with ESMTP id gAXmQogTMV-09kK2elh; Sun, 03 Dec 2017 04:00:09 +0300 Received: by smtp3o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id rRTmwan6So-08di7nA2; Sun, 03 Dec 2017 04:00:08 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client certificate not present) From: Github ODP bot To: lng-odp@lists.linaro.org Date: Sun, 3 Dec 2017 04:00:02 +0300 Message-Id: <1512262805-15125-4-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1512262805-15125-1-git-send-email-odpbot@yandex.ru> References: <1512262805-15125-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 321 Subject: [lng-odp] [PATCH v1 3/6] linux-gen: apply -msse4.2 only in x86 case X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "The OpenDataPlane \(ODP\) List" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" From: Dmitry Eremin-Solenikov Signed-off-by: Dmitry Eremin-Solenikov --- /** Email created from pull request 321 (lumag:dpdk-system-master) ** https://github.com/Linaro/odp/pull/321 ** Patch: https://github.com/Linaro/odp/pull/321.patch ** Base sha: 5329e5211c447b9b823149baf76112eedfeb07fb ** Merge commit sha: 527862cca98549d4fc5bd0f966d3609477b20443 **/ platform/linux-generic/Makefile.am | 6 ++++++ platform/linux-generic/m4/odp_dpdk.m4 | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/platform/linux-generic/Makefile.am b/platform/linux-generic/Makefile.am index 9cb501cf3..bbe6a21c2 100644 --- a/platform/linux-generic/Makefile.am +++ b/platform/linux-generic/Makefile.am @@ -14,6 +14,12 @@ AM_CPPFLAGS += $(OPENSSL_CPPFLAGS) AM_CPPFLAGS += $(DPDK_CPPFLAGS) AM_CPPFLAGS += $(NETMAP_CPPFLAGS) +if PKTIO_DPDK +if ARCH_IS_X86 +AM_CFLAGS += -msse4.2 +endif +endif + odpincludedir= $(includedir)/odp odpinclude_HEADERS = \ include/odp/visibility_begin.h \ diff --git a/platform/linux-generic/m4/odp_dpdk.m4 b/platform/linux-generic/m4/odp_dpdk.m4 index c0d468c2a..d79d29b55 100644 --- a/platform/linux-generic/m4/odp_dpdk.m4 +++ b/platform/linux-generic/m4/odp_dpdk.m4 @@ -8,7 +8,7 @@ AC_ARG_WITH([dpdk-path], pktio_dpdk_support=yes],[]) if test "x$DPDK_PATH" = "xsystem" ; then - DPDK_CPPFLAGS="-msse4.2 -isystem/usr/include/dpdk" + DPDK_CPPFLAGS="-isystem/usr/include/dpdk" DPDK_LDFLAGS="" DPDK_PMD_PATH="`$CC --print-file-name=librte_pmd_null.a`" DPDK_PMD_PATH="`dirname "$DPDK_PMD_PATH"`" @@ -16,7 +16,7 @@ if test "x$DPDK_PATH" = "xsystem" ; then AC_MSG_FAILURE([Could not locate system DPDK PMD directory]) fi else - DPDK_CPPFLAGS="-msse4.2 -isystem $DPDK_PATH/include" + DPDK_CPPFLAGS="-isystem $DPDK_PATH/include" DPDK_LDFLAGS="-L$DPDK_PATH/lib" DPDK_PMD_PATH="$DPDK_PATH/lib" fi From patchwork Sun Dec 3 01:00:03 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Github ODP bot X-Patchwork-Id: 120433 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp2865532qgn; Sat, 2 Dec 2017 17:02:46 -0800 (PST) X-Google-Smtp-Source: AGs4zMY/HCxmSPFngrj712lFmGvy6h5Hx8RlG16vd8Rhwzlbtm1/IICTE1bl8mD7Sfj7Km4rKXdu X-Received: by 10.237.35.246 with SMTP id k51mr15482927qtc.163.1512262966845; Sat, 02 Dec 2017 17:02:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1512262966; cv=none; d=google.com; s=arc-20160816; b=hXinDWaFNdkugWbHGw47cOz/Xfxx/O2dXQO4XqUpsGgo7DI3aiTBEECy/c+RIDdb8v EtGtTm3xoSTYnjsASW3Y+N4BiG7gZeG6GKwhexznsGnQiujTb4jptYisCH7SrjQOsTyP rjcX7gZwIr+Vuso/Gl/sOBzCiXsk1UsXYFKNoFMUzl+fb8Bsf5LOelr8VWBU9PGzi2IT 8oPSoM0Y2BWC8EQL6SsW7tva0xLMKNqnZyXHFn3mN9jtvnpchbYrPq6nS07CcXCXyotV ZE7DcCkNvPPt/I9jml5mXcd23NaY9Wz8c6swSRrfRcE/TM+snqPAJbid6JAB3nFZP0+V T2ZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:github-pr-num :references:in-reply-to:message-id:date:to:from:delivered-to :arc-authentication-results; bh=EuwkmpZuxt7nnZ3B7oFJbS0aTl6kqcExmtShInBv3e8=; b=kEvtQWJktX9H6WwnNsUWBYDWTH8evpH4iQ6p4bz7/JyJkR8HPU/ryq9QpypD6i2Xi3 2UdHnKA6xKa2IpaCdvZ8gRSr3NDKkIOnqenoDmJ82hPbr7VuiIRdo0RG9eSTdtY1Dfa+ UXJsLQThrFo8nfBb2sJ3BX659t9T7P4h3yAaJwxyryTvWzwLJrMchLB6Nv3qJhGBGILB cx8Yxwt+wOKmWhz6u7VEbDIQ9UcLwF2hBRKUPY6RQJ3pfotsT3y8SQivh7+I1eYroshI YqShgWSEUa2M719rNfOEdW/ir08PJirl1XfZzderqTzk0yXz+iz5riwCf0bTX5DyhBMC b87g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Return-Path: Received: from lists.linaro.org (ec2-54-197-127-237.compute-1.amazonaws.com. [54.197.127.237]) by mx.google.com with ESMTP id e133si10071960qkb.232.2017.12.02.17.02.46; Sat, 02 Dec 2017 17:02:46 -0800 (PST) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) client-ip=54.197.127.237; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Received: by lists.linaro.org (Postfix, from userid 109) id 2A0DE60985; Sun, 3 Dec 2017 01:02:46 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: X-Spam-Status: No, score=-5.4 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id AC67960791; Sun, 3 Dec 2017 01:01:25 +0000 (UTC) X-Original-To: lng-odp@lists.linaro.org Delivered-To: lng-odp@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 48B366094A; Sun, 3 Dec 2017 01:01:22 +0000 (UTC) Received: from forward106p.mail.yandex.net (forward106p.mail.yandex.net [77.88.28.109]) by lists.linaro.org (Postfix) with ESMTPS id 9BECA6079A for ; Sun, 3 Dec 2017 01:00:17 +0000 (UTC) Received: from mxback5o.mail.yandex.net (mxback5o.mail.yandex.net [IPv6:2a02:6b8:0:1a2d::1f]) by forward106p.mail.yandex.net (Yandex) with ESMTP id 110392D82FBF for ; Sun, 3 Dec 2017 04:00:16 +0300 (MSK) Received: from smtp3o.mail.yandex.net (smtp3o.mail.yandex.net [2a02:6b8:0:1a2d::27]) by mxback5o.mail.yandex.net (nwsmtp/Yandex) with ESMTP id QpSsgpDi1Z-09lGWXYm; Sun, 03 Dec 2017 04:00:10 +0300 Received: by smtp3o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id rRTmwan6So-09diH0dT; Sun, 03 Dec 2017 04:00:09 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client certificate not present) From: Github ODP bot To: lng-odp@lists.linaro.org Date: Sun, 3 Dec 2017 04:00:03 +0300 Message-Id: <1512262805-15125-5-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1512262805-15125-1-git-send-email-odpbot@yandex.ru> References: <1512262805-15125-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 321 Subject: [lng-odp] [PATCH v1 4/6] linux-gen: pktio: support using DPDK lt 17.08 X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "The OpenDataPlane \(ODP\) List" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" From: Dmitry Eremin-Solenikov Debian unstable ships with DPDK 16.11. Add support for building with this version. Signed-off-by: Dmitry Eremin-Solenikov --- /** Email created from pull request 321 (lumag:dpdk-system-master) ** https://github.com/Linaro/odp/pull/321 ** Patch: https://github.com/Linaro/odp/pull/321.patch ** Base sha: 5329e5211c447b9b823149baf76112eedfeb07fb ** Merge commit sha: 527862cca98549d4fc5bd0f966d3609477b20443 **/ platform/linux-generic/pktio/dpdk.c | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/platform/linux-generic/pktio/dpdk.c b/platform/linux-generic/pktio/dpdk.c index 07671e62f..fa73cb93d 100644 --- a/platform/linux-generic/pktio/dpdk.c +++ b/platform/linux-generic/pktio/dpdk.c @@ -29,14 +29,27 @@ #include #include +#if __GNUC__ >= 7 +#pragma GCC diagnostic push +#pragma GCC diagnostic warning "-Wimplicit-fallthrough=0" +#endif #include +#if __GNUC__ >= 7 +#pragma GCC diagnostic pop +#endif #include #include #include #include +#include #include #include #include +#include + +#if RTE_VERSION < RTE_VERSION_NUM(17, 8, 0, 0) +#define rte_log_set_global_level rte_set_log_level +#endif #if ODP_DPDK_ZERO_COPY ODP_STATIC_ASSERT(CONFIG_PACKET_HEADROOM == RTE_PKTMBUF_HEADROOM, @@ -54,6 +67,7 @@ static int disable_pktio; /** !0 this pktio disabled, 0 enabled */ /* Has dpdk_pktio_init() been called */ static odp_bool_t dpdk_initialized; +#ifndef RTE_BUILD_SHARED_LIB #define MEMPOOL_OPS(hdl) \ extern void mp_hdlr_init_##hdl(void) @@ -77,6 +91,7 @@ void refer_constructors(void) mp_hdlr_init_ops_sp_mc(); mp_hdlr_init_ops_stack(); } +#endif /** * Calculate valid cache size for DPDK packet pool @@ -928,6 +943,11 @@ static int dpdk_close(pktio_entry_t *pktio_entry) rte_pktmbuf_free(pkt_dpdk->rx_cache[i].s.pkt[idx++]); } +#if RTE_VERSION < RTE_VERSION_NUM(17, 8, 0, 0) + if (pktio_entry->s.state != PKTIO_STATE_OPENED) + rte_eth_dev_close(pkt_dpdk->port_id); +#endif + return 0; } @@ -1064,14 +1084,16 @@ static void dpdk_mempool_free(struct rte_mempool *mp, void *arg ODP_UNUSED) static int dpdk_pktio_term(void) { - uint8_t port_id; - if (!dpdk_initialized) return 0; +#if RTE_VERSION >= RTE_VERSION_NUM(17, 8, 0, 0) + uint8_t port_id; + RTE_ETH_FOREACH_DEV(port_id) { rte_eth_dev_close(port_id); } +#endif if (!ODP_DPDK_ZERO_COPY) rte_mempool_walk(dpdk_mempool_free, NULL); From patchwork Sun Dec 3 01:00:04 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Github ODP bot X-Patchwork-Id: 120434 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp2866022qgn; Sat, 2 Dec 2017 17:03:21 -0800 (PST) X-Google-Smtp-Source: AGs4zMYE0wWvXDYFud1TvzPJW0PkTfXsAvtJZbPo0Gs/4aUr+HHP23Fcqqeo5Q0rjs3qHFsE1/LQ X-Received: by 10.200.3.158 with SMTP id t30mr15244717qtg.149.1512263001539; Sat, 02 Dec 2017 17:03:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1512263001; cv=none; d=google.com; s=arc-20160816; b=EAKPjR0ULqKWyefgIhLp6bvvxl17JwDfG7A88JqklPgk6W97i5rtU+BI1bOcreljwS who9vWR7SWPRz1tUVvO3XCBZ/QBxRO7ekYQBzBcgmrkB6F191J5FV7JsHie5fAnV9JgD +UiHz6IhcWiN1Q3s8odTNmQtItRYbmiK5WJpeSJFepEubwc83tKPe6iPeC/xFP92PHmw +o0ILDhBe0sN/DZnO48+czGkeFMB+asFwDk5UogCwhCBhmIqfVAUUhFlm0Cz1GCXcJmN aPSUYVDxHQx0hxm26zkEWSF236byWK/xg7jhmXKh/GoW2fiZ1TOYmgCQrT16SzaXh8Vv qGxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject :content-transfer-encoding:mime-version:github-pr-num:references :in-reply-to:message-id:date:to:from:delivered-to :arc-authentication-results; bh=BgAhwmdyOSCP2oog4P0SKtiqMG2WB3vgz5eYFtPpC3w=; b=OC8mspdPJ8cNJ5lVkmbzyPoQPXBhBExUDB8c389WbWaDkiH5RHTuzbv+KbkSillvlB IhaFQj7193Qi4ZCTnWFW1w46ZPQ7MMQTscDwSTC8MDLU6wqurrxOt7uVQG/2qEIrO9J3 OI6qCVqPhO3kiyanI4jpGg/v1NGyVfl4qwNbTNEPUzei6Ldt8lV9OPVTHGdBQ4wSQmMV cRaBexW1vBg4mkNBob48P07AvLXznkkZqXFz9glOYEk2P0+2o1ibNAl09HAKMSjJfbpz w8vkWQaySSxTjN7LvGYN9lBkWSbEYJo5yBUu0s3+cNvBTCFc2pCCtXKgqM5yjnRSxv/C MF6w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Return-Path: Received: from lists.linaro.org (ec2-54-197-127-237.compute-1.amazonaws.com. [54.197.127.237]) by mx.google.com with ESMTP id f24si527221qtf.360.2017.12.02.17.03.21; Sat, 02 Dec 2017 17:03:21 -0800 (PST) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) client-ip=54.197.127.237; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Received: by lists.linaro.org (Postfix, from userid 109) id 454DB609C4; Sun, 3 Dec 2017 01:03:21 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id F1D426094A; Sun, 3 Dec 2017 01:01:28 +0000 (UTC) X-Original-To: lng-odp@lists.linaro.org Delivered-To: lng-odp@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id A035860805; Sun, 3 Dec 2017 01:01:23 +0000 (UTC) Received: from forward102p.mail.yandex.net (forward102p.mail.yandex.net [77.88.28.102]) by lists.linaro.org (Postfix) with ESMTPS id 3B47960631 for ; Sun, 3 Dec 2017 01:00:18 +0000 (UTC) Received: from mxback8j.mail.yandex.net (mxback8j.mail.yandex.net [IPv6:2a02:6b8:0:1619::111]) by forward102p.mail.yandex.net (Yandex) with ESMTP id 30A04430256D for ; Sun, 3 Dec 2017 04:00:17 +0300 (MSK) Received: from smtp3o.mail.yandex.net (smtp3o.mail.yandex.net [2a02:6b8:0:1a2d::27]) by mxback8j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id gGuS1OEOO6-0HFqY2Ex; Sun, 03 Dec 2017 04:00:17 +0300 Received: by smtp3o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id rRTmwan6So-0GdmtCKd; Sun, 03 Dec 2017 04:00:16 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client certificate not present) From: Github ODP bot To: lng-odp@lists.linaro.org Date: Sun, 3 Dec 2017 04:00:04 +0300 Message-Id: <1512262805-15125-6-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1512262805-15125-1-git-send-email-odpbot@yandex.ru> References: <1512262805-15125-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 321 MIME-Version: 1.0 Subject: [lng-odp] [PATCH v1 5/6] linux-gen: dpdk: cast addresses to unsigned long rather than uint64_t X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "The OpenDataPlane \(ODP\) List" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" From: Dmitry Eremin-Solenikov This is to remove the following error: pktio/dpdk.c: In function ‘mbuf_data_off’: pktio/dpdk.c:126:9: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast] return (uint64_t)pkt_hdr->buf_hdr.seg[0].data - ^ pktio/dpdk.c:127:4: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast] (uint64_t)mbuf->buf_addr; Signed-off-by: Dmitry Eremin-Solenikov --- /** Email created from pull request 321 (lumag:dpdk-system-master) ** https://github.com/Linaro/odp/pull/321 ** Patch: https://github.com/Linaro/odp/pull/321.patch ** Base sha: 5329e5211c447b9b823149baf76112eedfeb07fb ** Merge commit sha: 527862cca98549d4fc5bd0f966d3609477b20443 **/ platform/linux-generic/pktio/dpdk.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/platform/linux-generic/pktio/dpdk.c b/platform/linux-generic/pktio/dpdk.c index fa73cb93d..a3deea9fc 100644 --- a/platform/linux-generic/pktio/dpdk.c +++ b/platform/linux-generic/pktio/dpdk.c @@ -123,8 +123,8 @@ static unsigned cache_size(uint32_t num) static inline uint16_t mbuf_data_off(struct rte_mbuf *mbuf, odp_packet_hdr_t *pkt_hdr) { - return (uint64_t)pkt_hdr->buf_hdr.seg[0].data - - (uint64_t)mbuf->buf_addr; + return (unsigned long)pkt_hdr->buf_hdr.seg[0].data - + (unsigned long)mbuf->buf_addr; } /** From patchwork Sun Dec 3 01:00:05 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Github ODP bot X-Patchwork-Id: 120435 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp2866818qgn; Sat, 2 Dec 2017 17:04:28 -0800 (PST) X-Google-Smtp-Source: AGs4zMaNSFOooyChKBRa/ZzGYMqCvDztK7NllDyGHMkIs4R4qKaJugOcPc38ysPKoG/f6d9lpv2o X-Received: by 10.55.198.80 with SMTP id b77mr13674261qkj.138.1512263068166; Sat, 02 Dec 2017 17:04:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1512263068; cv=none; d=google.com; s=arc-20160816; b=LuprAhL0MbXpTQEnvUjzBWNvg0PZVdyQ4bQgU2fcJaLIXAXNJPiIWx29JC9UkMmAF6 jeY/q8lqGWRRUKIJacqgZMu0Tlg/wianiV+YfxsdgtguhfpIEm2t/lxYGjNYmqC8sP9V 7iQSSZUMOGq2GhqoZGKhwlWo3vznzuZQBeec7NmUNXkXStlH5I6T9NoiZbla6FvFb6sx +814/RRABZaK6/U0XFPMpDt1gBOIIZUnXTMVGLWayIXy0HHboij8Hh35D554c3iOw64r Ij9FmDAmUlYZM1cpYdOvggToaJ4MVd1TYd5X9xEj6qGeK1JQys9N3JyizLTA+MNr7RHJ r8Gw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:github-pr-num :references:in-reply-to:message-id:date:to:from:delivered-to :arc-authentication-results; bh=/x5CZ5aXiV6Lu9+cxtrzlWZxT9sfJ5RpaNDKtXtHW6I=; b=IhfR5Twsr3i+agGOWtUVEt84oYObFGdCaD3WfzPMamcPTWzD7hbyXKuWhatAinTJkQ HFB/ouARqxL1a5Cn3wmKNPQC1iZ482clm0Yrwlicf7qroQfHTA+Yb3YRUJfGWYXeBssv RyRXY0aRzYnVZUFOSxl1PBCUjLDpMn6nVkntQUXeWNtuD6+OuEcvvz3JuuIVUwEa0hlu ekwfHhrGNT4yDhLt1Boq9dZrb6q8kQHl4oVJxc7EU+FpIyi+JIapgciUZwrGTdj+CC33 mzU4jMK0yxemxaJgQeIuc6TzkwStmnhxMUaJjwaP/ja8vBtm0dJVtsp/64LA/YqPkIsa ro6g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Return-Path: Received: from lists.linaro.org (ec2-54-197-127-237.compute-1.amazonaws.com. [54.197.127.237]) by mx.google.com with ESMTP id t4si1573608qtc.194.2017.12.02.17.04.27; Sat, 02 Dec 2017 17:04:28 -0800 (PST) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) client-ip=54.197.127.237; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Received: by lists.linaro.org (Postfix, from userid 109) id D3D3E609CD; Sun, 3 Dec 2017 01:04:27 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id 64D3960804; Sun, 3 Dec 2017 01:01:37 +0000 (UTC) X-Original-To: lng-odp@lists.linaro.org Delivered-To: lng-odp@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 6EF22609DA; Sun, 3 Dec 2017 01:01:32 +0000 (UTC) Received: from forward105p.mail.yandex.net (forward105p.mail.yandex.net [77.88.28.108]) by lists.linaro.org (Postfix) with ESMTPS id 727DA607B3 for ; Sun, 3 Dec 2017 01:00:19 +0000 (UTC) Received: from mxback3g.mail.yandex.net (mxback3g.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b7:164]) by forward105p.mail.yandex.net (Yandex) with ESMTP id D82FE40838BB for ; Sun, 3 Dec 2017 04:00:17 +0300 (MSK) Received: from smtp3o.mail.yandex.net (smtp3o.mail.yandex.net [2a02:6b8:0:1a2d::27]) by mxback3g.mail.yandex.net (nwsmtp/Yandex) with ESMTP id K2sxSmjwM1-0HkSIX46; Sun, 03 Dec 2017 04:00:17 +0300 Received: by smtp3o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id rRTmwan6So-0HduAROG; Sun, 03 Dec 2017 04:00:17 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client certificate not present) From: Github ODP bot To: lng-odp@lists.linaro.org Date: Sun, 3 Dec 2017 04:00:05 +0300 Message-Id: <1512262805-15125-7-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1512262805-15125-1-git-send-email-odpbot@yandex.ru> References: <1512262805-15125-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 321 Subject: [lng-odp] [PATCH v1 6/6] travis: also use DPDK when doing cross-compile tests X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "The OpenDataPlane \(ODP\) List" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" From: Dmitry Eremin-Solenikov Signed-off-by: Dmitry Eremin-Solenikov --- /** Email created from pull request 321 (lumag:dpdk-system-master) ** https://github.com/Linaro/odp/pull/321 ** Patch: https://github.com/Linaro/odp/pull/321.patch ** Base sha: 5329e5211c447b9b823149baf76112eedfeb07fb ** Merge commit sha: 527862cca98549d4fc5bd0f966d3609477b20443 **/ .travis.yml | 50 ++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 42 insertions(+), 8 deletions(-) diff --git a/.travis.yml b/.travis.yml index b5c1b6417..dab868129 100644 --- a/.travis.yml +++ b/.travis.yml @@ -98,7 +98,8 @@ before_install: else sudo -E apt-get -y --no-install-suggests --no-install-recommends --force-yes install g++-"$CROSS_GNU_TYPE" ; fi ; - sudo -E apt-get -y --no-install-suggests --no-install-recommends --force-yes install libc6-dev:"$CROSS_ARCH" libssl-dev:"$CROSS_ARCH" zlib1g-dev:"$CROSS_ARCH" libconfig-dev:"$CROSS_ARCH" libstdc++-4.8-dev:"$CROSS_ARCH"; + sudo -E apt-get -y --no-install-suggests --no-install-recommends --force-yes install libc6-dev:"$CROSS_ARCH" libssl-dev:"$CROSS_ARCH" zlib1g-dev:"$CROSS_ARCH" libconfig-dev:"$CROSS_ARCH" libstdc++-4.8-dev:"$CROSS_ARCH" libpcap0.8-dev:"$CROSS_ARCH" ; + [ "$CROSS_ARCH" = "armhf" ] || sudo -E apt-get -y --no-install-suggests --no-install-recommends --force-yes install libnuma-dev:"$CROSS_ARCH"; export PKG_CONFIG_PATH=/usr/lib/${CROSS_MULTIARCH}/pkgconfig:/usr/${CROSS_MULTIARCH}/lib/pkgconfig ; fi - if [ "${CC#clang}" != "${CC}" ] ; @@ -106,16 +107,24 @@ before_install: if [ -n "$CROSS_ARCH" ] ; then export CC="${CC} --target=$CROSS_GNU_TYPE" ; + if [ "$CROSS_ARCH" = "i386" ] ; + then + DPDK_CFLAGS="-m32" ; + else + DPDK_CROSS="$CROSS_GNU_TYPE-" ; + fi fi ; export CXX="${CC/clang/clang++}"; elif [ "$CROSS_ARCH" = "i386" ] ; then export CC="gcc -m32" ; export CXX="g++ -m32" ; + DPDK_CFLAGS="-m32" ; elif [ -n "$CROSS_ARCH" ] ; then export CC="$CROSS_GNU_TYPE"-gcc ; export CXX="$CROSS_GNU_TYPE"-g++ ; + DPDK_CROSS="$CROSS_GNU_TYPE-" ; fi - if test ! -L /usr/lib/ccache/${CC%% *} ; then sudo ln -s -t /usr/lib/ccache/ `which ${CC%% *}` ; fi - ccache -s @@ -173,21 +182,48 @@ install: if [ "${CACHED_DPDK_VERS}" != "${DPDK_VERS}" ]; then rm -rf dpdk fi - - TARGET=${TARGET:-"x86_64-native-linuxapp-gcc"} - | - if [ -z "$CROSS_ARCH" -a ! -f "dpdk/${TARGET}/lib/libdpdk.a" ]; then + case "$CROSS_ARCH" in + "arm64") + TARGET="arm64-armv8a-linuxapp-gcc" + ;; + "armhf") + TARGET="arm-armv7a-linuxapp-gcc" + ;; + "i386") + TARGET="i686-native-linuxapp-gcc" + ;; + "") + TARGET="x86_64-native-linuxapp-gcc" + DPDK_MACHINE=snb + ;; + esac + - | + if [ -n "$TARGET" -a ! -f "dpdk/${TARGET}/lib/libdpdk.a" ]; then git -c advice.detachedHead=false clone -q --depth=1 --single-branch --branch=v${DPDK_VERS} http://dpdk.org/git/dpdk dpdk pushd dpdk git log --oneline --decorate + echo $CC + # AArch64 && ARMv7 fixup + sed -i -e 's/40900/40800/g' lib/librte_eal/common/include/arch/arm/rte_vect.h + sed -i -e 's/!(/!(defined(__arm__) \&\& defined(__clang__) || /g' lib/librte_eal/common/include/arch/arm/rte_byteorder.h + sed -i -e 's/__GNUC__/defined(__arm__) \&\& defined(__clang__) || __GNUC__/' lib/librte_eal/common/include/generic/rte_byteorder.h make config T=${TARGET} O=${TARGET} pushd ${TARGET} sed -ri 's,(CONFIG_RTE_LIBRTE_PMD_PCAP=).*,\1y,' .config cat .config |grep RTE_MACHINE - sed -ri 's,(CONFIG_RTE_MACHINE=).*,\1"snb",' .config + if test -n "${DPDK_MACHINE}" ; then + sed -ri 's,(CONFIG_RTE_MACHINE=).*,\1"'${DPDK_MACHINE}'",' .config + fi + if test -n "$CROSS_ARCH" ; then + sed -ri -e 's,(CONFIG_RTE_EAL_IGB_UIO=).*,\1n,' .config + sed -ri -e 's,(CONFIG_RTE_KNI_KMOD=).*,\1n,' .config + fi popd - make install T=${TARGET} EXTRA_CFLAGS="-fPIC" + make install T=${TARGET} EXTRA_CFLAGS="-fPIC $DPDK_CFLAGS" CROSS="$DPDK_CROSS" rm -r ./doc ./${TARGET}/app ./${TARGET}/build popd + EXTRA_CONF="$EXTRA_CONF --with-dpdk-path=`pwd`/dpdk/${TARGET}" fi # Netmap pktio @@ -201,12 +237,10 @@ install: popd fi sudo insmod ./netmap/LINUX/netmap.ko + EXTRA_CONF="$EXTRA_CONF --with-netmap-path=`pwd`/netmap" fi script: - - if [ -z "$CROSS_ARCH" ] ; then - EXTRA_CONF="--with-dpdk-path=`pwd`/dpdk/${TARGET} --with-netmap-path=`pwd`/netmap" ; - fi - ./bootstrap - ./configure --prefix=$HOME/odp-install --enable-user-guides