From patchwork Mon Dec 11 16: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: 121420 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp2972630qgn; Mon, 11 Dec 2017 08:02:26 -0800 (PST) X-Google-Smtp-Source: ACJfBoszgD7BgQLpq42a1G10sY4KIOV7lzzOJWqKivqJPHpRH5BIReTBfMkAdeJmae5a+mfVAm+V X-Received: by 10.55.41.206 with SMTP id p75mr1113031qkp.207.1513008146095; Mon, 11 Dec 2017 08:02:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1513008146; cv=none; d=google.com; s=arc-20160816; b=otEulCVwM1EwPJ5SJBX6Xx7W0eKw5hyROgHiYjW34//WzFYV579zIU/CqK2+qx54Fg XWodVn+O7Z1WEC6YdE6Xc3L3TAmX8C8MEY1sgj6/5OavaSyMSOuLtybIZT8/hOJOE+Gh qDYmOUO/AXuW3sTJa8b8ac9XFfVgvTa6A6HfBYroDP6h8LUeXPB83HyNlKfdCiU1A/jV 9YB7rYXs9TSYRhDXeDz3GTiuMNPtOmy35mKQGnB+JC5iBWNd1u9v1cfcx4fYHBVoyfgb rrKvqV2EyKqx737FZYLdp0WNTq31uO15sc6vXR7KLWuyITSqpGbMkiF2TB1P4dKF/VN8 fu8w== 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=5niJBGknCN95jW8cbwkIfPJXgRkP5cXYQMKFUc5NjoA=; b=qDOb68ErnFRq8nTXv4U77e3q/7p0dzG4lng1JELAOAO6qUyQXyX4kDU1hBDWkiuXcw EVJ4Na0tBJnwpgyB4JchCOWTV1Zn1dBJcFLAh7BDN2gb68njAxCyRC0P+dL+3DorOCxC VZdPFXoW3vvSi7qYtChNWChwLDTsqzwvH2Mz0q7AVz0nGKXsv84KPcFT8sHaTcPSQyBS hlR1hxkac2F/kUnXy/pw0KQkzkXbnxyWb1RX2kmfAf4+X5LxV7l5ot9VkmFwl2dihKJ3 WIQXAkZZL61ARvPeeDqM/DHHyKP2aIfRrbEv4w3PFb5ZcpRo9efz7Y8YVHcB9erAf6Lj XXIA== 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 t188si183849qkd.359.2017.12.11.08.02.13; Mon, 11 Dec 2017 08:02:26 -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 DCF8D608E8; Mon, 11 Dec 2017 16:02:12 +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,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 B3BB66093D; Mon, 11 Dec 2017 16:00:36 +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 C13D06095E; Mon, 11 Dec 2017 16:00:25 +0000 (UTC) Received: from forward104o.mail.yandex.net (forward104o.mail.yandex.net [37.140.190.179]) by lists.linaro.org (Postfix) with ESMTPS id D74C6608FC for ; Mon, 11 Dec 2017 16:00:15 +0000 (UTC) Received: from mxback12j.mail.yandex.net (mxback12j.mail.yandex.net [IPv6:2a02:6b8:0:1619::87]) by forward104o.mail.yandex.net (Yandex) with ESMTP id 24AC9702BFB for ; Mon, 11 Dec 2017 19:00:14 +0300 (MSK) Received: from smtp1p.mail.yandex.net (smtp1p.mail.yandex.net [2a02:6b8:0:1472:2741:0:8b6:6]) by mxback12j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id GoXsUe7Lo4-0EBem3Av; Mon, 11 Dec 2017 19:00:14 +0300 Received: by smtp1p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id BifhbGdIDb-0DTmgsnY; Mon, 11 Dec 2017 19:00:13 +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: Mon, 11 Dec 2017 19:00:00 +0300 Message-Id: <1513008012-9231-3-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1513008012-9231-1-git-send-email-odpbot@yandex.ru> References: <1513008012-9231-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 335 Subject: [lng-odp] [PATCH API-NEXT v1 2/14] travis: disable ccache for codecov 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: Maxim Uvarov Log says: odp_pktio_perf.gcno:cannot open notes file Reason is codecov does not see any generated files which were not complied due to ccache. Disabling ccache makes it work. Signed-off-by: Maxim Uvarov Reviewed-by: Bill Fischofer --- /** Email created from pull request 335 (muvarov:devel/api-next_master_merge) ** https://github.com/Linaro/odp/pull/335 ** Patch: https://github.com/Linaro/odp/pull/335.patch ** Base sha: 630d8422564ebf4991b468cb38a29e9483fc2ec2 ** Merge commit sha: 2de2af9eca01b713e51c66fee7a5c7e535502f85 **/ .travis.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 976f07639..1340ef279 100644 --- a/.travis.yml +++ b/.travis.yml @@ -35,7 +35,7 @@ env: # By default Linaro CODECOV_TOKEN token is used. It's ok to use it to see # for individual commit validation. But you you want to track tests history # you need generated new one at https://codecov.io specific for your repo. - - CODECOV_TOKEN=8e1c0fd8-62ff-411e-a79f-5839f6662c11 + - CODECOV_TOKEN=a733c34c-5f5c-4ff1-af4b-e9f5edb1ab5e addons: apt: @@ -245,12 +245,11 @@ jobs: - ./configure --prefix=$HOME/odp-install --enable-user-guides --with-dpdk-path=`pwd`/dpdk/${TARGET} - --with-netmap-path=`pwd`/netmap CFLAGS="-O0 - -coverage" + --with-netmap-path=`pwd`/netmap CFLAGS="-O0 -coverage" CXXFLAGS="-O0 -coverage" LDFLAGS="--coverage" --enable-debug=full --enable-helper-linux - - sudo LD_LIBRARY_PATH="$HOME/cunit-install/$CROSS_ARCH/lib:$LD_LIBRARY_PATH" PATH=${PATH//:\.\/node_modules\/\.bin/} make check + - sudo CCACHE_DISABLE=1 LD_LIBRARY_PATH="$HOME/cunit-install/$CROSS_ARCH/lib:$LD_LIBRARY_PATH" PATH=${PATH//:\.\/node_modules\/\.bin/} make check - find . -type f -iname '*.[ch]' -not -path ".git/*" -execdir gcov {} \; ; bash <(curl -s https://codecov.io/bash) -X coveragepy - stage: test env: TEST=distcheck From patchwork Mon Dec 11 16: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: 121419 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp2971520qgn; Mon, 11 Dec 2017 08:01:43 -0800 (PST) X-Google-Smtp-Source: ACJfBotkdgmwzzU87XHWxvoPd2VMbEL/CatZtaWmis2Kok3H4ZiMnjBhg+tk30jVfx5ANtDf3Kaq X-Received: by 10.37.189.5 with SMTP id f5mr701459ybk.30.1513008103532; Mon, 11 Dec 2017 08:01:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1513008103; cv=none; d=google.com; s=arc-20160816; b=P9jFjM01PKLLfi3dODXuPjL2DYWrTyg1m6l6X/fkc9Y+HkBryrtTpaNTYHrViKOIu4 K5Ko66DCc7rJT527kY6glvwUHHeVmhKRJeVcB8ESx2sUWbJrRKeLh6J1fmnZu/X/i9Dl lmtt5UxXm3ZMJ8axbIB++IFVDKjD9oFLXvu27M2nss1b2E2mcZrYDs2r4hRUWNc9dvU7 hgqO3xiGmxUZFXSr8UeAdGrlJVX++XxhEsge2B9V26qH3NPTgCI6vz2xgx9wN+FayivU AHzmTq/vt5z5Wg50ltkXmuCER7uqLEYR0r+j3NEu1wmOfvtvKREdpVZcMZMW5V+wK6ih IKoA== 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=Z63Poe72ZFKA1Hl4T0UScC37rCnnBbe6l6+9hjuHR+A=; b=md/oFIA9DgzgxXGp3a69qcQGHT1uXwZYFzqKvOV3klxCYrRw8RBvLFLq9B+FX7l2po vz8OKLNXwO8UlXDHsDV7DXPNUjQ6YUbH+ICIjiey72SskK1L7eC9Fj0nvbUeMQhkjEKf LV7TgNkoq5b4XcKO8OwZxXxtOv0XEDdsedzJRVVgn5zSM5O1T7vMO/AEl8fKF0GcjaX9 7BcvNkCMmhlqoDUhTbrqDXCDC2yv2wvcQMCrsnL3Izi00/f+FSzlXzOclXFh2KWlZpRM 2Hk8apa/yHOns4bMs0EehXvK2Cgay+iHiQdLrQsoJdbQC2zCbVR6N/+/nymHKv6EBGGX 2YUQ== 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 e187si4442106qkd.238.2017.12.11.08.01.32; Mon, 11 Dec 2017 08:01:43 -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 05711609C2; Mon, 11 Dec 2017 16:01:32 +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 74E2F6092E; Mon, 11 Dec 2017 16:00:32 +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 66580608FF; Mon, 11 Dec 2017 16:00:23 +0000 (UTC) Received: from forward100o.mail.yandex.net (forward100o.mail.yandex.net [37.140.190.180]) by lists.linaro.org (Postfix) with ESMTPS id 545DA608FF for ; Mon, 11 Dec 2017 16:00:16 +0000 (UTC) Received: from mxback2g.mail.yandex.net (mxback2g.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b7:163]) by forward100o.mail.yandex.net (Yandex) with ESMTP id DA7F32A23179 for ; Mon, 11 Dec 2017 19:00:14 +0300 (MSK) Received: from smtp1p.mail.yandex.net (smtp1p.mail.yandex.net [2a02:6b8:0:1472:2741:0:8b6:6]) by mxback2g.mail.yandex.net (nwsmtp/Yandex) with ESMTP id DAhCrOSdBb-0ENOc360; Mon, 11 Dec 2017 19:00:14 +0300 Received: by smtp1p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id BifhbGdIDb-0ETqJcx4; Mon, 11 Dec 2017 19:00:14 +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: Mon, 11 Dec 2017 19:00:01 +0300 Message-Id: <1513008012-9231-4-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1513008012-9231-1-git-send-email-odpbot@yandex.ru> References: <1513008012-9231-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 335 Subject: [lng-odp] [PATCH API-NEXT v1 3/14] gitignore add gcov files 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: Maxim Uvarov Signed-off-by: Maxim Uvarov Reviewed-by: Bill Fischofer --- /** Email created from pull request 335 (muvarov:devel/api-next_master_merge) ** https://github.com/Linaro/odp/pull/335 ** Patch: https://github.com/Linaro/odp/pull/335.patch ** Base sha: 630d8422564ebf4991b468cb38a29e9483fc2ec2 ** Merge commit sha: 2de2af9eca01b713e51c66fee7a5c7e535502f85 **/ .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index b9c61424a..93ab63a31 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ *.d *.gcda *.gcno +*.gcov *.la *.lo *.o From patchwork Mon Dec 11 16: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: 121421 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp2973478qgn; Mon, 11 Dec 2017 08:03:02 -0800 (PST) X-Google-Smtp-Source: ACJfBovVegxrVjaaTiH4IsDhnHBxQ4JNDZOp4qvDrEm6CDIoCDQGOXytk8zEKjED/Ptwpv2YXrd3 X-Received: by 10.129.99.4 with SMTP id x4mr650740ywb.225.1513008182375; Mon, 11 Dec 2017 08:03:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1513008182; cv=none; d=google.com; s=arc-20160816; b=YdmBRkVJcbkdT51rPeKzm3fAGqc2GNEmqX/kB+4Yzb+Wtp+S0KAijPI5nzYI2quAaI K4Zr0u00wgFNxfczVCo2uqFtYXdxQtUcjH/DQBmr9rU2icSurFsic9Cs05UZmvzFjBnQ qWeViVgRVUaxANt/rUiNLuFpfEcYsjgM0EQr5zqmTK93RdbbtsFTZ9Vwx8bunKJ0st05 1BBJ4ihA7E3T7K+nvkzXwuMWg8kHBD5RjvA6YzbsO3du9QM0jsGoamhho5ZhcuH5vDCe TXmCM7Yu5pSENGLM8ghAN27xdOj4J4wYi1A427xAwPnuj0ffWm3QPvfpJS9JkJpjSwPC i7Zw== 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=dsFFJLeBm1LcelsLWbNvSTjJ2tSSJGe9fUSfeAXFzvo=; b=XMEKIR8Yj08sUj4c5+y6pMI3zgpDqY+7Ao0ieRiEFwKhDrex956Np9FXYbHgDm730z sIuJsPtbJ3k4HAv5yIpAUK8WLRtIQkbB2tFTJpzUX3MIMkQVzfiBbfbQMfTc5c4ZvPPr V99q1dDBNVWy6WPeImHpkM+nJdbp28oMbMPPBvPng1EuyOs3T182b7Soiy3VgdrM3DJs Y7Y/z6Sxtjhjw1JD/jqS0J6zLgVo13vRHtNvkSm9PaNOtLwpPfF3ypPpbeyrqB5pYBkM dfFQWFw+LmH6f1sWZkXOmWYbP3OYQnXDgfiSfx3H6HplkATlBA2VYUJKtGYUxBk8NVNo qRxw== 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 a20si884573qtk.136.2017.12.11.08.03.01; Mon, 11 Dec 2017 08:03:02 -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 91AE760955; Mon, 11 Dec 2017 16:03:01 +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 31BDB60387; Mon, 11 Dec 2017 16:00:42 +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 67DA4608FF; Mon, 11 Dec 2017 16:00:27 +0000 (UTC) Received: from forward100o.mail.yandex.net (forward100o.mail.yandex.net [37.140.190.180]) by lists.linaro.org (Postfix) with ESMTPS id 85E7760902 for ; Mon, 11 Dec 2017 16:00:16 +0000 (UTC) Received: from mxback14j.mail.yandex.net (mxback14j.mail.yandex.net [IPv6:2a02:6b8:0:1619::90]) by forward100o.mail.yandex.net (Yandex) with ESMTP id 7E3112A23141 for ; Mon, 11 Dec 2017 19:00:15 +0300 (MSK) Received: from smtp1p.mail.yandex.net (smtp1p.mail.yandex.net [2a02:6b8:0:1472:2741:0:8b6:6]) by mxback14j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id dpdMehc1L6-0FISm81n; Mon, 11 Dec 2017 19:00:15 +0300 Received: by smtp1p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id BifhbGdIDb-0ETis7nl; Mon, 11 Dec 2017 19:00:14 +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: Mon, 11 Dec 2017 19:00:02 +0300 Message-Id: <1513008012-9231-5-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1513008012-9231-1-git-send-email-odpbot@yandex.ru> References: <1513008012-9231-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 335 Subject: [lng-odp] [PATCH API-NEXT v1 4/14] Revert "travis: temporary turn off dpdk caching" 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: Maxim Uvarov This reverts: commit 73bc46197ec0 ("travis: temporary turn off dpdk caching") Looks like dpdk build is stable now and we can turn on caching for dpdk. Signed-off-by: Maxim Uvarov Reviewed-by: Bill Fischofer --- /** Email created from pull request 335 (muvarov:devel/api-next_master_merge) ** https://github.com/Linaro/odp/pull/335 ** Patch: https://github.com/Linaro/odp/pull/335.patch ** Base sha: 630d8422564ebf4991b468cb38a29e9483fc2ec2 ** Merge commit sha: 2de2af9eca01b713e51c66fee7a5c7e535502f85 **/ .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 1340ef279..a30326724 100644 --- a/.travis.yml +++ b/.travis.yml @@ -61,7 +61,7 @@ cache: ccache: true pip: true directories: - #- dpdk + - dpdk - netmap - $HOME/cunit-install - $HOME/doxygen-install From patchwork Mon Dec 11 16: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: 121422 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp2974475qgn; Mon, 11 Dec 2017 08:03:45 -0800 (PST) X-Google-Smtp-Source: ACJfBos+VcBmeDMCd7NYdUoIp0fLwukUcNykVRNMRr3mnXmc5j7HWu/OymN/NnGOXlsnZnIw+xZI X-Received: by 10.200.36.134 with SMTP id s6mr1195676qts.276.1513008225640; Mon, 11 Dec 2017 08:03:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1513008225; cv=none; d=google.com; s=arc-20160816; b=I0XwVbv1KWEOaoDffK7SY9PEMjd27koFqZ5VqP1VO2YuFWBdpp8nDcz8xavMFr74sS J6IEmmjAE4msgjfaREB1T0+xIywvyCWcgxHVsguPpohUzO0Biv8hOtmYL81937LQiKYx XOUwbDH99clA8jv+zZY4Tkt9hW9sfhvM4RPS0+KVbOp031dQG7U22v553AYa6bma1on1 qxW9QygoDqS91MpkF79if/jYinaL+D6v1+IrgQZ8EfSSnRKdQBPU44GowghoS7Uk0EFt mG8MbZAYgsXVRVS3I3Vn4YeBa2ISF+tAIk32sWrRldQBn4TbYG0SPlTHLxVupMZaWqeE /aow== 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=NUYFO65INc5Pu9OCr4wAAcy2r04+npqDWpV4qDxOQmU=; b=mjKDgd3KoMBlYChle4f4VSkKkvVGSXAGfbfF6bqtPFcFoT+6Y8p5EFTCJNjG1DW8Rr kwzEg/u7Q0ipYjs1pC0NSJxLIQBFyOZ7mmzPAFn993wM6v3Yva4kT/GZU5Q2SQ9EKbXh o68TUZq8Vta6MUjZEe6VetYlhnTMGCgFwf718rNeWHN8wzBJalobNzN1XYHqNxZ/WGP+ ej9S0+45egJP7pEDs7YRu8NRH6UW1uqBTvm2ZxyisOQYxv29BMSOzloZjC2GGrg4cte6 uQcvO8QUS1abOX+Q0TijdRNkzxPj21WP1dBR7lhZ+4knVw3QvbX0M9g6og359TfT7yqQ QRhw== 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 a39si3695564qtc.268.2017.12.11.08.03.45; Mon, 11 Dec 2017 08:03:45 -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 440A3608DC; Mon, 11 Dec 2017 16:03:45 +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 636A160965; Mon, 11 Dec 2017 16:00:46 +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 8373760902; Mon, 11 Dec 2017 16:00:27 +0000 (UTC) Received: from forward102p.mail.yandex.net (forward102p.mail.yandex.net [77.88.28.102]) by lists.linaro.org (Postfix) with ESMTPS id D53316092E for ; Mon, 11 Dec 2017 16:00:17 +0000 (UTC) Received: from mxback7g.mail.yandex.net (mxback7g.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b7:168]) by forward102p.mail.yandex.net (Yandex) with ESMTP id 02EE94303E55 for ; Mon, 11 Dec 2017 19:00:16 +0300 (MSK) Received: from smtp1p.mail.yandex.net (smtp1p.mail.yandex.net [2a02:6b8:0:1472:2741:0:8b6:6]) by mxback7g.mail.yandex.net (nwsmtp/Yandex) with ESMTP id Yt90FLBlgb-0F08KRb2; Mon, 11 Dec 2017 19:00:15 +0300 Received: by smtp1p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id BifhbGdIDb-0FTKgqjt; Mon, 11 Dec 2017 19:00:15 +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: Mon, 11 Dec 2017 19:00:03 +0300 Message-Id: <1513008012-9231-6-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1513008012-9231-1-git-send-email-odpbot@yandex.ru> References: <1513008012-9231-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 335 Subject: [lng-odp] [PATCH API-NEXT v1 5/14] 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 Separate DPDK macros to top-level file so that they can be reused by other implementations (like ODP-DPDK). Signed-off-by: Dmitry Eremin-Solenikov Reviewed-and-tested-by: Matias Elo --- /** Email created from pull request 335 (muvarov:devel/api-next_master_merge) ** https://github.com/Linaro/odp/pull/335 ** Patch: https://github.com/Linaro/odp/pull/335.patch ** Base sha: 630d8422564ebf4991b468cb38a29e9483fc2ec2 ** Merge commit sha: 2de2af9eca01b713e51c66fee7a5c7e535502f85 **/ 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 Mon Dec 11 16:00:04 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: 121423 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp2975879qgn; Mon, 11 Dec 2017 08:04:50 -0800 (PST) X-Google-Smtp-Source: ACJfBouF79UAHtqJwdPsqBkvassWmHy6XQXfGrKW/kWK3SiqMd+HkyfITYz31sLxuzENYn3Pzbiz X-Received: by 10.157.61.201 with SMTP id l67mr731391otc.384.1513008290561; Mon, 11 Dec 2017 08:04:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1513008290; cv=none; d=google.com; s=arc-20160816; b=I+d2mSgNDkLRk2MiJE2vQHd+cdHuaEqvyVm4iUCf/pNJcvhRYHx/4vU3lFoP3R7sMx FwgeTVpAdBDlXQFWsYKfRK3i8F9QugE8Cu3IrZdR2qL0QuqXZJAz/u4/iY+hu82XgfRG ZYQty01j5HfqgSuCY6hNqEbFyE+HhW1rmfLfrOIuQxqcRrIj18ZpcJuNZetuC2F3/iRP ZeyFHviP1FsIf+SYAkk87+mSBbOKZOEkH4Phw90KwdBUu1qWRCxTuOKKMZqZiJXqYWpI CHaMWfPK+RO4w5s84ASVls/VdFb/yPRsoo/+H/fvIw2C6BPbr8hpdDnEXTX/YtSvg7v3 7e+Q== 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=KI0bxwZ1HHPe7Dxey1Q1oXhGM4PVj0OD8rJBfifWuUA=; b=zo5Rhl5b0jJHDtoo+yuj3kbfCMRy0N8Cn4FJiJo/RTGsgUOr8bqKyqKJh/bbCoyhnG AHj/2mS4ZfxMgLu5UTKeaBw8nqB+LWbEhyN8/8mn16jl0kcOHePm+bPab4TaFhVoJADO Nq+RAaXJCWAQ/lA30f5pl/qNRKxwkyXTYOuecKCIDV9K038nlyqVGQgWCNwnPw3dzudg +hkBXkqI1aPuXc7nISnmg8VCQkRKszBcPSlrg719jjMb4a4J4iWP5onLMzojfn7Z4s4e L70bIfCsWvEi0jeHb6T1rUvzOTKX2tVfMOLSAfE0H454cHu2fgqC+UN7eTWlGtlxMGwN 8evQ== 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 a2si2567784ite.44.2017.12.11.08.04.50; Mon, 11 Dec 2017 08:04:50 -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 0BB3B60954; Mon, 11 Dec 2017 16:04:50 +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 AF5CD608FC; Mon, 11 Dec 2017 16:00:52 +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 37A9F608FF; Mon, 11 Dec 2017 16:00:28 +0000 (UTC) Received: from forward100o.mail.yandex.net (forward100o.mail.yandex.net [37.140.190.180]) by lists.linaro.org (Postfix) with ESMTPS id 910D66092C for ; Mon, 11 Dec 2017 16:00:17 +0000 (UTC) Received: from mxback4j.mail.yandex.net (mxback4j.mail.yandex.net [IPv6:2a02:6b8:0:1619::10d]) by forward100o.mail.yandex.net (Yandex) with ESMTP id 759B52A2317E for ; Mon, 11 Dec 2017 19:00:16 +0300 (MSK) Received: from smtp1p.mail.yandex.net (smtp1p.mail.yandex.net [2a02:6b8:0:1472:2741:0:8b6:6]) by mxback4j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id z7nHSwPirD-0Gn4UH1Z; Mon, 11 Dec 2017 19:00:16 +0300 Received: by smtp1p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id BifhbGdIDb-0GTWmh7S; Mon, 11 Dec 2017 19: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: Mon, 11 Dec 2017 19:00:04 +0300 Message-Id: <1513008012-9231-7-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1513008012-9231-1-git-send-email-odpbot@yandex.ru> References: <1513008012-9231-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 335 Subject: [lng-odp] [PATCH API-NEXT v1 6/14] 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 Flag -msse4.2 should be used only for i?86/x86_64 targets, it does not make sense for any other target. Signed-off-by: Dmitry Eremin-Solenikov Reviewed-and-tested-by: Matias Elo --- /** Email created from pull request 335 (muvarov:devel/api-next_master_merge) ** https://github.com/Linaro/odp/pull/335 ** Patch: https://github.com/Linaro/odp/pull/335.patch ** Base sha: 630d8422564ebf4991b468cb38a29e9483fc2ec2 ** Merge commit sha: 2de2af9eca01b713e51c66fee7a5c7e535502f85 **/ platform/linux-generic/Makefile.am | 6 ++++++ platform/linux-generic/m4/odp_dpdk.m4 | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) 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 ba0fdc935..91f76e2de 100644 --- a/platform/linux-generic/m4/odp_dpdk.m4 +++ b/platform/linux-generic/m4/odp_dpdk.m4 @@ -5,7 +5,7 @@ pktio_dpdk_support=no AC_ARG_WITH([dpdk-path], [AS_HELP_STRING([--with-dpdk-path=DIR], [path to dpdk build directory])], [DPDK_PATH="$withval" - DPDK_CPPFLAGS="-msse4.2 -isystem $DPDK_PATH/include" + DPDK_CPPFLAGS="-isystem $DPDK_PATH/include" DPDK_LDFLAGS="-L$DPDK_PATH/lib" pktio_dpdk_support=yes],[]) From patchwork Mon Dec 11 16: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: 121426 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp2979648qgn; Mon, 11 Dec 2017 08:07:41 -0800 (PST) X-Google-Smtp-Source: ACJfBovvE6Ud+CaatsymeDB5Z08GPZsgZYALNVVfRGEwG56gXyTBZ7wEbS/nAj0qidhoViw7rBOw X-Received: by 10.200.24.25 with SMTP id q25mr1211754qtj.266.1513008461852; Mon, 11 Dec 2017 08:07:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1513008461; cv=none; d=google.com; s=arc-20160816; b=LHqopX7oxLZ/ZAXHyFbdS7BJnp1vdvFybiSpdrzShMJ48R8B1LhG0+zjt0p2mkIP5Z kUx9lZRD1Bea6RzyXTd2rNLM3BwuHysO+1u1eAFyJZglQGZx3lZBqweX3VaUGgQEL4U8 ubFCsayY4lFobEK1iC6w9DRKlCa+1XNvP5IEwLUaDJRithys9akP0Av7z9HfAzdR+nzN QdPRhclFMcuAsiqTRKPPywOr63Dj0eQnlkyU7bx0vp5GVXwpil/k01ViHyQCv0u5PUrH i5uVDYZh6k7l3fgqjel9PqL00tXKSZlT31ZwExmo6k91LEDZbL2PS5k+Tk8+l207MG1g xPFQ== 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=LfvJ9Yb3UvR3ygy77fKLNvDedBgPvPbj3uiCfsRDdqs=; b=ocSnSSHS0tIRoQnSZu1qV1MlJtTrJ7DHKMOddjrDjcUw3dAiT3pRZ5NISzrfQqMEl9 fVKPMQOEOps1+Sz1asbGv3LHoiWQF/H+ZkouL3HzlwQzcfGjMpwd3BlgKZU1ajPf1Tnr 2LJxe1eujUF5c2zA4mZgJVziWhHIlW3ReYCwYiM9hGXoIabOo+5s4DC5eon9Cj5ShRT7 LjR58wdocYMOZm39K+zuwCcZP4Ugs5ARhKXIEDoki74NVI7y6Jw9MOOUl4Tgqlxnf+bA KeYbBBk3dh19Q0Mt+NAcshVvqExy6qQ65zd5vjW5CsjOsJObbXxdIaKQOuU6CsZySGZA eZIw== 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 b145si2698340qkg.444.2017.12.11.08.07.41; Mon, 11 Dec 2017 08:07:41 -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 7D19F6096D; Mon, 11 Dec 2017 16:07:41 +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,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 CA6236098B; Mon, 11 Dec 2017 16:01:08 +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 E991C60953; Mon, 11 Dec 2017 16:00:35 +0000 (UTC) Received: from forward104o.mail.yandex.net (forward104o.mail.yandex.net [37.140.190.179]) by lists.linaro.org (Postfix) with ESMTPS id 144576093D for ; Mon, 11 Dec 2017 16:00:18 +0000 (UTC) Received: from mxback19j.mail.yandex.net (mxback19j.mail.yandex.net [IPv6:2a02:6b8:0:1619::95]) by forward104o.mail.yandex.net (Yandex) with ESMTP id 08291703E4D for ; Mon, 11 Dec 2017 19:00:17 +0300 (MSK) Received: from smtp1p.mail.yandex.net (smtp1p.mail.yandex.net [2a02:6b8:0:1472:2741:0:8b6:6]) by mxback19j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id UJhZIxGfrQ-0G1Khubo; Mon, 11 Dec 2017 19:00:16 +0300 Received: by smtp1p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id BifhbGdIDb-0GTKNBOF; Mon, 11 Dec 2017 19: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: Mon, 11 Dec 2017 19:00:05 +0300 Message-Id: <1513008012-9231-8-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1513008012-9231-1-git-send-email-odpbot@yandex.ru> References: <1513008012-9231-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 335 Subject: [lng-odp] [PATCH API-NEXT v1 7/14] 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 Support using distro-installed DPDK for Pkt I/O. Distributions (like Ubuntu, Debian, etc) start providing DPDK packages. It is wise to enable users to use distro-provided DPDK version rather than requiring to always compile it from sources. Signed-off-by: Dmitry Eremin-Solenikov Reviewed-and-tested-by: Matias Elo --- /** Email created from pull request 335 (muvarov:devel/api-next_master_merge) ** https://github.com/Linaro/odp/pull/335 ** Patch: https://github.com/Linaro/odp/pull/335.patch ** Base sha: 630d8422564ebf4991b468cb38a29e9483fc2ec2 ** Merge commit sha: 2de2af9eca01b713e51c66fee7a5c7e535502f85 **/ m4/odp_dpdk.m4 | 43 ++++++++++++++++++++++++++++------- platform/linux-generic/m4/odp_dpdk.m4 | 28 +++++++++++++++++++---- 2 files changed, 58 insertions(+), 13 deletions(-) diff --git a/m4/odp_dpdk.m4 b/m4/odp_dpdk.m4 index 636170a7f..05e60cc06 100644 --- a/m4/odp_dpdk.m4 +++ b/m4/odp_dpdk.m4 @@ -16,6 +16,31 @@ AS_VAR_APPEND([DPDK_PMDS], [--no-whole-archive]) AC_SUBST([DPDK_PMDS]) ]) +# _ODP_DPDK_CHECK_LIB(LDFLAGS, [LIBS], [EXTRA_LIBS]) +# ---------------------------------- +# Check if one can use -ldpdk with provided set of libs +AC_DEFUN([_ODP_DPDK_CHECK_LIB], [dnl +########################################################################## +# Save and set temporary compilation flags +########################################################################## +OLD_LDFLAGS=$LDFLAGS +OLD_LIBS=$LIBS +LDFLAGS="$1 $LDFLAGS" +LIBS="$LIBS -ldpdk $2" + +AC_MSG_CHECKING([for rte_eal_init in -ldpdk $2]) +AC_LINK_IFELSE([AC_LANG_CALL([], [rte_eal_init])], + [AC_MSG_RESULT([yes]) + DPDK_LIBS="$1 -ldpdk $3 $2"], + [AC_MSG_RESULT([no])]) + +########################################################################## +# Restore old saved variables +########################################################################## +LDFLAGS=$OLD_LDFLAGS +LIBS=$OLD_LIBS +]) + # ODP_DPDK_CHECK(CPPFLAGS, LDFLAGS, ACTION-IF-FOUND, ACTION-IF-NOT-FOUND) # ----------------------------------------------------------------------- # Check for DPDK availability @@ -23,10 +48,7 @@ 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 @@ -34,16 +56,21 @@ 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="" +_ODP_DPDK_CHECK_LIB([$2]) +AS_IF([test "x$DPDK_LIBS" = "x"], + [_ODP_DPDK_CHECK_LIB([$2], [-ldl -lpthread], [-lm])]) +AS_IF([test "x$DPDK_LIBS" = "x"], + [_ODP_DPDK_CHECK_LIB([$2], [-ldl -lpthread -lnuma], [-lm])]) +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], [:])]) ########################################################################## # 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 91f76e2de..471bbcd51 100644 --- a/platform/linux-generic/m4/odp_dpdk.m4 +++ b/platform/linux-generic/m4/odp_dpdk.m4 @@ -2,12 +2,27 @@ # Enable DPDK support ########################################################################## pktio_dpdk_support=no + +AC_ARG_ENABLE([dpdk], + [AS_HELP_STRING([--enable-dpdk], [enable DPDK support for Packet I/O])], + [pktio_dpdk_support=$enableval + DPDK_PATH=system]) + AC_ARG_WITH([dpdk-path], [AS_HELP_STRING([--with-dpdk-path=DIR], [path to dpdk build directory])], [DPDK_PATH="$withval" - DPDK_CPPFLAGS="-isystem $DPDK_PATH/include" - DPDK_LDFLAGS="-L$DPDK_PATH/lib" - pktio_dpdk_support=yes],[]) + pktio_dpdk_support=yes],[]) + +AS_IF([test "x$DPDK_PATH" = "xsystem"], + [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"`" + AS_IF([test "x$DPDK_PMD_PATH" = "x"], + [AC_MSG_FAILURE([Could not locate system DPDK PMD directory])])], + [DPDK_CPPFLAGS="-isystem $DPDK_PATH/include" + DPDK_LDFLAGS="-L$DPDK_PATH/lib" + DPDK_PMD_PATH="$DPDK_PATH/lib"]) ########################################################################## # Enable zero-copy DPDK pktio @@ -30,14 +45,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 Mon Dec 11 16:00:06 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: 121425 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp2978479qgn; Mon, 11 Dec 2017 08:06:45 -0800 (PST) X-Google-Smtp-Source: ACJfBosNLE46LvnnyzON01uxfYzHL22RRY2w480HVK4XgtBg1BY1oGRnzjRaDfBJgZsFli9GGlZb X-Received: by 10.55.91.70 with SMTP id p67mr1275453qkb.74.1513008405819; Mon, 11 Dec 2017 08:06:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1513008405; cv=none; d=google.com; s=arc-20160816; b=VzYIsavRUHEFmkjOvMMObm2yYtWBTX6ymOHrWwQsSXyhqopNAgo2NzXcJYhTUaiwUa XFMMo2RMmBH6Dp1l2ye18CIy+sN19zhVSRK1PBulgyF+oVXmkdg7QjMNgPBELWO8IAEw KVZ5lye5lwzAjrs2X9V2llwyEIuIhYV+LfwR8hfJPtq/VyvevlZwOK03NZaa2iOd+XDf M1XJx8O7CxhrbU6FLUwJNZyuEif3aDjjM8PeFJ00mA9RJlWnq6TKynbYvUzxiWMQtDO+ hq/+AOQWWeDKUTcOlYeOjx6P9GjYMuc4OjknTHHu50z6ZNvlvDEG6irC3wqMCwPTM1wL d2Xw== 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=phomNCLpyS/LQqkpzsO1+gZjZNA2E8pO3UG3Gh+wJcw=; b=GLVfttF6WDeUTGjeW6xwGMdSBwtfPGMzvrc69XWFekluyJ2znAPwHyChH/z+Qcdb5Z pEhBnJh1VWbrq/5z17pslsGmFHUHw83sHxm5+epgTRA1c2gk4x/hGAFHBL2mV5Y9Qd1C fSFIryYnoBMPTvXofAVMSVDzszCie6FXtxT3i4W3tsZcZkz1XCK7mcijDVv3NpccYOnI ZyJ/OLLf8/m4yD+qBHcpZdmVtGOD41pUK8+/6NUVbVIFow8JitcvgGPeNJTjoSDg50uq yiqk+pe4OEy01R3fW/ck1bcKNkbXUq74PL0RR8a4MJc0Kzu6kxCkZiN3yEXyQd2oc5lP CuSw== 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 n128si311101qka.348.2017.12.11.08.06.45; Mon, 11 Dec 2017 08:06:45 -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 67B4A6096B; Mon, 11 Dec 2017 16:06:45 +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,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 7336C6097E; Mon, 11 Dec 2017 16:01:06 +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 2FA5560963; Mon, 11 Dec 2017 16:00:35 +0000 (UTC) Received: from forward104o.mail.yandex.net (forward104o.mail.yandex.net [37.140.190.179]) by lists.linaro.org (Postfix) with ESMTPS id C8AEA60953 for ; Mon, 11 Dec 2017 16:00:18 +0000 (UTC) Received: from mxback2j.mail.yandex.net (mxback2j.mail.yandex.net [IPv6:2a02:6b8:0:1619::10b]) by forward104o.mail.yandex.net (Yandex) with ESMTP id AFC9B703EF7 for ; Mon, 11 Dec 2017 19:00:17 +0300 (MSK) Received: from smtp1p.mail.yandex.net (smtp1p.mail.yandex.net [2a02:6b8:0:1472:2741:0:8b6:6]) by mxback2j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id 86VsYyehP4-0H1iZ5UT; Mon, 11 Dec 2017 19:00:17 +0300 Received: by smtp1p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id BifhbGdIDb-0HTOUh4r; Mon, 11 Dec 2017 19: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: Mon, 11 Dec 2017 19:00:06 +0300 Message-Id: <1513008012-9231-9-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1513008012-9231-1-git-send-email-odpbot@yandex.ru> References: <1513008012-9231-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 335 Subject: [lng-odp] [PATCH API-NEXT v1 8/14] 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 Reviewed-and-tested-by: Matias Elo --- /** Email created from pull request 335 (muvarov:devel/api-next_master_merge) ** https://github.com/Linaro/odp/pull/335 ** Patch: https://github.com/Linaro/odp/pull/335.patch ** Base sha: 630d8422564ebf4991b468cb38a29e9483fc2ec2 ** Merge commit sha: 2de2af9eca01b713e51c66fee7a5c7e535502f85 **/ 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..db2a8b0f2 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, 5, 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 Mon Dec 11 16:00:07 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: 121427 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp2980400qgn; Mon, 11 Dec 2017 08:08:20 -0800 (PST) X-Google-Smtp-Source: ACJfBouYdo4XdLzFW6EOiuo0RHZmBvjZihANDjiW42WkRdhQchD4trQ50WvXzacb8/2Wx8kGik4b X-Received: by 10.55.132.2 with SMTP id g2mr1218495qkd.151.1513008500322; Mon, 11 Dec 2017 08:08:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1513008500; cv=none; d=google.com; s=arc-20160816; b=taJI4wiCuLbuutZyc9DEMK0MMVmUuhPoSgYqW0rsrHjTN1qrteGwVomxMFeuPytBcF CwVi6jQ+1LetO1cIqMQjbbcDPa1xXSWDgRFudNkYe4k7HVNLEyF0ZDCxuE3TyQ8QhWyE 5rUvoNMz6y7iDhDxjMGWLbr8r02l2UjcYGgP4wxylStp//BduHHP9cAnEYuZl7bMUUr2 qrpScDa/Q0ddrOV2irmy+ngQEJPym1chNbB3Cn14gM7KPPqSl8HAGlg31fG0NZknHjMD M2KL6SRm7rRyP3peei+ooyNBkuTkiownDd9qSaXZTU64NxP3OpchxGVY5ocbjqcZ1rn0 8UqA== 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=bslAxoXvHRboDfZ5Cl+a/Wj7aQXSYT8GfMmozP41h8Q=; b=qxsvSJxr9n0H8DUSFLlccqA+4BdC6BW47GA7Dc/ASczjlO0eZBIZcgklhDE44ewAug VSK67jyUe8z/SYUdvkYkimYTt53vuvkcbIKvYpD8lgB7inuzuH+2GHrS0/Q8XIt7Qb9I 5NphyQY5zGlZt+O2lSAOHlkvW2T3tEVK9Z10gpqLZsMFlorwhRnJ6eQ6MtL48YPmuXCN bXBE2JA2oByEkaWxmke7H1rOg4IvDpZlISbI77YFHkN4OVW3Uy/CJOdpRFu3c0WARlZS BgCMicDc4Gkkh7rO7+epbn5NEkMnjuTalW7U03+bqlVXhXN9Lm9SyWkppna751dZplQR WUXQ== 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 y35si4597637qth.349.2017.12.11.08.08.20; Mon, 11 Dec 2017 08:08:20 -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 0AF6860961; Mon, 11 Dec 2017 16:08:20 +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 178AD60991; Mon, 11 Dec 2017 16:01:12 +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 1C5366093D; Mon, 11 Dec 2017 16:00:36 +0000 (UTC) Received: from forward101o.mail.yandex.net (forward101o.mail.yandex.net [37.140.190.181]) by lists.linaro.org (Postfix) with ESMTPS id EB5D160955 for ; Mon, 11 Dec 2017 16:00:19 +0000 (UTC) Received: from mxback1j.mail.yandex.net (mxback1j.mail.yandex.net [IPv6:2a02:6b8:0:1619::10a]) by forward101o.mail.yandex.net (Yandex) with ESMTP id 781D31343D65 for ; Mon, 11 Dec 2017 19:00:18 +0300 (MSK) Received: from smtp1p.mail.yandex.net (smtp1p.mail.yandex.net [2a02:6b8:0:1472:2741:0:8b6:6]) by mxback1j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id 9TdYswwCwp-0IsCbdlQ; Mon, 11 Dec 2017 19:00:18 +0300 Received: by smtp1p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id BifhbGdIDb-0HTSmloM; Mon, 11 Dec 2017 19: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: Mon, 11 Dec 2017 19:00:07 +0300 Message-Id: <1513008012-9231-10-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1513008012-9231-1-git-send-email-odpbot@yandex.ru> References: <1513008012-9231-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 335 MIME-Version: 1.0 Subject: [lng-odp] [PATCH API-NEXT v1 9/14] linux-gen: dpdk: cast addresses to uintptr_t 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 Reviewed-and-tested-by: Matias Elo --- /** Email created from pull request 335 (muvarov:devel/api-next_master_merge) ** https://github.com/Linaro/odp/pull/335 ** Patch: https://github.com/Linaro/odp/pull/335.patch ** Base sha: 630d8422564ebf4991b468cb38a29e9483fc2ec2 ** Merge commit sha: 2de2af9eca01b713e51c66fee7a5c7e535502f85 **/ 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 db2a8b0f2..585ff462a 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 (uintptr_t)pkt_hdr->buf_hdr.seg[0].data - + (uintptr_t)mbuf->buf_addr; } /** From patchwork Mon Dec 11 16:00:08 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: 121424 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp2978318qgn; Mon, 11 Dec 2017 08:06:38 -0800 (PST) X-Google-Smtp-Source: ACJfBovhAPbBRJTwDS0+mCdx4sGcrZ+pLFv35gu8DhsWdfy2OD9a+kvx10D9qAIv4ejr4aptWSm2 X-Received: by 10.200.22.209 with SMTP id y17mr1236199qtk.284.1513008398506; Mon, 11 Dec 2017 08:06:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1513008398; cv=none; d=google.com; s=arc-20160816; b=FTr5WcGorrSKtdt+lIEjI3UkcrIBDaAmg9g/qYbAOeGn7JdYoIyGWPXEc19MPhAMxa 0GBQpExQoA7nFIhYhQxnWhUwaF0lxW9R1yuryzAu7l1vTFEM4uLgDmDDAnoCQz8/+qS9 E2ow5LYNQ53FESGnojLchy9w0DBTUn/1TkPQYEt3yT6H/7HSN1YYTch63d97y/mlz/GC RKTNbnYDH+JmdFTpAAmvNN3JZhNtYmueCavaP40jiC86qmFVX9pXA6fxHDMlXjzuf22I RvkbybQ1yCpTTDk9aAGeTIhnn6cFk+YrWqB01OqYW1Wy0MYzQQIVuWRxIUguCwe5lTbl XO4w== 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=EsUdv9UBVIc5YDS6hb15qJnUWGtaDnE6lRT82Xs6Z1Y=; b=HDOiv1md8jtRkMl3qBTr80HDmS3Z7aJ053Ifo+tNmcpfP6koznG/CPva/RuJGZ5bE3 fzXhuM0zf8VRFxt9u41tasARooe/8ZHryx68PiBGNEWEHigIJUKKyH4dQjdjBqaBL3Je ogSvmDsDvIDtYD/HcLgB2Q3402sIl02XSvnwODFqjk+3V2wz+qGS3H7jzzsdlyn7KWjC OjjalYIuM4/BYxQ/6jVoaGqKg+HM/GXC/QCDD6M2mAjy6zEki+utqGSexh4jfxUSIXQw COWcfJorgOqgGC5Tk0gDOmQrXNNumDeb3AK6kQgqehwjqfUhMq5MV/F3jX1sp4CUwoWN xDLQ== 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 s127si1200311qkf.261.2017.12.11.08.06.38; Mon, 11 Dec 2017 08:06:38 -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 2B8D9608E8; Mon, 11 Dec 2017 16:06:38 +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 2B6BA6097D; Mon, 11 Dec 2017 16:01:00 +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 A851B60964; Mon, 11 Dec 2017 16:00:33 +0000 (UTC) Received: from forward101p.mail.yandex.net (forward101p.mail.yandex.net [77.88.28.101]) by lists.linaro.org (Postfix) with ESMTPS id 9200F608E8 for ; Mon, 11 Dec 2017 16:00:21 +0000 (UTC) Received: from mxback3o.mail.yandex.net (mxback3o.mail.yandex.net [IPv6:2a02:6b8:0:1a2d::1d]) by forward101p.mail.yandex.net (Yandex) with ESMTP id 20DC56A83E9B for ; Mon, 11 Dec 2017 19:00:19 +0300 (MSK) Received: from smtp1p.mail.yandex.net (smtp1p.mail.yandex.net [2a02:6b8:0:1472:2741:0:8b6:6]) by mxback3o.mail.yandex.net (nwsmtp/Yandex) with ESMTP id BCt9Bycsk1-0JtiOgmU; Mon, 11 Dec 2017 19:00:19 +0300 Received: by smtp1p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id BifhbGdIDb-0ITmWYlC; Mon, 11 Dec 2017 19:00:18 +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: Mon, 11 Dec 2017 19:00:08 +0300 Message-Id: <1513008012-9231-11-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1513008012-9231-1-git-send-email-odpbot@yandex.ru> References: <1513008012-9231-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 335 Subject: [lng-odp] [PATCH API-NEXT v1 10/14] 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 Compile and use DPDK when doing cross-compilation tests. This enables us to test that pktio/dpdk.c works on non-x86 targets. Signed-off-by: Dmitry Eremin-Solenikov Reviewed-and-tested-by: Matias Elo --- /** Email created from pull request 335 (muvarov:devel/api-next_master_merge) ** https://github.com/Linaro/odp/pull/335 ** Patch: https://github.com/Linaro/odp/pull/335.patch ** Base sha: 630d8422564ebf4991b468cb38a29e9483fc2ec2 ** Merge commit sha: 2de2af9eca01b713e51c66fee7a5c7e535502f85 **/ .travis.yml | 50 ++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 42 insertions(+), 8 deletions(-) diff --git a/.travis.yml b/.travis.yml index a30326724..25c2d0a53 100644 --- a/.travis.yml +++ b/.travis.yml @@ -99,7 +99,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}" ] ; @@ -107,16 +108,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 @@ -174,21 +183,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 @@ -202,12 +238,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 From patchwork Mon Dec 11 16:00:09 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: 121428 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp2981307qgn; Mon, 11 Dec 2017 08:09:08 -0800 (PST) X-Google-Smtp-Source: ACJfBovTezs73p0jxCEhbESFWcL8FrlbCzC6671FZk30DtNKfzJdt/KoPqk0+yZFuv0+xQ5rd9v+ X-Received: by 10.107.46.169 with SMTP id u41mr1181235iou.303.1513008548417; Mon, 11 Dec 2017 08:09:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1513008548; cv=none; d=google.com; s=arc-20160816; b=yeNLwMXWHSUAsA+YAzut60VDowCSy86OJpHJSFp96EvohcUPOzOQ4bF6PkgPh4is/V fnhzlE8Tz8ljS8GnUbkhyk12u/xB7KHzLhrogNWIGihbqbNtK5HD1Te72nbT6T7YlGtb pW9uKPNOHK4TQxFvJ6KjIXGFE645Ba8wf0Ovlcrov6No1+fRbxxFRL9Gk/F8UGC3cxd3 Hx/h3+EFyuBI+jq7CbiPdVnR3g8Qx7PFEdmn1dBhc8F5YwqB0FBQKErWTvjzOAaoLE+F 2SqRQ+SioQ6kCcr3revd2oDUoOFJ9sp597CePnyj7HUxUsuwACwOXHHGuv1heu6qftXO pImA== 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=u6os38UxSPEFRYFlA31dhLFXvvFjD/8Fgfmct/J3piU=; b=0skoHeKm+Lp5JmhXf8maQALPxMusNE+Ux7PBGpmifCcyS+oBYSww797u5SL5EnxDCL tZAkHKX8HtX2bcl/r5EHYJm0Z7EotW921BYz0fpaIWzVF0sW01sH0hnpE+Xg+elsfTu8 wUXczZHLxBprQHUqSajYPajKvwgMtlwIrMbv+UwuL8667BvW33AvbZrs9oPqnTgfYD1R nQJbOV11uj3cDwMHl1ytcbM6ekZJAyUTOxWmYfX293q/MSF4NSzvnEq/Zw4JOdesGsMe LGTRoUkji2A2o9vUqGcnAs7eVC9onOJZyhUDyxQSnJ2R91tztRwdLlVwQ3K5bFr52gBI zI2Q== 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 d195si10524402iog.171.2017.12.11.08.09.08; Mon, 11 Dec 2017 08:09:08 -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 C9E03608FA; Mon, 11 Dec 2017 16:09:07 +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 55CA0609AB; Mon, 11 Dec 2017 16:01:18 +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 4B32D60595; Mon, 11 Dec 2017 16:00:38 +0000 (UTC) Received: from forward104j.mail.yandex.net (forward104j.mail.yandex.net [5.45.198.247]) by lists.linaro.org (Postfix) with ESMTPS id 0FFC160595 for ; Mon, 11 Dec 2017 16:00:21 +0000 (UTC) Received: from mxback1g.mail.yandex.net (mxback1g.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b7:162]) by forward104j.mail.yandex.net (Yandex) with ESMTP id 8AF3B42B56 for ; Mon, 11 Dec 2017 19:00:19 +0300 (MSK) Received: from smtp1p.mail.yandex.net (smtp1p.mail.yandex.net [2a02:6b8:0:1472:2741:0:8b6:6]) by mxback1g.mail.yandex.net (nwsmtp/Yandex) with ESMTP id 9hYD3dZ86o-0JM4qQhX; Mon, 11 Dec 2017 19:00:19 +0300 Received: by smtp1p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id BifhbGdIDb-0JTWwKbR; Mon, 11 Dec 2017 19:00:19 +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: Mon, 11 Dec 2017 19:00:09 +0300 Message-Id: <1513008012-9231-12-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1513008012-9231-1-git-send-email-odpbot@yandex.ru> References: <1513008012-9231-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 335 Subject: [lng-odp] [PATCH API-NEXT v1 11/14] example: generator: remove 1 ms sleep on send loop 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: Bogdan Pricope The 1 ms sleep is reducing total packet throughput. Signed-off-by: Bogdan Pricope Reviewed-by: Ilias Apalodimas Signed-off-by: Maxim Uvarov --- /** Email created from pull request 335 (muvarov:devel/api-next_master_merge) ** https://github.com/Linaro/odp/pull/335 ** Patch: https://github.com/Linaro/odp/pull/335.patch ** Base sha: 630d8422564ebf4991b468cb38a29e9483fc2ec2 ** Merge commit sha: 2de2af9eca01b713e51c66fee7a5c7e535502f85 **/ example/generator/odp_generator.c | 1 - 1 file changed, 1 deletion(-) diff --git a/example/generator/odp_generator.c b/example/generator/odp_generator.c index 53b397b33..6ee4f6389 100644 --- a/example/generator/odp_generator.c +++ b/example/generator/odp_generator.c @@ -655,7 +655,6 @@ static int gen_send_thread(void *arg) burst_size - ret); burst_start += ret; burst_size -= ret; - odp_time_wait_ns(ODP_TIME_MSEC_IN_NS); continue; } EXAMPLE_ERR(" [%02i] packet send failed\n", thr); From patchwork Mon Dec 11 16:00:10 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: 121429 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp2981929qgn; Mon, 11 Dec 2017 08:09:39 -0800 (PST) X-Google-Smtp-Source: ACJfBovXGWBmALfBDWXZ/9LY9Y/MqptwrcAsGQIUKSMilkvsoFNkUKbyV5ny7gRv6Bf5iN6xzpiq X-Received: by 10.107.200.203 with SMTP id y194mr1147155iof.197.1513008578989; Mon, 11 Dec 2017 08:09:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1513008578; cv=none; d=google.com; s=arc-20160816; b=PCYCSjwOdYKYrtZbDf4v1Hp0mlYayck3OxOY+LyjfJbxkyMK2YQTL40YTfb8Rlg1jf 4NVrIgYhgvHCWEcUkIAozu25+cRUC1lm6wvOALhDRzc+LaX0I+HZoHLS7BWpJEOQmzE2 xlU61NL4sosn69Ah6l8fGlzrnpSH0EmACqQJCgNWHoxFkuSbuCwlRv/wn8dz24G1HGan HQ2x9rbvK4R29qWgeC/dI9DDuaJ5NXNY8OUjfElBhmsbs1I3QAggOxNYgABznf63fVI7 4WWB6jrhvB3D8nhHXSFWjnzYAANgZCjzqAbAM7Qpuvg9XLgLTr4S/s5cGpEy7jGD0kd6 Up5A== 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=+mfKGqVEoSigetZsBjSOA+vHQ9zNDIdYqF3ToUbljJY=; b=UCBe3Z5NwaYU4Vf8tomN7tmUnrSViVxFWVCe6GzY9xHrRPDWCBGyNmCQqUnxS7AvbP 21oxvgUVfb6gRADcS1awqq4HMx3Aq5et57p8IaAf5Kzi19wPOsX16objOYhZL1QNIkK0 Y3ekxMQMKG5zb7wXJbTEvNTtHxKIG9chreGTxGjQkTYwy5G3BzJqNksaa9f1PFOMrh3R atTt7rS+HvIQjw9tkF+/beGOKH+eyeIj+8vMQCp8aVgo7KRNoQgihgDgQ2yf5i7b/ejg dBSMF/LU9//XBWgJcl8Pl59PEfx5qLZ8XxV1qb//Hy5GLDoP07FU/0SjrsiYXJrvlNkI vwLA== 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 y6si6469364itd.86.2017.12.11.08.09.38; Mon, 11 Dec 2017 08:09:38 -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 8523D608E8; Mon, 11 Dec 2017 16:09:38 +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 97F6D609A7; Mon, 11 Dec 2017 16:01: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 4D4BC60963; Mon, 11 Dec 2017 16:00:39 +0000 (UTC) Received: from forward106j.mail.yandex.net (forward106j.mail.yandex.net [5.45.198.249]) by lists.linaro.org (Postfix) with ESMTPS id 3725B6095D for ; Mon, 11 Dec 2017 16:00:23 +0000 (UTC) Received: from mxback14g.mail.yandex.net (mxback14g.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b7:93]) by forward106j.mail.yandex.net (Yandex) with ESMTP id E73E7180160C for ; Mon, 11 Dec 2017 19:00:19 +0300 (MSK) Received: from smtp1p.mail.yandex.net (smtp1p.mail.yandex.net [2a02:6b8:0:1472:2741:0:8b6:6]) by mxback14g.mail.yandex.net (nwsmtp/Yandex) with ESMTP id 0zz852snB0-0J0Kv3mc; Mon, 11 Dec 2017 19:00:19 +0300 Received: by smtp1p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id BifhbGdIDb-0JTOBNcR; Mon, 11 Dec 2017 19:00:19 +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: Mon, 11 Dec 2017 19:00:10 +0300 Message-Id: <1513008012-9231-13-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1513008012-9231-1-git-send-email-odpbot@yandex.ru> References: <1513008012-9231-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 335 Subject: [lng-odp] [PATCH API-NEXT v1 12/14] example: generator: increase maximum TX burst size to 512 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: Bogdan Pricope Bigger TX bursts may increase packet throughput. Signed-off-by: Bogdan Pricope Reviewed-by: Ilias Apalodimas Signed-off-by: Maxim Uvarov --- /** Email created from pull request 335 (muvarov:devel/api-next_master_merge) ** https://github.com/Linaro/odp/pull/335 ** Patch: https://github.com/Linaro/odp/pull/335.patch ** Base sha: 630d8422564ebf4991b468cb38a29e9483fc2ec2 ** Merge commit sha: 2de2af9eca01b713e51c66fee7a5c7e535502f85 **/ example/generator/odp_generator.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/example/generator/odp_generator.c b/example/generator/odp_generator.c index 6ee4f6389..47b91d6ef 100644 --- a/example/generator/odp_generator.c +++ b/example/generator/odp_generator.c @@ -26,7 +26,8 @@ #define POOL_NUM_PKT 2048 /* Number of packets in packet pool */ #define POOL_PKT_LEN 1856 /* Max packet length */ #define DEFAULT_PKT_INTERVAL 1000 /* Interval between each packet */ -#define MAX_UDP_TX_BURST 32 +#define DEFAULT_UDP_TX_BURST 16 +#define MAX_UDP_TX_BURST 512 #define MAX_RX_BURST 32 #define APPL_MODE_UDP 0 /**< UDP mode */ @@ -1311,7 +1312,7 @@ static void parse_args(int argc, char *argv[], appl_args_t *appl_args) appl_args->payload = 56; appl_args->timeout = -1; appl_args->interval = DEFAULT_PKT_INTERVAL; - appl_args->udp_tx_burst = 16; + appl_args->udp_tx_burst = DEFAULT_UDP_TX_BURST; appl_args->srcport = 0; appl_args->dstport = 0; From patchwork Mon Dec 11 16:00:11 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: 121430 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp2982700qgn; Mon, 11 Dec 2017 08:10:18 -0800 (PST) X-Google-Smtp-Source: ACJfBosLofuGuqenDudFaU1Rw5s7MjjPQKFuk8qKO3W7nGasOGOrceazHiaXHPTusTJal6cIffBr X-Received: by 10.55.20.156 with SMTP id 28mr1186808qku.253.1513008618870; Mon, 11 Dec 2017 08:10:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1513008618; cv=none; d=google.com; s=arc-20160816; b=EL3H1dzGlE9G1XgCItXrobr2fZ4TDCiUjncCgI2GXWawzEvTsMygUHHXEXsI2jODrH 0sovRVKOuURX+/nblwjtIlucPy6RE2FnDHNg9TgZ8dS5tRsu1i5Emc45t3kZoVQojBuM 8Ox0xxhldJ5TtT5j9wLU95gF4VnYrFcQZmsj1xbRCITxOs6R+0BpC5uJZS8OTDz2rVOI 48G3BjC3Ng0zSz8NTAvxEnXvqT3KPGxWTo2qRNQ4fhi/MUWIZXUO8h++z40lPkDduRv2 C21RSBx4dlsin1v/YdIeqvn8k5ZUFO1GOtjxSShHR/ZbdtuhwpvhfYnnElZR8V3LOapX eK5A== 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=rogLnlYvwCUFSCEzrAjLFws+cNljWsMxUvQCMqvF4zw=; b=ZqxgEziqZebwFNvN1z4GOofIrxi/tZuE8lxkFbA7KzGZmJzVtyVQTYqVTd8GppQT1j 20Yu6GAqBiKHeB3ZX9o7TRa5nvLwAyeAQzHLsedBw261WaMLolvZxOl84ffs3WtghvM6 094BxI8yTct+9T6gAnV4V0G4xxjweAePctsJLhQR+5Inxd6ApsulTX+eZEqvlfTMOsTY lQUlcLYa3B1uAqd5Nge39RyFiIqsj098zMCJM+k9ZJ0NA963Wamun6rqgsJImVLijj+M rRrNp4GJcSpEGgDuqFvHQyV748lAims8eohdX9EaNcsDqcPWOU5IPaz7aoUyffBA4Zfc sTjw== 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 u78si12362761qkl.203.2017.12.11.08.10.18; Mon, 11 Dec 2017 08:10:18 -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 68D846097A; Mon, 11 Dec 2017 16:10:18 +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 E4C75609B3; Mon, 11 Dec 2017 16:01:30 +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 2DC586095D; Mon, 11 Dec 2017 16:00:40 +0000 (UTC) Received: from forward106p.mail.yandex.net (forward106p.mail.yandex.net [77.88.28.109]) by lists.linaro.org (Postfix) with ESMTPS id 280F360956 for ; Mon, 11 Dec 2017 16:00:22 +0000 (UTC) Received: from mxback11j.mail.yandex.net (mxback11j.mail.yandex.net [IPv6:2a02:6b8:0:1619::84]) by forward106p.mail.yandex.net (Yandex) with ESMTP id 81E732D8234B for ; Mon, 11 Dec 2017 19:00:20 +0300 (MSK) Received: from smtp1p.mail.yandex.net (smtp1p.mail.yandex.net [2a02:6b8:0:1472:2741:0:8b6:6]) by mxback11j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id YpLcaapVus-0K7a65IS; Mon, 11 Dec 2017 19:00:20 +0300 Received: by smtp1p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id BifhbGdIDb-0JT8f8q1; Mon, 11 Dec 2017 19:00:20 +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: Mon, 11 Dec 2017 19:00:11 +0300 Message-Id: <1513008012-9231-14-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1513008012-9231-1-git-send-email-odpbot@yandex.ru> References: <1513008012-9231-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 335 Subject: [lng-odp] [PATCH API-NEXT v1 13/14] example: generator: add configuration option for csum support 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: Bogdan Pricope Add configuration option to enable platform checksum support (if available) for calculation and validation. By default, checksum calculation is performed in software and validation is disabled. Signed-off-by: Bogdan Pricope Reviewed-by: Ilias Apalodimas Signed-off-by: Maxim Uvarov --- /** Email created from pull request 335 (muvarov:devel/api-next_master_merge) ** https://github.com/Linaro/odp/pull/335 ** Patch: https://github.com/Linaro/odp/pull/335.patch ** Base sha: 630d8422564ebf4991b468cb38a29e9483fc2ec2 ** Merge commit sha: 2de2af9eca01b713e51c66fee7a5c7e535502f85 **/ example/generator/odp_generator.c | 38 +++++++++++++++++++++++++++++--------- 1 file changed, 29 insertions(+), 9 deletions(-) diff --git a/example/generator/odp_generator.c b/example/generator/odp_generator.c index 47b91d6ef..0a81cdeb3 100644 --- a/example/generator/odp_generator.c +++ b/example/generator/odp_generator.c @@ -76,6 +76,7 @@ typedef struct { each packet */ int udp_tx_burst; /**< number of udp packets to send with one API call */ + odp_bool_t csum; /**< use platform csum support if available */ } appl_args_t; /** @@ -516,14 +517,26 @@ static int create_pktio(const char *dev, odp_pool_t pool, return -1; } odp_pktio_config_init(&itf->config); - itf->config.pktin.bit.ipv4_chksum = capa.config.pktin.bit.ipv4_chksum; - itf->config.pktin.bit.udp_chksum = capa.config.pktin.bit.udp_chksum; - itf->config.pktin.bit.drop_ipv4_err = - capa.config.pktin.bit.drop_ipv4_err; - itf->config.pktin.bit.drop_udp_err = capa.config.pktin.bit.drop_udp_err; - - itf->config.pktout.bit.ipv4_chksum = capa.config.pktout.bit.ipv4_chksum; - itf->config.pktout.bit.udp_chksum = capa.config.pktout.bit.udp_chksum; + if (args->appl.csum) { + itf->config.pktin.bit.ipv4_chksum = + capa.config.pktin.bit.ipv4_chksum; + itf->config.pktin.bit.udp_chksum = + capa.config.pktin.bit.udp_chksum; + itf->config.pktin.bit.drop_ipv4_err = + capa.config.pktin.bit.drop_ipv4_err; + itf->config.pktin.bit.drop_udp_err = + capa.config.pktin.bit.drop_udp_err; + + itf->config.pktout.bit.ipv4_chksum = + capa.config.pktout.bit.ipv4_chksum; + itf->config.pktout.bit.udp_chksum = + capa.config.pktout.bit.udp_chksum; + } else { /* explicit disable */ + itf->config.pktin.bit.ipv4_chksum = 0; + itf->config.pktin.bit.udp_chksum = 0; + itf->config.pktout.bit.ipv4_chksum = 0; + itf->config.pktout.bit.udp_chksum = 0; + } if (odp_pktio_config(itf->pktio, &itf->config)) { EXAMPLE_ERR("Error: Failed to set interface configuration %s\n", @@ -1299,10 +1312,11 @@ static void parse_args(int argc, char *argv[], appl_args_t *appl_args) {"interval", required_argument, NULL, 'i'}, {"help", no_argument, NULL, 'h'}, {"udp_tx_burst", required_argument, NULL, 'x'}, + {"csum", no_argument, NULL, 'y'}, {NULL, 0, NULL, 0} }; - static const char *shortopts = "+I:a:b:s:d:p:i:m:n:t:w:c:x:he:f:"; + static const char *shortopts = "+I:a:b:s:d:p:i:m:n:t:w:c:x:he:f:y"; /* let helper collect its own arguments (e.g. --odph_proc) */ odph_parse_options(argc, argv, shortopts, longopts); @@ -1315,6 +1329,7 @@ static void parse_args(int argc, char *argv[], appl_args_t *appl_args) appl_args->udp_tx_burst = DEFAULT_UDP_TX_BURST; appl_args->srcport = 0; appl_args->dstport = 0; + appl_args->csum = 0; opterr = 0; /* do not issue errors on helper options */ @@ -1455,6 +1470,9 @@ static void parse_args(int argc, char *argv[], appl_args_t *appl_args) } break; + case 'y': + appl_args->csum = 1; + break; case 'h': usage(argv[0]); exit(EXIT_SUCCESS); @@ -1541,6 +1559,8 @@ static void usage(char *progname) " -n, --count the number of packets to be send\n" " -c, --cpumask to set on cores\n" " -x, --udp_tx_burst size of UDP TX burst\n" + " -y, --csum use platform checksum support if available\n" + " default is disabled\n" "\n", NO_PATH(progname), NO_PATH(progname) ); } From patchwork Mon Dec 11 16:00:12 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: 121431 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp2983529qgn; Mon, 11 Dec 2017 08:11:01 -0800 (PST) X-Google-Smtp-Source: ACJfBounFZXndIfS7mhcwbomtHXSjWqrgT8I8t5KQtSfiwIGAC25MzEZZJHC55BOQSZ9/PU3rMRU X-Received: by 10.200.27.200 with SMTP id m8mr1253502qtk.102.1513008660890; Mon, 11 Dec 2017 08:11:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1513008660; cv=none; d=google.com; s=arc-20160816; b=wk1DuuWQJKNEUJGsiAocJGUC4SF2JeXHWRoIlHuxzNJvcB2gA0vMeSHv+1w7iBl5n3 jswFA9VfnkN617ofgsuO3ld72mIXiH6zluaXHBiAFnHRTbYB6hKq7SCxLDIpp+fe0MoN MFS/43k16McBZQVMUEElhEwNNe/LXYWfsDTQr8oXQuetma66uHZ1Xsr18bMpcjTXd99O PzUIB8H89cmwre39cVoKutBAcf4qCdPJl9Xl32cQPRXMNh/m4EDAxZxWTZMH6rxrxSLa fKvbIbcQCoyVdg/Ta0QqY4MfBzXhC/xfYfHprmrB33t7yldHO8wgWnM1DhbzeDrsQUR/ /vVQ== 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=ljBvkVi0q9MNfnxg+Ql4e+bP0vqtYk91GFlqGLo47QQ=; b=g4qINZ/femZtCnUEUH3k42A3OLrrqH+ZDiSK/OO5jvs/TMJZrTrdyIDiMIrNBvdIrw L3hDAgvjNqrWwmlJ1LDO8Ym6HeZUECxTyyC36VqsyoeSLFWaw2LVRxdHOActOqbvSXDw YTak5RDgeB2Wh1sVDYfI1Pcvlb5ayjiRxT1fSx7HhY33s6VUzf6QJCwS6XtAsQJUzcIy vLvqrTXNW6Xbg/N/JM8IbEnf6jZwz52SvZd1mRoa87IFmXlv/4H0u6bj0NoInj+PNEy2 3lI/gZn5S08m0B7Y7VQcTYJ2r/p97wXu8JPBMBQyRj3j3vZznQu8dj4FmwmE1MySXNBg 3Qdw== 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 n39si5860528qtc.319.2017.12.11.08.11.00; Mon, 11 Dec 2017 08:11:00 -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 93E286097D; Mon, 11 Dec 2017 16:11:00 +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 341186092C; Mon, 11 Dec 2017 16:01:40 +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 4AFC36096B; Mon, 11 Dec 2017 16:00:47 +0000 (UTC) Received: from forward106j.mail.yandex.net (forward106j.mail.yandex.net [5.45.198.249]) by lists.linaro.org (Postfix) with ESMTPS id 3127560958 for ; Mon, 11 Dec 2017 16:00:23 +0000 (UTC) Received: from mxback20j.mail.yandex.net (mxback20j.mail.yandex.net [IPv6:2a02:6b8:0:1619::114]) by forward106j.mail.yandex.net (Yandex) with ESMTP id 3E76E1801D5C for ; Mon, 11 Dec 2017 19:00:21 +0300 (MSK) Received: from smtp1p.mail.yandex.net (smtp1p.mail.yandex.net [2a02:6b8:0:1472:2741:0:8b6:6]) by mxback20j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id iKv5TF6EEN-0Lqq71EC; Mon, 11 Dec 2017 19:00:21 +0300 Received: by smtp1p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id BifhbGdIDb-0KT8IA7M; Mon, 11 Dec 2017 19:00:20 +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: Mon, 11 Dec 2017 19:00:12 +0300 Message-Id: <1513008012-9231-15-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1513008012-9231-1-git-send-email-odpbot@yandex.ru> References: <1513008012-9231-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 335 Subject: [lng-odp] [PATCH API-NEXT v1 14/14] example: generator: replace atomic counter with per worker counters 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: Bogdan Pricope Use of atomic counters reduces total packet throughput. Signed-off-by: Bogdan Pricope Reviewed-by: Ilias Apalodimas Signed-off-by: Maxim Uvarov --- /** Email created from pull request 335 (muvarov:devel/api-next_master_merge) ** https://github.com/Linaro/odp/pull/335 ** Patch: https://github.com/Linaro/odp/pull/335.patch ** Base sha: 630d8422564ebf4991b468cb38a29e9483fc2ec2 ** Merge commit sha: 2de2af9eca01b713e51c66fee7a5c7e535502f85 **/ example/generator/odp_generator.c | 266 +++++++++++++++++++++++--------------- 1 file changed, 165 insertions(+), 101 deletions(-) diff --git a/example/generator/odp_generator.c b/example/generator/odp_generator.c index 0a81cdeb3..861e98369 100644 --- a/example/generator/odp_generator.c +++ b/example/generator/odp_generator.c @@ -34,6 +34,9 @@ #define APPL_MODE_PING 1 /**< ping mode */ #define APPL_MODE_RCV 2 /**< receive mode */ +#define PING_THR_TX 0 +#define PING_THR_RX 1 + /** print appl mode */ #define PRINT_APPL_MODE(x) printf("%s(%i)\n", #x, (x)) @@ -82,18 +85,21 @@ typedef struct { /** * counters */ -static struct { - odp_atomic_u64_t seq; /**< ip seq to be send */ - odp_atomic_u64_t ip; /**< ip packets */ - odp_atomic_u64_t udp; /**< udp packets */ - odp_atomic_u64_t icmp; /**< icmp packets */ - odp_atomic_u64_t cnt; /**< sent packets*/ - odp_atomic_u64_t tx_drops; /**< packets dropped in transmit */ -} counters; +typedef struct { + uint64_t ctr_pkt_snd; /**< sent packets*/ + uint64_t ctr_pkt_snd_drop; /**< packets dropped in transmit */ + + uint64_t ctr_pkt_rcv; /**< recv packets */ + uint64_t ctr_seq; /**< ip seq to be send */ + uint64_t ctr_udp_rcv; /**< udp packets */ + uint64_t ctr_icmp_reply_rcv; /**< icmp reply packets */ +} counters_t; /** * Thread specific arguments */ typedef struct { + counters_t counters; /**< Packet conters */ + odp_bool_t stop; /**< Stop packet processing */ union { struct { odp_pktout_queue_t pktout; /**< Packet output queue */ @@ -120,6 +126,9 @@ typedef struct { appl_args_t appl; /** Thread specific arguments */ thread_args_t thread[MAX_WORKERS]; + /** Global arguments */ + int thread_cnt; + int tx_burst_size; } args_t; /** Global pointer to args */ @@ -131,7 +140,8 @@ static odp_barrier_t barrier; /** Packet processing function types */ typedef odp_packet_t (*setup_pkt_ref_fn_t)(odp_pool_t, odp_pktout_config_opt_t *); -typedef int (*setup_pkt_fn_t)(odp_packet_t, odp_pktout_config_opt_t *); +typedef int (*setup_pkt_fn_t)(odp_packet_t, odp_pktout_config_opt_t *, + counters_t *); /* helper funcs */ static void parse_args(int argc, char *argv[], appl_args_t *appl_args); @@ -245,6 +255,7 @@ static int setup_pkt_ref_array(odp_pool_t pool, * @return 0 success, -1 failed */ static int setup_pkt_array(odp_pktout_config_opt_t *pktout_cfg, + counters_t *counters, odp_packet_t *pkt_ref_array, odp_packet_t *pkt_array, int pkt_array_size, @@ -253,7 +264,7 @@ static int setup_pkt_array(odp_pktout_config_opt_t *pktout_cfg, int i; for (i = 0; i < pkt_array_size; i++) { - if ((*setup_pkt)(pkt_ref_array[i], pktout_cfg)) + if ((*setup_pkt)(pkt_ref_array[i], pktout_cfg, counters)) break; pkt_array[i] = odp_packet_ref_static(pkt_ref_array[i]); @@ -342,7 +353,8 @@ static odp_packet_t setup_udp_pkt_ref(odp_pool_t pool, * @return Success/Failed * @retval 0 on success, -1 on fail */ -static int setup_udp_pkt(odp_packet_t pkt, odp_pktout_config_opt_t *pktout_cfg) +static int setup_udp_pkt(odp_packet_t pkt, odp_pktout_config_opt_t *pktout_cfg, + counters_t *counters) { char *buf; odph_ipv4hdr_t *ip; @@ -352,7 +364,8 @@ static int setup_udp_pkt(odp_packet_t pkt, odp_pktout_config_opt_t *pktout_cfg) /*Update IP ID and checksum*/ ip = (odph_ipv4hdr_t *)(buf + ODPH_ETHHDR_LEN); - seq = odp_atomic_fetch_add_u64(&counters.seq, 1) % 0xFFFF; + seq = counters->ctr_seq % 0xFFFF; + counters->ctr_seq++; ip->id = odp_cpu_to_be_16(seq); if (!pktout_cfg->bit.ipv4_chksum) { ip->chksum = 0; @@ -437,7 +450,8 @@ static odp_packet_t setup_icmp_pkt_ref(odp_pool_t pool, * @retval 0 on success, -1 on fail */ static int setup_icmp_pkt(odp_packet_t pkt, - odp_pktout_config_opt_t *pktout_cfg) + odp_pktout_config_opt_t *pktout_cfg, + counters_t *counters) { char *buf; odph_ipv4hdr_t *ip; @@ -450,7 +464,8 @@ static int setup_icmp_pkt(odp_packet_t pkt, /* ip */ ip = (odph_ipv4hdr_t *)(buf + ODPH_ETHHDR_LEN); - seq = odp_atomic_fetch_add_u64(&counters.seq, 1) % 0xffff; + seq = counters->ctr_seq % 0xffff; + counters->ctr_seq++; ip->id = odp_cpu_to_be_16(seq); if (!pktout_cfg->bit.ipv4_chksum) { ip->chksum = 0; @@ -607,30 +622,39 @@ static int gen_send_thread(void *arg) odp_pktout_config_opt_t *pktout_cfg; odp_packet_t pkt_ref_array[MAX_UDP_TX_BURST]; odp_packet_t pkt_array[MAX_UDP_TX_BURST]; - int pkt_array_size; + int pkt_array_size, seq_step; int burst_start, burst_size; setup_pkt_ref_fn_t setup_pkt_ref = NULL; setup_pkt_fn_t setup_pkt = NULL; + counters_t *counters; + uint64_t pkt_count_max = 0; thr = odp_thread_id(); thr_args = arg; pktout = thr_args->tx.pktout; pktout_cfg = thr_args->tx.pktout_cfg; + counters = &thr_args->counters; /* Create reference packets*/ if (args->appl.mode == APPL_MODE_UDP) { - pkt_array_size = args->appl.udp_tx_burst; setup_pkt_ref = setup_udp_pkt_ref; setup_pkt = setup_udp_pkt; + seq_step = args->tx_burst_size * (args->thread_cnt - 1); + if (args->appl.number != -1) + pkt_count_max = args->appl.number / args->thread_cnt + + (args->appl.number % args->thread_cnt ? 1 : 0); } else if (args->appl.mode == APPL_MODE_PING) { - pkt_array_size = 1; setup_pkt_ref = setup_icmp_pkt_ref; setup_pkt = setup_icmp_pkt; + seq_step = 0; + if (args->appl.number != -1) + pkt_count_max = args->appl.number; } else { EXAMPLE_ERR(" [%02i] Error: invalid processing mode %d\n", thr, args->appl.mode); return -1; } + pkt_array_size = args->tx_burst_size; if (setup_pkt_ref_array(thr_args->pool, pktout_cfg, pkt_ref_array, pkt_array_size, @@ -645,13 +669,17 @@ static int gen_send_thread(void *arg) odp_barrier_wait(&barrier); for (;;) { - if (args->appl.number != -1 && - odp_atomic_fetch_add_u64(&counters.cnt, pkt_array_size) >= - (unsigned int)args->appl.number) + if (thr_args->stop) break; + if (pkt_count_max && counters->ctr_pkt_snd > pkt_count_max) { + sleep(1); /* wait for stop command */ + continue; + } + /* Setup TX burst*/ - if (setup_pkt_array(pktout_cfg, pkt_ref_array, pkt_array, + if (setup_pkt_array(pktout_cfg, counters, + pkt_ref_array, pkt_array, pkt_array_size, setup_pkt)) { EXAMPLE_ERR("[%02i] Error: failed to setup packets\n", thr); @@ -663,10 +691,12 @@ static int gen_send_thread(void *arg) ret = odp_pktout_send(pktout, &pkt_array[burst_start], burst_size); if (ret == burst_size) { + burst_size = 0; break; } else if (ret >= 0 && ret < burst_size) { - odp_atomic_add_u64(&counters.tx_drops, - burst_size - ret); + thr_args->counters.ctr_pkt_snd_drop += + burst_size - ret; + burst_start += ret; burst_size -= ret; continue; @@ -677,32 +707,20 @@ static int gen_send_thread(void *arg) break; } + counters->ctr_pkt_snd += pkt_array_size - burst_size; + if (args->appl.interval != 0) { printf(" [%02i] send pkt no:%ju seq %ju\n", thr, - odp_atomic_load_u64(&counters.seq), - odp_atomic_load_u64(&counters.seq)%0xffff); + counters->ctr_seq, + counters->ctr_seq % 0xffff); millisleep(args->appl.interval, thr_args->tp, thr_args->tim, thr_args->tq, thr_args->tmo_ev); } - } - - /* receive number of reply pks until timeout */ - if (args->appl.mode == APPL_MODE_PING && args->appl.number > 0) { - while (args->appl.timeout >= 0) { - if (odp_atomic_load_u64(&counters.icmp) >= - (unsigned int)args->appl.number) - break; - millisleep(DEFAULT_PKT_INTERVAL, - thr_args->tp, - thr_args->tim, - thr_args->tq, - thr_args->tmo_ev); - args->appl.timeout--; - } + counters->ctr_seq += seq_step; } odp_packet_free_multi(pkt_ref_array, pkt_array_size); @@ -717,7 +735,8 @@ static int gen_send_thread(void *arg) * @param msg output buffer */ -static void process_icmp_pkt(odph_icmphdr_t *icmp, char *msg) +static void process_icmp_pkt(thread_args_t *thr_args, + odph_icmphdr_t *icmp, char *msg) { uint64_t trecv; uint64_t tsend; @@ -726,7 +745,7 @@ static void process_icmp_pkt(odph_icmphdr_t *icmp, char *msg) msg[0] = 0; if (icmp->type == ICMP_ECHOREPLY) { - odp_atomic_inc_u64(&counters.icmp); + thr_args->counters.ctr_icmp_reply_rcv++; memcpy(&tsend, (uint8_t *)icmp + ODPH_ICMPHDR_LEN, sizeof(uint64_t)); @@ -751,7 +770,8 @@ static void process_icmp_pkt(odph_icmphdr_t *icmp, char *msg) * @param pkt_tbl packets to be print * @param len packet number */ -static void print_pkts(int thr, odp_packet_t pkt_tbl[], unsigned len) +static void print_pkts(int thr, thread_args_t *thr_args, + odp_packet_t pkt_tbl[], unsigned len) { odp_packet_t pkt; char *buf; @@ -768,21 +788,20 @@ static void print_pkts(int thr, odp_packet_t pkt_tbl[], unsigned len) if (!odp_packet_has_ipv4(pkt)) continue; - odp_atomic_inc_u64(&counters.ip); + thr_args->counters.ctr_pkt_rcv++; buf = odp_packet_data(pkt); ip = (odph_ipv4hdr_t *)(buf + odp_packet_l3_offset(pkt)); offset = odp_packet_l4_offset(pkt); /* udp */ - if (ip->proto == ODPH_IPPROTO_UDP) { - odp_atomic_inc_u64(&counters.udp); - } + if (ip->proto == ODPH_IPPROTO_UDP) + thr_args->counters.ctr_udp_rcv++; /* icmp */ if (ip->proto == ODPH_IPPROTO_ICMPv4) { icmp = (odph_icmphdr_t *)(buf + offset); - process_icmp_pkt(icmp, msg); + process_icmp_pkt(thr_args, icmp, msg); printf(" [%02i] %s\n", thr, msg); } } @@ -810,14 +829,11 @@ static int gen_recv_thread(void *arg) odp_barrier_wait(&barrier); for (;;) { - if (args->appl.number != -1 && - odp_atomic_load_u64(&counters.icmp) >= - (unsigned int)args->appl.number) { + if (thr_args->stop) break; - } /* Use schedule to get buf from any input queue */ - ev_cnt = odp_schedule_multi(NULL, ODP_SCHED_WAIT, + ev_cnt = odp_schedule_multi(NULL, ODP_SCHED_NO_WAIT, events, MAX_RX_BURST); if (ev_cnt == 0) continue; @@ -848,7 +864,7 @@ static int gen_recv_thread(void *arg) } if (pkt_cnt) { - print_pkts(thr, pkts, pkt_cnt); + print_pkts(thr, thr_args, pkts, pkt_cnt); odp_packet_free_multi(pkts, pkt_cnt); } @@ -857,6 +873,35 @@ static int gen_recv_thread(void *arg) return 0; } +#define COUNTER_SUM(_c, _nw) \ +({ \ + int _itr; \ + uint64_t _result = 0; \ + \ + for (_itr = 0; _itr < _nw; _itr++) \ + _result += args->thread[_itr].counters.ctr_ ## _c; \ + \ + _result; \ +}) + +static void garceful_stop_ping(void) +{ + uint64_t snd, rcv; + + if (args->appl.mode != APPL_MODE_PING) + return; + + while (args->appl.timeout >= 0) { + snd = COUNTER_SUM(pkt_snd, 2); + rcv = COUNTER_SUM(icmp_reply_rcv, 2); + if (rcv >= snd) + break; + + sleep(1); + args->appl.timeout--; + } +} + /** * printing verbose statistics * @@ -868,8 +913,8 @@ static void print_global_stats(int num_workers) uint64_t pps_snd = 0, maximum_pps_snd = 0; uint64_t pkts_rcv = 0, pkts_rcv_prev = 0; uint64_t pps_rcv = 0, maximum_pps_rcv = 0; - uint64_t stall; - int verbose_interval = 20; + uint64_t stall, pkts_snd_drop; + int verbose_interval = 20, i; odp_thrmask_t thrd_mask; odp_barrier_wait(&barrier); @@ -878,12 +923,15 @@ static void print_global_stats(int num_workers) next = odp_time_sum(odp_time_local(), wait); while (odp_thrmask_worker(&thrd_mask) == num_workers) { - if (args->appl.number != -1 && - odp_atomic_load_u64(&counters.cnt) >= - (unsigned int)args->appl.number) { - break; - } + if (args->appl.mode != APPL_MODE_RCV && + args->appl.number != -1) { + uint64_t cnt = COUNTER_SUM(pkt_snd, num_workers); + if (cnt >= (unsigned int)args->appl.number) { + garceful_stop_ping(); + break; + } + } cur = odp_time_local(); if (odp_time_cmp(next, cur) > 0) { left = odp_time_diff(next, cur); @@ -894,18 +942,22 @@ static void print_global_stats(int num_workers) usleep(stall / ODP_TIME_USEC_IN_NS); continue; } - next = odp_time_sum(cur, wait); + switch (args->appl.mode) { case APPL_MODE_RCV: - pkts_rcv = odp_atomic_load_u64(&counters.ip); + pkts_rcv = COUNTER_SUM(pkt_rcv, num_workers); + pkts_snd = 0; + pkts_snd_drop = 0; break; case APPL_MODE_PING: - pkts_snd = odp_atomic_load_u64(&counters.seq); - pkts_rcv = odp_atomic_load_u64(&counters.icmp); + pkts_snd = COUNTER_SUM(pkt_snd, num_workers); + pkts_snd_drop = COUNTER_SUM(pkt_snd_drop, num_workers); + pkts_rcv = COUNTER_SUM(icmp_reply_rcv, num_workers); break; case APPL_MODE_UDP: - pkts_snd = odp_atomic_load_u64(&counters.seq); + pkts_snd = COUNTER_SUM(pkt_snd, num_workers); + pkts_snd_drop = COUNTER_SUM(pkt_snd_drop, num_workers); break; default: continue; @@ -927,11 +979,14 @@ static void print_global_stats(int num_workers) "rcv: %" PRIu64 ", " "recv rate: %" PRIu64 " pps, " "max recv rate: %" PRIu64 " pps\n", - pkts_snd, odp_atomic_load_u64(&counters.tx_drops), + pkts_snd, pkts_snd_drop, pps_snd, maximum_pps_snd, pkts_rcv, pps_rcv, maximum_pps_rcv); fflush(NULL); } + + for (i = 0; i < num_workers; i++) + args->thread[i].stop = 1; } /** @@ -968,14 +1023,6 @@ int main(int argc, char *argv[]) exit(EXIT_FAILURE); } - /* init counters */ - odp_atomic_init_u64(&counters.seq, 0); - odp_atomic_init_u64(&counters.ip, 0); - odp_atomic_init_u64(&counters.udp, 0); - odp_atomic_init_u64(&counters.icmp, 0); - odp_atomic_init_u64(&counters.cnt, 0); - odp_atomic_init_u64(&counters.tx_drops, 0); - /* Reserve memory for args from shared mem */ shm = odp_shm_reserve("shm_args", sizeof(args_t), ODP_CACHE_LINE_SIZE, 0); @@ -1024,6 +1071,15 @@ int main(int argc, char *argv[]) num_workers = 2; } } + args->thread_cnt = num_workers; + + /* Burst size */ + if (args->appl.mode == APPL_MODE_PING) + args->tx_burst_size = 1; + else if (args->appl.mode == APPL_MODE_UDP) + args->tx_burst_size = args->appl.udp_tx_burst; + else + args->tx_burst_size = 0; /* Create packet pool */ odp_pool_param_init(¶ms); @@ -1104,6 +1160,7 @@ int main(int argc, char *argv[]) if (args->appl.mode == APPL_MODE_PING) { odp_cpumask_t cpu_mask; int cpu_first, cpu_next; + thread_args_t *thr_args; odp_cpumask_zero(&cpu_mask); cpu_first = odp_cpumask_first(&cpumask); @@ -1114,60 +1171,64 @@ int main(int argc, char *argv[]) EXAMPLE_ERR("queue_create failed\n"); abort(); } - args->thread[1].rx.ifs = ifs; - args->thread[1].rx.ifs_count = args->appl.if_count; - args->thread[1].pool = pool; - args->thread[1].tp = tp; - args->thread[1].tq = tq; - args->thread[1].tim = odp_timer_alloc(tp, tq, NULL); - if (args->thread[1].tim == ODP_TIMER_INVALID) { + thr_args = &args->thread[PING_THR_RX]; + thr_args->rx.ifs = ifs; + thr_args->rx.ifs_count = args->appl.if_count; + thr_args->pool = pool; + thr_args->tp = tp; + thr_args->tq = tq; + thr_args->tim = odp_timer_alloc(tp, tq, NULL); + if (thr_args->tim == ODP_TIMER_INVALID) { EXAMPLE_ERR("timer_alloc failed\n"); abort(); } - args->thread[1].tmo_ev = odp_timeout_alloc(tmop); - if (args->thread[1].tmo_ev == ODP_TIMEOUT_INVALID) { + thr_args->tmo_ev = odp_timeout_alloc(tmop); + if (thr_args->tmo_ev == ODP_TIMEOUT_INVALID) { EXAMPLE_ERR("timeout_alloc failed\n"); abort(); } - args->thread[1].mode = args->appl.mode; + thr_args->mode = args->appl.mode; memset(&thr_params, 0, sizeof(thr_params)); thr_params.start = gen_recv_thread; - thr_params.arg = &args->thread[1]; + thr_params.arg = thr_args; thr_params.thr_type = ODP_THREAD_WORKER; thr_params.instance = instance; - odph_odpthreads_create(&thread_tbl[1], &cpu_mask, &thr_params); + odph_odpthreads_create(&thread_tbl[PING_THR_RX], + &cpu_mask, &thr_params); tq = odp_queue_create("", NULL); if (tq == ODP_QUEUE_INVALID) { EXAMPLE_ERR("queue_create failed\n"); abort(); } - args->thread[0].tx.pktout = ifs[0].pktout[0]; - args->thread[0].tx.pktout_cfg = &ifs[0].config.pktout; - args->thread[0].pool = pool; - args->thread[0].tp = tp; - args->thread[0].tq = tq; - args->thread[0].tim = odp_timer_alloc(tp, tq, NULL); - if (args->thread[0].tim == ODP_TIMER_INVALID) { + thr_args = &args->thread[PING_THR_TX]; + thr_args->tx.pktout = ifs[0].pktout[0]; + thr_args->tx.pktout_cfg = &ifs[0].config.pktout; + thr_args->pool = pool; + thr_args->tp = tp; + thr_args->tq = tq; + thr_args->tim = odp_timer_alloc(tp, tq, NULL); + if (thr_args->tim == ODP_TIMER_INVALID) { EXAMPLE_ERR("timer_alloc failed\n"); abort(); } - args->thread[0].tmo_ev = odp_timeout_alloc(tmop); - if (args->thread[0].tmo_ev == ODP_TIMEOUT_INVALID) { + thr_args->tmo_ev = odp_timeout_alloc(tmop); + if (thr_args->tmo_ev == ODP_TIMEOUT_INVALID) { EXAMPLE_ERR("timeout_alloc failed\n"); abort(); } - args->thread[0].mode = args->appl.mode; + thr_args->mode = args->appl.mode; cpu_next = odp_cpumask_next(&cpumask, cpu_first); odp_cpumask_zero(&cpu_mask); odp_cpumask_set(&cpu_mask, cpu_next); thr_params.start = gen_send_thread; - thr_params.arg = &args->thread[0]; + thr_params.arg = thr_args; - odph_odpthreads_create(&thread_tbl[0], &cpu_mask, &thr_params); + odph_odpthreads_create(&thread_tbl[PING_THR_TX], + &cpu_mask, &thr_params); } else { int cpu = odp_cpumask_first(&cpumask); @@ -1176,6 +1237,7 @@ int main(int argc, char *argv[]) odp_cpumask_t thd_mask; int (*thr_run_func)(void *); int if_idx, pktout_idx; + uint64_t start_seq; if (args->appl.mode == APPL_MODE_RCV) { args->thread[i].rx.ifs = ifs; @@ -1185,11 +1247,13 @@ int main(int argc, char *argv[]) if_idx = i % args->appl.if_count; pktout_idx = (i / args->appl.if_count) % ifs[if_idx].pktout_count; + start_seq = i * args->tx_burst_size; args->thread[i].tx.pktout = ifs[if_idx].pktout[pktout_idx]; args->thread[i].tx.pktout_cfg = &ifs[if_idx].config.pktout; + args->thread[i].counters.ctr_seq = start_seq; } tq = odp_queue_create("", NULL); if (tq == ODP_QUEUE_INVALID) { @@ -1531,9 +1595,9 @@ static void usage(char *progname) "OpenDataPlane example application.\n" "\n" " Work mode:\n" - " 1.send udp packets\n" + " 1.send ipv4 udp packets\n" " odp_generator -I eth0 --srcmac fe:0f:97:c9:e0:44 --dstmac 32:cb:9b:27:2f:1a --srcip 192.168.0.1 --dstip 192.168.0.2 -m u\n" - " 2.receive udp packets\n" + " 2.receive ipv4 packets\n" " odp_generator -I eth0 -m r\n" " 3.work likes ping\n" " odp_generator -I eth0 --srcmac fe:0f:97:c9:e0:44 --dstmac 32:cb:9b:27:2f:1a --srcip 192.168.0.1 --dstip 192.168.0.2 --cpumask 0xc -m p\n"