From patchwork Wed Feb 8 12:19:37 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petri Savolainen X-Patchwork-Id: 93632 Delivered-To: patch@linaro.org Received: by 10.182.3.34 with SMTP id 2csp2704046obz; Wed, 8 Feb 2017 04:28:43 -0800 (PST) X-Received: by 10.55.133.130 with SMTP id h124mr21436798qkd.91.1486556923140; Wed, 08 Feb 2017 04:28:43 -0800 (PST) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id g20si5471729qke.187.2017.02.08.04.28.42; Wed, 08 Feb 2017 04:28:43 -0800 (PST) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id C3BD9634D1; Wed, 8 Feb 2017 12:28:42 +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=-1.9 required=5.0 tests=BAD_ENC_HEADER,BAYES_00, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,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 4019C634C2; Wed, 8 Feb 2017 12:23:38 +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 34DF7634C2; Wed, 8 Feb 2017 12:23:32 +0000 (UTC) Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-db5eur01on0120.outbound.protection.outlook.com [104.47.2.120]) by lists.linaro.org (Postfix) with ESMTPS id B8551634D8 for ; Wed, 8 Feb 2017 12:19:50 +0000 (UTC) Received: from VI1PR07CA0109.eurprd07.prod.outlook.com (10.165.229.163) by AMSPR07MB280.eurprd07.prod.outlook.com (10.242.227.156) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.888.5; Wed, 8 Feb 2017 12:19:49 +0000 Received: from AM1FFO11FD018.protection.gbl (2a01:111:f400:7e00::111) by VI1PR07CA0109.outlook.office365.com (2a01:111:e400:7a52::35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.888.5 via Frontend Transport; Wed, 8 Feb 2017 12:19:49 +0000 Received-SPF: SoftFail (protection.outlook.com: domain of transitioning linaro.org discourages use of 131.228.2.37 as permitted sender) Received: from hybrid2.ext.net.nokia.com (131.228.2.37) by AM1FFO11FD018.mail.protection.outlook.com (10.174.64.207) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.888.7 via Frontend Transport; Wed, 8 Feb 2017 12:19:48 +0000 Received: from fihe3nok1348.nsn-intra.net (10.158.36.136) by fihe3nok1348.nsn-intra.net (10.158.36.136) with Microsoft SMTP Server (TLS) id 15.1.466.34; Wed, 8 Feb 2017 14:19:47 +0200 Received: from mailrelay.int.nokia.com (10.130.128.21) by fihe3nok1348.nsn-intra.net (10.158.36.136) with Microsoft SMTP Server (TLS) id 15.1.466.34 via Frontend Transport; Wed, 8 Feb 2017 14:19:47 +0200 Received: from fihe3nok0734.emea.nsn-net.net (localhost [127.0.0.1]) by fihe3nok0734.emea.nsn-net.net (8.14.9/8.14.5) with ESMTP id v18CJf0W027373 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 8 Feb 2017 14:19:41 +0200 Received: from 10.144.19.15 ([10.144.104.219]) by fihe3nok0734.emea.nsn-net.net (8.14.9/8.14.5) with ESMTP id v18CJf6H027358 (version=TLSv1/SSLv3 cipher=AES128-SHA256 bits=128 verify=NOT) for ; Wed, 8 Feb 2017 14:19:41 +0200 X-HPESVCS-Source-Ip: 10.144.104.219 From: Petri Savolainen To: Date: Wed, 8 Feb 2017 14:19:37 +0200 Message-ID: <1486556381-22233-2-git-send-email-petri.savolainen@linaro.org> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1486556381-22233-1-git-send-email-petri.savolainen@linaro.org> References: <1486556381-22233-1-git-send-email-petri.savolainen@linaro.org> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:131.228.2.37; IPV:NLI; CTRY:FI; EFV:NLI; SFV:NSPM; SFS:(10019020)(6009001)(7916002)(39450400003)(39840400002)(39410400002)(39860400002)(39850400002)(2980300002)(199003)(189002)(2906002)(92566002)(97736004)(626004)(8936002)(5660300001)(86362001)(50226002)(50986999)(2351001)(36756003)(81166006)(47776003)(450100001)(53936002)(106466001)(8676002)(356003)(81156014)(5003940100001)(105596002)(2950100002)(33646002)(68736007)(48376002)(6666003)(189998001)(305945005)(6916009)(110136004)(50466002)(22756006)(76176999)(77096006)(38730400002); DIR:OUT; SFP:1102; SCL:1; SRVR:AMSPR07MB280; H:hybrid2.ext.net.nokia.com; FPR:; SPF:SoftFail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; AM1FFO11FD018; 1:Our8B0vaBAESGkP2u4AGJWusi+0dFyUjWBhC/IkGJwuY/T6lW8wJR1Py01cSqSI/d4Wb287Ccnok/4/kN0zmIzVA+E4aqi4v+7AkGMbazDUxUX6X+02LZWXwRnaDvvYF8Ma7FxuZWUvlJ85OUoUn9IV3Wd6eK6de2b/Lzcd0fK/rNaq1VJF0hbhlbRA72jSEZnDJlphPcZsKHHptbJVuVjCqQq5unHGRwperVKNlf7mBF3VxpzjKjoLb9oSbcWaWPMvcfhulnOwzqVAIbKAYcs6vfcmdZwUu0Y/BB2L0SnKld6qVfm9LUaAb36KQ0FKl4sjOi3U7GotBYHbKj0zXF9s1OOsGvrbxh+XrBvYu4TGNLYu2k1c/sfu6IRMBuJWCoG7GNXZUAsCyalnBcBjxSsMd6rXKXb2DJXNpsbRbpw7WTkyMOWtxR5qYacHidkzWOci4zB+2uySzADUJV1hoIoZQD+E4jXtHngXqokKFdcYhkXMxwyI9ZG07rekxbyxxX/NDEwdg9SZYXPZ0a/no8g== X-MS-Office365-Filtering-Correlation-Id: e74fc91e-98d6-4f75-c073-08d4501cc69c X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001); SRVR:AMSPR07MB280; X-Microsoft-Exchange-Diagnostics: 1; AMSPR07MB280; 3:7sxOh63ad7ZO+uuyJOgEuM3MqQoh3vdvh0dpwysRjDT280YxxA7Rrh2ZFXDmEs2P3mSak3zgiVS8MtzsJrh2d3qgidk/yXJz7TPF6klEixpGd0gc316p9KJ/raBaWe00+MMWGVVl5WpOVO0guboJNvydMN6J0PewZUgS0Ixrt8+tdZm7Iq5qvXU6kIxALHzr6vgo2mBY1G9RTX+o5/zydMBmI32Gzml7DIsLd06t9rH+YdycoQrL0yVxoCyYoljPY/ER55yreCpwmbpsENwyBgRSUo426pFtnjj3npAF7QNkh134MK01/c2iXYBAFe/rFkJPwfTtSeIFpnOwh9He8PNGRHsIh/WCMQTEKA1wvF+PtR13zIko+0VLvqj44Z5U; 25:jm/Qgaxkecc8QmM9acHMM4yw2VpSTuvCZs0gPaOZy0oCIfRoyGUCpdlEjxamWAX5iSgjo8AUR9nNeNHQrcIRjALk4uwxuxq37sLn+lB1ggiRuFSUto8UtQeZNdwPg1vZ4IVyAACOIxEAM5wvAAajRNWKV0AGX3+IV6RECw1eaveCDb3f+uxAElkGgg7HpIZiv9aoJmQMI6SIp4D+/uQdqnI1iPU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0e2Pm/gt+HWtQFggRVyk7JH/lUhwI1vPnwZpK0w1WJtVT/oY8GeeRIw/92OFFsSxp7HVNWgB9bKeB8bKC+kGHAO/z6cYYEI7rUqgK/ysG/2OaELCk94HLAixg0SRFDdSLH8wDBH7IUEsXk8= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040375)(601004)(2401047)(8121501046)(13016025)(13018025)(5005006)(20170203043)(2017020702029)(3002001)(10201501046)(6055026)(6041248)(20161123564025)(20161123555025)(20161123562025)(20161123560025)(20161123558025)(6072148); SRVR:AMSPR07MB280; BCL:0; PCL:0; RULEID:; SRVR:AMSPR07MB280; X-Microsoft-Exchange-Diagnostics: 1; AMSPR07MB280; 4:DVD2OKk1ULd0mlAF13dp0dRtA1c3l/0ic315x6LpEmjkF8OiDZD1fgH2bqXrwd2HA42OqugYWb2H+jFow7+AbgUr5v4zIaVqllA8+WaQpEdppwkLj8rhf/Hx/n6be0rpIG5bwkM9g5wSrq5BTwcbSlN8E/L/Uv8cJXdjI2YuMnHungVK61xkktruFtvG77WOcrcQUpvVJ6ckXL1kOPlJmxEV0Z7pdpvcIh4Ch9pyY4kotQOTGiMpM5sCD3sCGu2Tqr1MP9j/z1EuiszFgiUpeNJJ71M4sKUVQEzqAatEvp+stwqO4LvH1HqEaNnqg6QEh+tG93oeuCqv7txuoVLmH0TRlvvOD3r1+9+293wklD3g1I1bal5ZLJ1peK0mPmWEhIUy+OROzqdIM4Q7lPrroK6KZkaSWGIT2Q+xgwFUWd5Qh6FQ1wgQB744hOQ1HQLqYIgFGPlRX7rdsygZaOJHqHfucfitiyyAz2JJeZjVmDCjtVuzGEegM+CdEyohtOqx4ilkon5QPihVT3Gx2oCepe1v0wH2qSatS4soZ+TL9iJpnRwOE07T2fpUQ64s1k18FcBccO5DO0DU8/+/sckBK+x/MN2bEg04hjGqN8nO2uPj7IxsaOYfPJ6fcmG9VN9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0spMOD4ft+5u6uUHtxblsRGrksyEgbeEBfubXO9OyTkVzUtZTaTw6nfHu92n9XtrTgk2LF4tExhu1a+Il3j0INCRizrDiQvTtFN4FAKuRG68xcuaU9fZIuUK7f3x7w9hYeoomI6SnEtOy5AmKvJ0yj/tmvZhLBwZiHxU8O9V54gUQ6NKl9OFkOJnwcgCY4dOXPKWWPXVdRpL3RoeNO/6cPJNEdVT5UuHeXzTKfWA9gHDW0D3utdGTO8dTi8N2na/iFJBgUGXCc7e9Yi21qP6lh05GlrhBL8oPX4+m9nvp537g/d5mJFlmPHWjZ/GyRWtyGcVoQOumUzg0hKVx0KYCTBig6giTD1oDZzB37aTnh2zA2MFOIdyjiqufUvkTrTjSJwwdOtOSr0W8n7kUZ+MM5T94747YHlneb29gOSBdAL88FIfYgzS/uT/bAFV8+kji4gj/sU3sUBD6UpD1HhJL6Cl8A6x1ysxmYcbsH27H9htkX9YIOrbZFQQ7Vddo01tQlPS49ov4I6yw== X-OriginatorOrg: nokia.onmicrosoft.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Feb 2017 12:19:48.6770 (UTC) X-MS-Exchange-CrossTenant-Id: 5d471751-9675-428d-917b-70f44f9630b0 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5d471751-9675-428d-917b-70f44f9630b0; Ip=[131.228.2.37]; Helo=[hybrid2.ext.net.nokia.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AMSPR07MB280 Subject: [lng-odp] [PATCH 1/5] test: l2fwd: add pktio driver print out 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" Print out pktio driver name in start up. Driver name (e.g. dpdk or netmap) helps in checking that correct pktio device started. Signed-off-by: Petri Savolainen --- test/common_plat/performance/odp_l2fwd.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) -- 2.8.1 diff --git a/test/common_plat/performance/odp_l2fwd.c b/test/common_plat/performance/odp_l2fwd.c index 54dc4cf..9864c64 100644 --- a/test/common_plat/performance/odp_l2fwd.c +++ b/test/common_plat/performance/odp_l2fwd.c @@ -603,6 +603,7 @@ static int create_pktio(const char *dev, int idx, int num_rx, int num_tx, odp_pktio_op_mode_t mode_rx; odp_pktio_op_mode_t mode_tx; pktin_mode_t in_mode = gbl_args->appl.in_mode; + odp_pktio_info_t info; odp_pktio_param_init(&pktio_param); @@ -620,8 +621,13 @@ static int create_pktio(const char *dev, int idx, int num_rx, int num_tx, return -1; } - printf("created pktio %" PRIu64 " (%s)\n", - odp_pktio_to_u64(pktio), dev); + if (odp_pktio_info(pktio, &info)) { + LOG_ERR("Error: pktio info failed %s\n", dev); + return -1; + } + + printf("created pktio %" PRIu64 ", dev: %s, drv: %s\n", + odp_pktio_to_u64(pktio), dev, info.drv_name); if (odp_pktio_capability(pktio, &capa)) { LOG_ERR("Error: capability query failed %s\n", dev); From patchwork Wed Feb 8 12:19:38 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petri Savolainen X-Patchwork-Id: 93635 Delivered-To: patch@linaro.org Received: by 10.182.3.34 with SMTP id 2csp2704882obz; Wed, 8 Feb 2017 04:30:49 -0800 (PST) X-Received: by 10.36.196.86 with SMTP id v83mr16207315itf.64.1486557049380; Wed, 08 Feb 2017 04:30:49 -0800 (PST) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id c7si3151077ioa.12.2017.02.08.04.30.49; Wed, 08 Feb 2017 04:30:49 -0800 (PST) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id D75686066A; Wed, 8 Feb 2017 12:30:48 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAD_ENC_HEADER,BAYES_00, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL, SPF_HELO_PASS, 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 DF38C634E8; Wed, 8 Feb 2017 12:24:05 +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 9A0DF634E4; Wed, 8 Feb 2017 12:23:58 +0000 (UTC) Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-ve1eur01on0129.outbound.protection.outlook.com [104.47.1.129]) by lists.linaro.org (Postfix) with ESMTPS id 1CD61634BD for ; Wed, 8 Feb 2017 12:19:55 +0000 (UTC) Received: from DB5PR07CA0005.eurprd07.prod.outlook.com (10.167.223.15) by DBXPR07MB286.eurprd07.prod.outlook.com (10.141.10.142) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.888.5; Wed, 8 Feb 2017 12:19:52 +0000 Received: from AM1FFO11FD008.protection.gbl (2a01:111:f400:7e00::181) by DB5PR07CA0005.outlook.office365.com (2603:10a6:0:2d::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.888.5 via Frontend Transport; Wed, 8 Feb 2017 12:19:52 +0000 Received-SPF: SoftFail (protection.outlook.com: domain of transitioning linaro.org discourages use of 131.228.2.35 as permitted sender) Received: from hybrid2.ext.net.nokia.com (131.228.2.35) by AM1FFO11FD008.mail.protection.outlook.com (10.174.64.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.888.7 via Frontend Transport; Wed, 8 Feb 2017 12:19:52 +0000 Received: from fihe3nok1348.nsn-intra.net (10.158.36.136) by fihe3nok1346.nsn-intra.net (10.158.36.134) with Microsoft SMTP Server (TLS) id 15.1.466.34; Wed, 8 Feb 2017 14:19:48 +0200 Received: from mailrelay.int.nokia.com (10.130.128.21) by fihe3nok1348.nsn-intra.net (10.158.36.136) with Microsoft SMTP Server (TLS) id 15.1.466.34 via Frontend Transport; Wed, 8 Feb 2017 14:19:47 +0200 Received: from fihe3nok0734.emea.nsn-net.net (localhost [127.0.0.1]) by fihe3nok0734.emea.nsn-net.net (8.14.9/8.14.5) with ESMTP id v18CJfI1027380 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 8 Feb 2017 14:19:41 +0200 Received: from 10.144.19.15 ([10.144.104.219]) by fihe3nok0734.emea.nsn-net.net (8.14.9/8.14.5) with ESMTP id v18CJf6I027358 (version=TLSv1/SSLv3 cipher=AES128-SHA256 bits=128 verify=NOT) for ; Wed, 8 Feb 2017 14:19:41 +0200 X-HPESVCS-Source-Ip: 10.144.104.219 From: Petri Savolainen To: Date: Wed, 8 Feb 2017 14:19:38 +0200 Message-ID: <1486556381-22233-3-git-send-email-petri.savolainen@linaro.org> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1486556381-22233-1-git-send-email-petri.savolainen@linaro.org> References: <1486556381-22233-1-git-send-email-petri.savolainen@linaro.org> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:131.228.2.35; IPV:NLI; CTRY:FI; EFV:NLI; SFV:NSPM; SFS:(10019020)(6009001)(7916002)(39450400003)(39840400002)(39860400002)(39850400002)(39410400002)(2980300002)(199003)(189002)(50466002)(2906002)(76176999)(50986999)(33646002)(626004)(450100001)(110136004)(189998001)(92566002)(305945005)(5660300001)(356003)(38730400002)(53936002)(48376002)(77096006)(6916009)(68736007)(6666003)(22756006)(106466001)(2351001)(47776003)(81166006)(36756003)(105596002)(5003940100001)(8936002)(81156014)(2950100002)(97736004)(8676002)(86362001)(50226002); DIR:OUT; SFP:1102; SCL:1; SRVR:DBXPR07MB286; H:hybrid2.ext.net.nokia.com; FPR:; SPF:SoftFail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; AM1FFO11FD008; 1:9qhQewtr5R7vv1MtMgfwm0AySOJv+FJo+l77JYORuTADUwLLqAAigt4QjDrC6RDmedaQG7fYkKKswYqBF6W96H4LyJ5NtBhpnd+w5U6daUrs4AEFpHZRIKz9YkyN4IkgpHu5aDCLdgVE/KJqCQOJfeXpqAkX0sifa2BzCqfvShTWCg3w38U5rs7xGs1+ID636xIGcClO3T9A0QyZjS0qceDj08S16vNRoGpFu4GDXZPki4UtIakyVD7RWQPvs2MXVRL6F1y4hyZ+U9JzTZE5PNcWj1LIIPeBVaIATZD6nW4aapp+eIVyWQyxyA4AzDni7/KalKKXMHTbZnmD1wwGscDwDKgRGF9C92a3lyMBNx1BXJy7Eg/BG94GSbQYLCRX0QqG9fMG3mxfAWcg69iYJHB43Xo+gGfy4qNQYnUMFT3F2hXwGZTzihagN4TLs8ZeZasRB9dKl1MMl2RR6PYPjkiquaQjhqAQJHw4QEi7Fcc3fi4uPdb4852p+DApoX35SsyMdS4gHUx7QjDGoFjVAw== X-MS-Office365-Filtering-Correlation-Id: 2562e0bb-42ba-4dc2-24f4-08d4501cc8bc X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001); SRVR:DBXPR07MB286; X-Microsoft-Exchange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6jwqMyLwG7833IKwoBVJx1BukazePk9uvQUlkPiUeZNb6QKvCX7ka955l2208yh8Qmpfs3Gojt5pJ0xWj8lJwduemNJkMEXZpTNaULXNFOLyshUwqPtvsJbQerXaX3TTt7feja4=; 20:I8kQsdZmvunqIiaQ80UoQvV0aR6imIUkD9a4ckvuZ3DEsPx5koyPjypy8iaWvIWxIzHnvAmYjrbNVOK3A8dhjKmbE6hPof5HekOgQoMel/cT9FG9zu/M+DFbpjTjvPymd9XuJ+PFXPTk7IraoI8GIbjG1KwafnUbvwCQk9SVr0XJeVNXVN5mMMApr9CySZFG03OR+rXs5Nq5Ra2uW0ErWOQ5VpVCR7D6hkFTvp3JlGpz51zacANIuLUt3u/CPo2p+UmVxk/pR3rx+TKP0/n7Hf//BPP4bcla0EZ+yUoVGh13wmAMZ+RKO2+dGnkSZWD/nfu3wZ3rLvQnvlrPjRH7w47TJxXUdxGf476727AEp4WMmkZwO2gbdJ9qQpqakZ7JR17jufJKgmYcrPDoUGeWRPxF20jARrur5nlciPxtj27d5gCixcsXHo+zId7Zc1k2vwoK7Vv/dGYO+PFlfYSXaoMNbuz0VQJCCWcIHBLVRSCun2P6JLOvhmJrR+ekRKBMwxIC7OrkWr2e2H/wsa4MRdhyQedyjw/tte4S8GV5dXUi40PVFp37eDmG7DdtzBXJJh/bEH6z6KkRypD0wFbxYeKKKFaxq0m7nO/LIskP6ZM= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040375)(601004)(2401047)(13018025)(8121501046)(13016025)(2017020702029)(20170203043)(5005006)(3002001)(10201501046)(6055026)(6041248)(20161123555025)(20161123562025)(20161123560025)(20161123564025)(20161123558025)(6072148); SRVR:DBXPR07MB286; BCL:0; PCL:0; RULEID:; SRVR:DBXPR07MB286; X-Microsoft-Exchange-Diagnostics: 1; DBXPR07MB286; 4:GZUYJAiu5Dpf3gnEdcHjwOnX8lBu2v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BCX+lGdVvZXHRLgTCcYXf+0Vax7QlojkC06xmU+73y5w2iwM0P+1w== X-OriginatorOrg: nokia.onmicrosoft.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Feb 2017 12:19:52.2538 (UTC) X-MS-Exchange-CrossTenant-Id: 5d471751-9675-428d-917b-70f44f9630b0 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5d471751-9675-428d-917b-70f44f9630b0; Ip=[131.228.2.35]; Helo=[hybrid2.ext.net.nokia.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBXPR07MB286 Subject: [lng-odp] [PATCH 2/5] validation: packet: print reason for suite init failure 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" Knowing the reason for suite init function failure helps in debugging. Signed-off-by: Petri Savolainen --- test/common_plat/validation/api/packet/packet.c | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) -- 2.8.1 diff --git a/test/common_plat/validation/api/packet/packet.c b/test/common_plat/validation/api/packet/packet.c index fa5206f..e3d28f6 100644 --- a/test/common_plat/validation/api/packet/packet.c +++ b/test/common_plat/validation/api/packet/packet.c @@ -110,8 +110,10 @@ int packet_suite_init(void) uint8_t data = 0; uint32_t i; - if (odp_pool_capability(&capa) < 0) + if (odp_pool_capability(&capa) < 0) { + printf("pool_capability failed\n"); return -1; + } /* Pick a typical packet size and decrement it to the single segment * limit if needed (min_seg_len maybe equal to max_len @@ -136,14 +138,17 @@ int packet_suite_init(void) params.pkt.uarea_size = sizeof(struct udata_struct); packet_pool = odp_pool_create("packet_pool", ¶ms); - if (packet_pool == ODP_POOL_INVALID) + if (packet_pool == ODP_POOL_INVALID) { + printf("pool_create failed: 1\n"); return -1; + } params.pkt.uarea_size = 0; packet_pool_no_uarea = odp_pool_create("packet_pool_no_uarea", ¶ms); if (packet_pool_no_uarea == ODP_POOL_INVALID) { odp_pool_destroy(packet_pool); + printf("pool_create failed: 2\n"); return -1; } @@ -154,6 +159,7 @@ int packet_suite_init(void) if (packet_pool_double_uarea == ODP_POOL_INVALID) { odp_pool_destroy(packet_pool_no_uarea); odp_pool_destroy(packet_pool); + printf("pool_create failed: 3\n"); return -1; } @@ -174,8 +180,10 @@ int packet_suite_init(void) } while (segmented_test_packet == ODP_PACKET_INVALID); if (odp_packet_is_valid(test_packet) == 0 || - odp_packet_is_valid(segmented_test_packet) == 0) + odp_packet_is_valid(segmented_test_packet) == 0) { + printf("packet_is_valid failed\n"); return -1; + } segmentation_supported = odp_packet_is_segmented(segmented_test_packet); @@ -187,16 +195,21 @@ int packet_suite_init(void) udat = odp_packet_user_area(test_packet); udat_size = odp_packet_user_area_size(test_packet); - if (!udat || udat_size != sizeof(struct udata_struct)) + if (!udat || udat_size != sizeof(struct udata_struct)) { + printf("packet_user_area failed: 1\n"); return -1; + } odp_pool_print(packet_pool); memcpy(udat, &test_packet_udata, sizeof(struct udata_struct)); udat = odp_packet_user_area(segmented_test_packet); udat_size = odp_packet_user_area_size(segmented_test_packet); - if (udat == NULL || udat_size != sizeof(struct udata_struct)) + if (udat == NULL || udat_size != sizeof(struct udata_struct)) { + printf("packet_user_area failed: 2\n"); return -1; + } + memcpy(udat, &test_packet_udata, sizeof(struct udata_struct)); return 0; From patchwork Wed Feb 8 12:19:39 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petri Savolainen X-Patchwork-Id: 93633 Delivered-To: patch@linaro.org Received: by 10.182.3.34 with SMTP id 2csp2704334obz; Wed, 8 Feb 2017 04:29:30 -0800 (PST) X-Received: by 10.107.56.194 with SMTP id f185mr8136175ioa.137.1486556970683; Wed, 08 Feb 2017 04:29:30 -0800 (PST) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id 198si1522774itj.113.2017.02.08.04.29.30; Wed, 08 Feb 2017 04:29:30 -0800 (PST) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 09AEA634CB; Wed, 8 Feb 2017 12:29:30 +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=-1.9 required=5.0 tests=BAD_ENC_HEADER,BAYES_00, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_PASS, 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 0B368634DB; Wed, 8 Feb 2017 12:23:48 +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 8CE7C634E0; Wed, 8 Feb 2017 12:23:42 +0000 (UTC) Received: from EUR03-DB5-obe.outbound.protection.outlook.com (mail-eopbgr40091.outbound.protection.outlook.com [40.107.4.91]) by lists.linaro.org (Postfix) with ESMTPS id B99BD634C4 for ; Wed, 8 Feb 2017 12:19:52 +0000 (UTC) Received: from AM5PR0701CA0052.eurprd07.prod.outlook.com (10.169.145.142) by AMSPR07MB277.eurprd07.prod.outlook.com (10.242.227.153) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.888.5; Wed, 8 Feb 2017 12:19:51 +0000 Received: from DB3FFO11FD040.protection.gbl (2a01:111:f400:7e04::106) by AM5PR0701CA0052.outlook.office365.com (2603:10a6:203:2::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.888.5 via Frontend Transport; Wed, 8 Feb 2017 12:19:50 +0000 Received-SPF: SoftFail (protection.outlook.com: domain of transitioning linaro.org discourages use of 131.228.2.36 as permitted sender) Received: from hybrid2.ext.net.nokia.com (131.228.2.36) by DB3FFO11FD040.mail.protection.outlook.com (10.47.217.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.888.7 via Frontend Transport; Wed, 8 Feb 2017 12:19:50 +0000 Received: from fihe3nok1348.nsn-intra.net (10.158.36.136) by fihe3nok1347.nsn-intra.net (10.158.36.135) with Microsoft SMTP Server (TLS) id 15.1.466.34; Wed, 8 Feb 2017 14:19:49 +0200 Received: from mailrelay.int.nokia.com (10.130.128.21) by fihe3nok1348.nsn-intra.net (10.158.36.136) with Microsoft SMTP Server (TLS) id 15.1.466.34 via Frontend Transport; Wed, 8 Feb 2017 14:19:48 +0200 Received: from fihe3nok0734.emea.nsn-net.net (localhost [127.0.0.1]) by fihe3nok0734.emea.nsn-net.net (8.14.9/8.14.5) with ESMTP id v18CJgxB027384 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 8 Feb 2017 14:19:42 +0200 Received: from 10.144.19.15 ([10.144.104.219]) by fihe3nok0734.emea.nsn-net.net (8.14.9/8.14.5) with ESMTP id v18CJf6J027358 (version=TLSv1/SSLv3 cipher=AES128-SHA256 bits=128 verify=NOT) for ; Wed, 8 Feb 2017 14:19:41 +0200 X-HPESVCS-Source-Ip: 10.144.104.219 From: Petri Savolainen To: Date: Wed, 8 Feb 2017 14:19:39 +0200 Message-ID: <1486556381-22233-4-git-send-email-petri.savolainen@linaro.org> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1486556381-22233-1-git-send-email-petri.savolainen@linaro.org> References: <1486556381-22233-1-git-send-email-petri.savolainen@linaro.org> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:131.228.2.36; IPV:NLI; CTRY:FI; EFV:NLI; SFV:NSPM; SFS:(10019020)(6009001)(7916002)(39450400003)(39410400002)(39840400002)(39860400002)(39850400002)(2980300002)(199003)(189002)(5660300001)(626004)(305945005)(2950100002)(47776003)(50986999)(6916009)(76176999)(48376002)(356003)(5003940100001)(110136004)(53936002)(38730400002)(189998001)(50226002)(50466002)(97736004)(36756003)(22756006)(92566002)(77096006)(68736007)(450100001)(2351001)(106466001)(105596002)(8936002)(81156014)(81166006)(86362001)(2906002)(8676002)(33646002); DIR:OUT; SFP:1102; SCL:1; SRVR:AMSPR07MB277; H:hybrid2.ext.net.nokia.com; FPR:; SPF:SoftFail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; DB3FFO11FD040; 1:L708g0poEXQOfuEbf4On2Coc0q3uUGd/OJZgYeRCOKZSc+LCXK9HgCEwOl1xbsBmku8PxwfKXNxXIsCHkD48g5ugrKw0pBCQMKT89TddOwAPaoYx2baApPNObDUJADC8ecnfBFdgTZUPltVA9PhMfG0PREbgdmYv5rfZqnAkq/gOZ2TeRCfGhzv0DFjAdPn1Ycnk+EdYtvAZ8fdMd8bE7kh4pBCqnvQPSHMtr/VCXUWDHayl1kf6ykwHEOUbdhsQZl/SAFgVKOWShO8vnvbntJxViUZW/AcjOTpEHwpWYYLTKj1wDRAA5jKEJEESloL+knxYsVw9obhZOHdn7J4cAOq1IV/54LfEZg3aT9+mxgurWlfC71XfOS4ur4GUJB9cnN1oNdAB9xCjmVR95gWq5brtupV8PFI/8zgw0Lzucj3UZjJoqlLLpxe9QgTfXKCY1j/bal+4ypuopESJK9DT6RsD1sgq71Yp58eFXLxClHHr8mu3Qc1V3O9VFC0YIMlgZ6MQIZGvGphXs0RFsjVnXg== X-MS-Office365-Filtering-Correlation-Id: 56d36da6-0af8-4ff3-628e-08d4501cc794 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001); SRVR:AMSPR07MB277; X-Microsoft-Exchange-Diagnostics: 1; AMSPR07MB277; 3:CdNjdaxL981CLc7zrT8x+FG3N1oFrAvfzow+3lmkea0ucI6JAlBjfWojHwVPYr/R5ti4JEDw02eaVaTohvdyyyblWM5ckNx/bxnwg0NqOLmNtW+hfvemvLD7Uu0JQmgG19Arw7S0OWzp+TzlTaHZB2UGJilDjQQ5+EuBnGRXkQ8dW5XEyLxF9r38iqdSgQ4QKaQrfl2S5UQAoXsouiU738yWssksqp6TRPg4UqyKfpX4iBS8hDNM80lkCaFe05D9Bivv7AgXfLivZElpGzinmcVt/Fb+w3O1bnKL9yEKXCBla1vCL8zQ4wD0Ejf6YgRxUS6AkwCLdWQKVE2mQoOYcoLCexGC3tnJoEvtJ1dELrGhyiWO9Eh13EYtAQP49N2L; 25:1DG9wSIyAt/SKlIlrm7v+xp68RbPMu0bHumu8mBSEMUhQx0s4vl7GXO9O+E1ZMAE1IelQWTqugUWr/+ZEzohivmXcXLVZdHd+d2BEKQzt2rYg/umRjCbwoJXxLlsR0YAYpFB8YhLTEF1v7V+5JASqynJ0wgq4RQx3bH7DV8rALqnwzQNydkxk0SpjFOLEya5EDTadV6KKaC9Gt90FjI6J/vN9d/5NPiO8iG+nvOMvzkygl9A8FnumsDxaCupcCIRQ0CcJBs344HSHWMgo+qrnxCjESXgx/uonZKUP4V8HFf10XOZ+49ShbNMmGZtolB+rH48L+ynuF/D7r+b+DuvVYOA65YrYnjP7RlKTXKsVWPhQGebpyoKnlZXEyEeDYiCGoPCAhawEA87+Bpg9/hRPvzG98Y1rjZgSAXg82yJFCpJgt8ADwy/7Yy/9xJ+pUSfZtVD01jfz5tj8RON3fqt8g== X-Microsoft-Exchange-Diagnostics: 1; AMSPR07MB277; 31:fWtj7UnmEoNudOwd7T6nqU8y5cSwj8/lmBFqb+zozcGjrw+zBDgJdmzkmD6g/sH6WP5zd9MokdC3ZjHGdDKopMZEGepMKcdvmmBr5vHmlYidShiKyYZ2Ib3zIOiG912KyI+DZi3nrjy1LDySGpIt1+0gC6wiWqFNw1mWpNi0fPKi3/CjLNHwtRakHkfgdXzJWiTYB5z3psNrUp96m4QqV873O0k1eeA5HQmcAQyjvZJkGwZazmrwNpWWwmiqVMTFUCl6Hlol0mwTHl8DWQR3XRYxoa9f2EomvXhuaQ5UvJY=; 20:ACZdXIOp9psbriu3HIctzM/18hTVK5q7vpfmoVC1zwn122zvMxDdXdgH6YW2E5ZHjPxlVDtVIFCwhFq6QvX3cUa/EwZ2dCx4ajm3j0wDeaUuL3/ZRgtnIzqaSnY2ag+TocDNrXdtdcY68myUgKbgd98bKfVxPmueXulh1pue7gF1KU/L2bdYcjLcDOmw02EvUfeEif1Yy0qVoe7PB7BoxK0mUj6DflxVdvdUQbRMPLuS8lU4/u2ZRcKJKcz6PjmKVxS0noBx3JdvEdVBcEJSCQkQ59wdXSgPCt5LNHibfZHngng8oFuHDkLGc0Qc27s+Q0EEaweXfhrEMinOTenj1ynlg48mphKuPHurtbvQMQa9Ujd0yJkZUfpZDQSwYyvFoy+E0CSMu/RbR8KwZWDS+Gyi3lW9CKRhTQsoAZX4zqhNmInwDA877vPpZaSF3LQ/9CldKqDE/JZZ1l2n3B2nfju15YbVMgqVccu6loyfWAOVIPSLY7RErB0Rmhr6xQ47LCZSAJGHZHCoLswuFgbVqNPVulUY6SqspuoNzVlZtwMHxHtfbZ+nnleCb35UUSD0uVSycVTK6KDQyCBPzgGt+yh9a6sCfM16y3WssPCtHmk= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040375)(601004)(2401047)(13016025)(20170203043)(8121501046)(5005006)(2017020702029)(13018025)(3002001)(10201501046)(6055026)(6041248)(20161123560025)(20161123555025)(20161123558025)(20161123564025)(20161123562025)(6072148); SRVR:AMSPR07MB277; BCL:0; PCL:0; RULEID:; SRVR:AMSPR07MB277; X-Microsoft-Exchange-Diagnostics: 1; AMSPR07MB277; 4:C5EegKJM387aY/i2ODNaytIEKuFzd/jb9wS9zsnasIEfRixmymr6fJtLV9iQ6Vn/GxCJ2BI6ZJsdEA3CvGzRtGbuC/nkMPR0+bVtgu5gDhZCtto2z784g0q8feTIC9vnwJkuCu4P376febdY3XD0PLT7O5Rr9zWKTMDjUw7x8ttZv9O3WGTkB6FMNjkBDL7+NbOd2r/SyqVLnOaUqlE6Ws3TvfmwaXgtfH+JpsoAiEJKx6riRIQKWmuD1d48XOkr+Ted7zRLLgFPGy2SGTEc0UU3Uv/VU0SP47nGgKF2h47VCegiOk8YD2KqswptvOHD5+fXzAb0OQptc5q3ErZ0jDe3SI032W5lOunyC2cT520QSGGPwvM8OfPQIeDlEHryn56EOScJXzi9k+7WVpVUSd8AllmMvVJukDCSPeM3aBMMnkwLBARvOPUDyrEc0uoUyxDshCHDarrkJqyF1OdoA4pL1g6ot02AvnSL2+3OmxTGxl8ScFF0XuLAeq8MD9Pk54fJoaSr0qBR0GIjNXrRgOQ3l1mg1kgT585c5NGp8SMerBFO7ji//f0hoHACMTM1ghj19EHJ2fvpMM9yroZfh8o80562cUMGL07W4OkRgC7nYpfZ2Avrey0ddXMIawXizp/cAg2VZWAmUCemy+cxJtRfO4FZHi1+JlRD2qTlGRaYqcbXkAQIzl8+L6D9rSv2LwDiAwG5gkVVoXwhl5NuTA== X-Forefront-PRVS: 0212BDE3BE X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; AMSPR07MB277; 23:yj9FwnXNKjT5pyUNzXM8FHIzkTb6Fk2RZLYHUExgXE?= 5aAibEJSTHH/Mhztt4HEzZNbYFTd5Mo0aJIqlJYfE33e2jygUQYS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JatLqwNsc72PN0A6g1eUjEFF0CtxjNpf0bhltCFwiqRTYTTELK6ZLqJaOHxDOAjbdXnv/liKBqSj7wszauDf1xussUS24lL+VyfJZ4OxLy5OqhreeZrvm4VniQX/5J6tQQzVL8+CX8egKrMHd0AkUZPAtMBfRzbnmJYBhXbjw6wWXqMVy8WZMVxdJiXtjDaKRUrgCEIdvxPHW72jU+Kvgut4ciqJSxsqNdM5W0KTfCmiQTBx4bxDxQRO3sEAICccbtPE9qPengF9SmLxLuNFxknwjljKAAvJg1087PTGkCC3On9R0e0JtwunUIz1ovHOLwF687WY9NWvT/s4aeHi3YjRpmNrWUHgP3jCfhpUmse3tHcvwwn6/SXhc7mdRxmHwRihFX5w==; 5:oCbVTNbCPPb89cXhzAglD65BDv4jMyu3d6nWDKROqfGf465+X8EusVFrLZI6ibKm3PkPFXKzrD7GGOUKG3a6qvQUGlvmgFDuTstABaqjwbCOcWxbvbYb/JicdBJFtASxmNS6pATc8M6nOi0NdbL02A==; 24:fOMMI4Aw8Ar3ieaDukYqQr2NqB11iKkjN110IQFE0KHaQn8hR2/6u/ltvLWukQydlIOoii2J0CEJeOhwTvMCMMSc88WyUm64hpnsD/gxnXs= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; AMSPR07MB277; 7:JppEIxka1drIq6+o0lKs1VTlcp/40KTOqVd9kttDyJKcLgOI0kJgMsFpNz0+2pk6PJRBamKZbeCgTdYM0xS9T22nRv1Eay0LlVlZEFJ22grjeSTKgtBYo7PIrofVWxDk/X2IqEU4jKgJNyFHcEqKO4QUbioHNHiNqFUbGq6dPnvyjVm0PgG1EHKMGW5JlJRA+fDvCUqU93rVe/5X0upxMTwHHYNPuUohzA4to9K4m1LFp+IlaykxZLUqu4hTEp6DcY83b9oJ7Ng/x2n+dEm9HnmnmsF1E6EzOCUJ3Lz7SYxJr78DMT5keXIONbaWpqZN0Flq54EoSsoaFpsAb7vaF4SDz/X87enusOPUaz9QQvgTxQOQ9x9TKQTNY2Nde+d+4K02Ys/tMZtNRVsaJIo3gwWBjeqgYPV6ef7RK1OFqsHSuq+ShaGcVMN2aFmlrrhgHbkTr94j9TzdcIeMGUBFYCNJscdZcBMvm/Ak+k/2duyEe2fYnxfs5B4sIpY5Asp9y45bq/PnmSJcQnOHGzffCw== X-OriginatorOrg: nokia.onmicrosoft.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Feb 2017 12:19:50.2687 (UTC) X-MS-Exchange-CrossTenant-Id: 5d471751-9675-428d-917b-70f44f9630b0 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5d471751-9675-428d-917b-70f44f9630b0; Ip=[131.228.2.36]; Helo=[hybrid2.ext.net.nokia.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AMSPR07MB277 Subject: [lng-odp] [PATCH 3/5] test: generator: various improvements 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" User may select number of worker threads (-w) or cpumask (-c) (but not both) to limit number of worker thread. Increased pool size since many threads empty the pool easily and result some threads to give up (on the first time those see pool empty). Added EXAMPLE_ERR() before abort() to make debugging easier. Signed-off-by: Petri Savolainen --- example/generator/odp_generator.c | 77 ++++++++++++++++++++++++++------------- 1 file changed, 51 insertions(+), 26 deletions(-) -- 2.8.1 diff --git a/example/generator/odp_generator.c b/example/generator/odp_generator.c index 6ac8f2d..8062d87 100644 --- a/example/generator/odp_generator.c +++ b/example/generator/odp_generator.c @@ -22,10 +22,10 @@ #include -#define MAX_WORKERS 32 /**< max number of works */ -#define SHM_PKT_POOL_SIZE (512*2048) /**< pkt pool size */ -#define SHM_PKT_POOL_BUF_SIZE 1856 /**< pkt pool buf size */ -#define DEFAULT_PKT_INTERVAL 1000 /**< interval btw each pkt */ +#define MAX_WORKERS 32 /* Max number of workers */ +#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 APPL_MODE_UDP 0 /**< UDP mode */ #define APPL_MODE_PING 1 /**< ping mode */ @@ -41,7 +41,7 @@ * Parsed command line application arguments */ typedef struct { - int cpu_count; /**< system CPU count */ + int num_workers; /**< Number of worker thread */ const char *mask; /**< CPU mask */ int if_count; /**< Number of interfaces to be used */ char **if_names; /**< Array of pointers to interface names */ @@ -383,14 +383,17 @@ static int gen_send_thread(void *arg) (unsigned int)args->appl.number) break; + pkt = ODP_PACKET_INVALID; + if (args->appl.mode == APPL_MODE_UDP) pkt = pack_udp_pkt(thr_args->pool); else if (args->appl.mode == APPL_MODE_PING) pkt = pack_icmp_pkt(thr_args->pool); - else - pkt = ODP_PACKET_INVALID; - if (!odp_packet_is_valid(pkt)) { + if (pkt == ODP_PACKET_INVALID) { + /* Thread gives up as soon as it sees the pool empty. + * Depending on pool size and transmit latency, it may + * be normal that pool gets empty sometimes. */ EXAMPLE_ERR(" [%2i] alloc_single failed\n", thr); break; } @@ -671,13 +674,17 @@ int main(int argc, char *argv[]) /* Print both system and application information */ print_info(NO_PATH(argv[0]), &args->appl); - /* Default to system CPU count unless user specified */ + /* Default to max number of workers, unless user specified number of + * workers or cpumask */ num_workers = MAX_WORKERS; - if (args->appl.cpu_count) - num_workers = args->appl.cpu_count; - num_workers = odp_cpumask_default_worker(&cpumask, num_workers); - if (args->appl.mask) { + + if (args->appl.num_workers) { + /* -w option: number of workers */ + num_workers = args->appl.num_workers; + num_workers = odp_cpumask_default_worker(&cpumask, num_workers); + } else if (args->appl.mask) { + /* -c option: cpumask */ odp_cpumask_from_str(&cpumask, args->appl.mask); num_workers = odp_cpumask_count(&cpumask); } @@ -700,9 +707,9 @@ int main(int argc, char *argv[]) /* Create packet pool */ odp_pool_param_init(¶ms); - params.pkt.seg_len = SHM_PKT_POOL_BUF_SIZE; - params.pkt.len = SHM_PKT_POOL_BUF_SIZE; - params.pkt.num = SHM_PKT_POOL_SIZE/SHM_PKT_POOL_BUF_SIZE; + params.pkt.seg_len = POOL_PKT_LEN; + params.pkt.len = POOL_PKT_LEN; + params.pkt.num = POOL_NUM_PKT; params.type = ODP_POOL_PACKET; pool = odp_pool_create("packet_pool", ¶ms); @@ -763,18 +770,24 @@ int main(int argc, char *argv[]) odp_cpumask_set(&cpu_mask, cpu_first); tq = odp_queue_create("", NULL); - if (tq == ODP_QUEUE_INVALID) + if (tq == ODP_QUEUE_INVALID) { + EXAMPLE_ERR("queue_create failed\n"); abort(); + } args->thread[1].pktio_dev = args->appl.if_names[0]; 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) + if (args->thread[1].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) + if (args->thread[1].tmo_ev == ODP_TIMEOUT_INVALID) { + EXAMPLE_ERR("timeout_alloc failed\n"); abort(); + } args->thread[1].mode = args->appl.mode; memset(&thr_params, 0, sizeof(thr_params)); @@ -786,18 +799,24 @@ int main(int argc, char *argv[]) odph_odpthreads_create(&thread_tbl[1], &cpu_mask, &thr_params); tq = odp_queue_create("", NULL); - if (tq == ODP_QUEUE_INVALID) + if (tq == ODP_QUEUE_INVALID) { + EXAMPLE_ERR("queue_create failed\n"); abort(); + } args->thread[0].pktio_dev = args->appl.if_names[0]; 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) + if (args->thread[0].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) + if (args->thread[0].tmo_ev == ODP_TIMEOUT_INVALID) { + EXAMPLE_ERR("timeout_alloc failed\n"); abort(); + } args->thread[0].mode = args->appl.mode; cpu_next = odp_cpumask_next(&cpumask, cpu_first); odp_cpumask_zero(&cpu_mask); @@ -819,17 +838,23 @@ int main(int argc, char *argv[]) args->thread[i].pktio_dev = args->appl.if_names[if_idx]; tq = odp_queue_create("", NULL); - if (tq == ODP_QUEUE_INVALID) + if (tq == ODP_QUEUE_INVALID) { + EXAMPLE_ERR("queue_create failed\n"); abort(); + } args->thread[i].pool = pool; args->thread[i].tp = tp; args->thread[i].tq = tq; args->thread[i].tim = odp_timer_alloc(tp, tq, NULL); - if (args->thread[i].tim == ODP_TIMER_INVALID) + if (args->thread[i].tim == ODP_TIMER_INVALID) { + EXAMPLE_ERR("timer_alloc failed\n"); abort(); + } args->thread[i].tmo_ev = odp_timeout_alloc(tmop); - if (args->thread[i].tmo_ev == ODP_TIMEOUT_INVALID) + if (args->thread[i].tmo_ev == ODP_TIMEOUT_INVALID) { + EXAMPLE_ERR("timeout_alloc failed\n"); abort(); + } args->thread[i].mode = args->appl.mode; if (args->appl.mode == APPL_MODE_UDP) { @@ -955,7 +980,7 @@ static void parse_args(int argc, char *argv[], appl_args_t *appl_args) switch (opt) { case 'w': - appl_args->cpu_count = atoi(optarg); + appl_args->num_workers = atoi(optarg); break; case 'c': appl_args->mask = optarg; From patchwork Wed Feb 8 12:19:40 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petri Savolainen X-Patchwork-Id: 93634 Delivered-To: patch@linaro.org Received: by 10.182.3.34 with SMTP id 2csp2704627obz; Wed, 8 Feb 2017 04:30:12 -0800 (PST) X-Received: by 10.36.250.201 with SMTP id v192mr16746239ith.43.1486557012617; Wed, 08 Feb 2017 04:30:12 -0800 (PST) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id d11si14640728ioe.165.2017.02.08.04.30.12; Wed, 08 Feb 2017 04:30:12 -0800 (PST) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 1D6F1634C8; Wed, 8 Feb 2017 12:30: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=-1.9 required=5.0 tests=BAD_ENC_HEADER,BAYES_00, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,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 8C80E634E4; Wed, 8 Feb 2017 12:24:01 +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 44E26634E1; Wed, 8 Feb 2017 12:23:50 +0000 (UTC) Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-ve1eur01on0119.outbound.protection.outlook.com [104.47.1.119]) by lists.linaro.org (Postfix) with ESMTPS id 55555634E5 for ; Wed, 8 Feb 2017 12:19:53 +0000 (UTC) Received: from DB5PR07CA0008.eurprd07.prod.outlook.com (10.167.223.18) by HE1PR07MB1628.eurprd07.prod.outlook.com (10.166.124.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.888.5; Wed, 8 Feb 2017 12:19:51 +0000 Received: from AM1FFO11FD008.protection.gbl (2a01:111:f400:7e00::126) by DB5PR07CA0008.outlook.office365.com (2603:10a6:0:2d::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.888.5 via Frontend Transport; Wed, 8 Feb 2017 12:19:51 +0000 Received-SPF: SoftFail (protection.outlook.com: domain of transitioning linaro.org discourages use of 131.228.2.35 as permitted sender) Received: from hybrid2.ext.net.nokia.com (131.228.2.35) by AM1FFO11FD008.mail.protection.outlook.com (10.174.64.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.888.7 via Frontend Transport; Wed, 8 Feb 2017 12:19:51 +0000 Received: from fihe3nok1348.nsn-intra.net (10.158.36.136) by fihe3nok1346.nsn-intra.net (10.158.36.134) with Microsoft SMTP Server (TLS) id 15.1.466.34; Wed, 8 Feb 2017 14:19:48 +0200 Received: from mailrelay.int.nokia.com (10.130.128.21) by fihe3nok1348.nsn-intra.net (10.158.36.136) with Microsoft SMTP Server (TLS) id 15.1.466.34 via Frontend Transport; Wed, 8 Feb 2017 14:19:47 +0200 Received: from fihe3nok0734.emea.nsn-net.net (localhost [127.0.0.1]) by fihe3nok0734.emea.nsn-net.net (8.14.9/8.14.5) with ESMTP id v18CJg0b027387 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 8 Feb 2017 14:19:42 +0200 Received: from 10.144.19.15 ([10.144.104.219]) by fihe3nok0734.emea.nsn-net.net (8.14.9/8.14.5) with ESMTP id v18CJf6K027358 (version=TLSv1/SSLv3 cipher=AES128-SHA256 bits=128 verify=NOT) for ; Wed, 8 Feb 2017 14:19:42 +0200 X-HPESVCS-Source-Ip: 10.144.104.219 From: Petri Savolainen To: Date: Wed, 8 Feb 2017 14:19:40 +0200 Message-ID: <1486556381-22233-5-git-send-email-petri.savolainen@linaro.org> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1486556381-22233-1-git-send-email-petri.savolainen@linaro.org> References: <1486556381-22233-1-git-send-email-petri.savolainen@linaro.org> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:131.228.2.35; IPV:NLI; CTRY:FI; EFV:NLI; SFV:NSPM; SFS:(10019020)(6009001)(7916002)(39450400003)(39850400002)(39410400002)(39860400002)(39840400002)(2980300002)(199003)(189002)(50986999)(76176999)(626004)(81156014)(305945005)(5660300001)(5003940100001)(81166006)(6306002)(356003)(68736007)(2906002)(47776003)(8676002)(77096006)(48376002)(53936002)(50466002)(189998001)(97736004)(106466001)(36756003)(2351001)(33646002)(2950100002)(450100001)(6916009)(86362001)(92566002)(50226002)(105596002)(110136004)(8936002)(22756006)(38730400002); DIR:OUT; SFP:1102; SCL:1; SRVR:HE1PR07MB1628; H:hybrid2.ext.net.nokia.com; FPR:; SPF:SoftFail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; AM1FFO11FD008; 1:zJ+rPiK14uXoMSHadAdRsyTXKsoStDNjMeKFDp234w/jTaPTohaJPscuggG/+RfnhMAvNmvt9+2sWHpUFJyp2McKIchr6UvXVoGh/Bf6SMtwd9wZifpl40lnu4HFrDIg9Vsw9vjIpYXpXgtYoFqeODg6aawuExkPmrOE98UYiDXAmO/YfpYt4zhN1MWlzd1JgEyWAIlsMnkKVPZq/jOW7R/6TZTE4SJXkZkaVIkZJ2pPu6PwvThKOqA2KPXA8/U2/rdvaKjGdtPJTyHN6oCI/haTaunrNSvmJRSiS2y4iaHSK1gFmAM1YERMulgJKMsCujaVcLC7IQZrvwe3VScNazASi3vzEtcfnXzCKQNT8ubIwQMdWmQacxmBB2kEU0SaVaOJZp5ZfiEoMLiSOTWkhbbii5s2ijSPs3JW0LI/YKYW3zceXcfSYugF2gSDNFOquZfq6AZLH3ILpbG4VCKEPO5E9bJWHNZimARg4WpIwecMuAwZJHPF64yR/g41ao0rN6KF3GD98hX2KtBOnN3sxw== X-MS-Office365-Filtering-Correlation-Id: 83a31468-dcc2-4d37-feea-08d4501cc80b X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001); SRVR:HE1PR07MB1628; X-Microsoft-Exchange-Diagnostics: 1; HE1PR07MB1628; 3:tEeSYxMuYAtjChGCLjGAjhvd6TthFclohJNVWt3kMaobDJFM1tV+fEUwWL3kx9fhzCboBOT4bENoUbTCM1QhfIVJxaFxPQX9lKJlbMYv76B1VmL6txgOPAP2x0CkDMn2lvw9VUGa2dlPKO1EZbXw+aKbhka8K3NZTdgLZ7yc/FqewlkD4llzlGCh1uWB4o0AW9PQGh78rSdnjAJh2eFFoclGP+Zi/ImjHwCKev+FzQS39AHjmM+3pGXci/C2EXvnnHGBrH9uVMJxJCedSt5RVR2/dVgwq/5e0cihazpdOj1Q8O1PwrFXZRHB7KBGcvuZLmfcP7IaG3r+STPGGOeHLNqVmYto4dKIvdgsQJc92+YscePq0ICoN5RwPX0OXBn0; 25:pTHDqneIhWADtaq/0xmBMHgDLug2jgkuYK0upyS/x087KW9S5H7p/ZPyaAlywGtlqkKApwkggaKkHEOsbJ+7wZNJNd2xXDwQcila9xQwYxax1Jn7cqwuEYayZJeGBxXPk4vjYU4YojTV6h1ZeGGddjwgpAEWjJRxAJH7GK1FUz0PqadlQTxA1OBvNJtxHzNlhbHHJrlZfoSeQ/AeoTeSrMM/p9K/++Ba+OC8ZdmgSYSbA4ohNNZXymO0b2pFdSOrgpJqJxzUIvjHjdtQ85gXYXZVGLvWdB+rcfkBgRLTChKbT4KYgREYzQU/awLQzR1QFvvnX67GJSf4qzG0x7bCabfwO2m+NnTajnvifx5BV35ypuqFwp5W1pgEN4biMwlEw3LxGmvrzZISUjI/CTKV+7+PzhOasbP4NpcGM5Qsevfjtq+OrFDZFdYGE+C4ljGaYJkQ+zAWIdyOmbKH7WCV7A== X-Microsoft-Exchange-Diagnostics: 1; HE1PR07MB1628; 31:U4blqRG1znBRCe4RG7yRCTQZ/SBjqqTWwzxUU1N7vaegXtzVq+RQw1qujA1TuUKFOCr9KjYDXD3Asp8n1q8coGujVV9y4XhVVw5ZPCVFkAkpqbfjtB34fkyK6m0vKAxnj06dqQaBL+CK5RgRhdWTT8HkK/RJ6qFZRw+iIVt2zcj3+CJDNcFVL+L9sjjNbmoYMfVnryLbHWPIl5UcfZYkA7lcHUim2jFoWHQuE6VnLnRU/ajox86zslk3e8abiv2fMKfx+L1hdlqoecA4+/P27Q==; 20:zC2JnoqhR2dSlCxo2O+NesGvs5iaowcNqFPIJh+vcGJWr+fnRUo/62kdGpc85yqkZX64Ry+xapRKe8R5HPW6BA8l4wN19Sy0oX339echpesC77b+CnI+wbiOmdHjU4eCBqxX/gygsLL4Tek5SeIY67nXW79I/ljB7WpeDmXZ2hQy3EnmceNCMijOGtQ6RzbGiUISAUm5qdpEpF89TPiul3/N/qTdncvW1JLzpz4EPfHzgvH4msWos/hNSdH+wU9JDJZBg917cgyO5ljpOWBE4pBuD3hPpWFUYsP9epW3ZH/9sCT+xjmFE/lDHakmZju53e/jneJde7ALnQVqHC2mIMGHKUEHaICCJUBuOJYWkAiJByfGeqmHfidcmBc+5NgzIlTpTCxodq0XE7XhC9GyFvw6CkEBJYoYkMf49HUywAQUSNyOpmX12M4Y/eAxM4Cxq94OQC9xL9d5j7ObaCou6fK1Sama/dIlHoHWeEU3fpyUDoEnX+iMlAxPOnBXtvYp8Tm0m1RQPuDcRNyoVxuxWDa6kTs114gUD4Ijph9bdqGYOat8WhGQS/yLnKVNWw6OFkj9L0kGRER1zqyvh9i3CwrBjmoajaVViGbSdGPczCU= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040375)(601004)(2401047)(5005006)(13016025)(13018025)(2017020702029)(20170203043)(8121501046)(3002001)(10201501046)(6055026)(6041248)(20161123562025)(20161123564025)(20161123555025)(20161123558025)(20161123560025)(6072148); SRVR:HE1PR07MB1628; BCL:0; PCL:0; RULEID:; SRVR:HE1PR07MB1628; X-Microsoft-Exchange-Diagnostics: 1; HE1PR07MB1628; 4:wqD/zDuJ/YNM07GwNkSsvVNYq6WA54mWS7hFNh76C/7ahfHL2zUNBPF+lG1YnulnrWLsujLGJbrAa0rQzyZtqPFSa+1X1bkVjQOQZNZtrXsuLnVGICAVKUdHVws38R0jZSqetzg0q9XFk5rbd/eRMPBzs8WVSaJXRingXq1f5a5N10Xx5GFpOSmxJMHRiB/RAfp35/ltgF/k//wgr0JD9ZlSlvcmCfSedmWZuLMMKw0OE/rqlc3oZGk4baf/nrkqGqvTktJQCDbXbovwgmjjKgcaw0e60nE8Q/Et7m45rKVz3rIF5ZKEz8PhYKW0o3VRht3/ROMi9sLo7vQafwuAgDk5JJ5DSd4ZSzzsBImpgeqOUEfrpfM8wGK0N7MuEUjH628VUw28TbKdBEnFfFLF8WK3AxS125oCGoQ6HzAhB7+QRUh+68FITpXWQxYl9GeAiXsTEhVAfN9SYc0XDPB339s5UiX87h+eirke0MVqoSAB9zw7DVjhFr9v3qR63BNdXhZPYfD6sejNyI18hOnxTdb/0z/zyOGjPTfnkAqoNDR9V1SuzxwRalhCAuCqUEGrWtwtpvg87K4T5abwSR7+bH6jsFAUYbOU6VtugEVM3FxtCgdBrESGOaE5VeNmNZovUosWN+8afkiapeZx4whepmBzdCOrKa/zNfVsQAhme8uSaFKRWVUyACo02NovCMTvpTeQyEPf7huCpUw7APMyQCda2PWrf6jrRicT4gd0vsE= X-Forefront-PRVS: 0212BDE3BE X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; HE1PR07MB1628; 23:i6KWwB7uvIpC3YfzjkJFlK6OxCaC5sBhC8vdoZX7u?= 0gkyhKzPwqxHla7lb7jGaMZB3zOb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nlyxGI= X-Microsoft-Exchange-Diagnostics: 1; HE1PR07MB1628; 6:2T4tbiOftq+D7d8b5qUmUXtBNwmgXk9X/ad2/cGEb7yCDA50nSu54EFYtERhpPhErSigKgxfQLpuKPOVFV8df2rmYOw6QqiRDc1R5ENZDG5s4kTPH6rwpFhNHiIcJviPAYDnO2IB1NMGEbVgGwbywdLx4MjtOp2GapwPVD8qsen0MQ4mxzl7ThyKd1YmYIp2JbkLMyPnADvbDLvlUnEwDXxcitDferJ1BwHcxSIl1g3LcGLs4qrOKlyHP8XrDnq5uOQOIWoBUuaONwDqPiMDsL2jJHUnfJxRBZCgQJ8JDd8Yp3JTl9zlYT7nj2BIJAzPR8qjHkabHBc1ioE0Mw9XJsIS+bKByKf/chuhRjyqFHOrxgFIKYVONRA6vGNHmWsU8fpWVwDlEHw7pN047lC0FjV8TdExUrYpfSLJxCHRSGw=; 5:aPb1+a+N0v73fWEvPmdGE1VPidkswt8Uok16GUl1q3Iw++hr+Okt/JmKM05ImjjNtjUTa+VDlzK5EzuKCx+mJlpdSM1X8+dek/CHIRU0wVhO7HNCmaqTHuZeM63MtangW54vIc2h37bD3aDZ4l9A7g==; 24:bjTjNkoIQpQvdUHU9xZGFyIGTGNoV486kcVEYdriODjYwpYgHOpaz6+6KHlSS/xYk6I5fBjN6+qMNssTF5HbTZNTeS4gDkumbZXLeV5dY+g= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; HE1PR07MB1628; 7:KoO32I6+wiB9Wuy58JpeE7PSbp7PxQO9PJLqJolGxcyFXz1iejpbmUSjBuEvV6thBv/xpoLRho4GaQhbZNcBAOj4Kn7b5Xk6i+JdPNP49clHS+4bGFk9Yyjz7/PJHHoNNQi1XWWrUjCMNOMTKzF1kTyGcQIX/l9L6JH81u+F3gjvjGSik2tgecTvfsOweXjho/O0dObChqTcOB7RQv331O6jcJSNGIe8Jci9i+xlmUPP/D8sCWdMEaWgiQQfXJsDDvDSNwApRxPGkbVOsBPk2QoPGKyOyvlrPfp0H5GNg5/aJK0Uw2OqxgJJLgxFw1bPh1sJC1AJTPEV4ZGMkjfur9oJ6oH5C6AcnKeZ7Cbv/gaabPOXka1zghqGK/EWvC9S8XMB6T0SbOQrfF86MxsERK9Y7XgSN198nLBMebohbzyrbGbqMGNTP0+1jgVJvO0q99uqpWJhai6FEaN2nzC3jL4Au/Qn/1I+og0Vb1OVduyt9PWxhjrjN4/0q6flaRXgdc9Pj2KFNzZ5AvXNRvim7g== X-OriginatorOrg: nokia.onmicrosoft.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Feb 2017 12:19:51.0838 (UTC) X-MS-Exchange-CrossTenant-Id: 5d471751-9675-428d-917b-70f44f9630b0 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5d471751-9675-428d-917b-70f44f9630b0; Ip=[131.228.2.35]; Helo=[hybrid2.ext.net.nokia.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR07MB1628 Subject: [lng-odp] [PATCH 4/5] test: l2fwd script: limit number of generator cpus 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" During 'make check' run generator on up to four cpus. Generator on all cpus was an overkill compared to l2fwd on two cpus. Generator and l2fwd still share cpus (on odp-linux) as cpumask_default_worker() returns the same cpumask for both. Signed-off-by: Petri Savolainen --- test/common_plat/performance/odp_l2fwd_run.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) -- 2.8.1 diff --git a/test/common_plat/performance/odp_l2fwd_run.sh b/test/common_plat/performance/odp_l2fwd_run.sh index 757cf53..dd42ede 100755 --- a/test/common_plat/performance/odp_l2fwd_run.sh +++ b/test/common_plat/performance/odp_l2fwd_run.sh @@ -66,12 +66,14 @@ run_l2fwd() exit 1 fi - #@todo: limit odp_generator to cores - #https://bugs.linaro.org/show_bug.cgi?id=1398 + # Max 4 workers + # @todo: ensure that generator and l2fwd workers are not allocated to + # the same CPUs (odp_generator${EXEEXT} --interval $FLOOD_MODE -I $IF0 \ --srcip 192.168.0.1 --dstip 192.168.0.2 \ - -m u 2>&1 > /dev/null) \ + -m u -w 4 2>&1 > /dev/null) \ 2>&1 > /dev/null & + GEN_PID=$! # this just turns off output buffering so that you still get periodic @@ -82,6 +84,8 @@ run_l2fwd() STDBUF= fi LOG=odp_l2fwd_tmp.log + + # Max 2 workers $STDBUF odp_l2fwd${EXEEXT} -i $IF1,$IF2 -m 0 -t 30 -c 2 | tee $LOG ret=$? From patchwork Wed Feb 8 12:19:41 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petri Savolainen X-Patchwork-Id: 93631 Delivered-To: patch@linaro.org Received: by 10.182.3.34 with SMTP id 2csp2703846obz; Wed, 8 Feb 2017 04:28:08 -0800 (PST) X-Received: by 10.55.72.210 with SMTP id v201mr19124803qka.145.1486556888312; Wed, 08 Feb 2017 04:28:08 -0800 (PST) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id d5si5462930qtd.297.2017.02.08.04.28.08; Wed, 08 Feb 2017 04:28:08 -0800 (PST) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id ED8C2634CC; Wed, 8 Feb 2017 12:28: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=-1.9 required=5.0 tests=BAD_ENC_HEADER,BAYES_00, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,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 80D99634C9; Wed, 8 Feb 2017 12:23:11 +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 2A272634C9; Wed, 8 Feb 2017 12:23:06 +0000 (UTC) Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-db5eur01on0120.outbound.protection.outlook.com [104.47.2.120]) by lists.linaro.org (Postfix) with ESMTPS id 54372634C1 for ; Wed, 8 Feb 2017 12:19:50 +0000 (UTC) Received: from VI1PR07CA0109.eurprd07.prod.outlook.com (10.165.229.163) by AMSPR07MB280.eurprd07.prod.outlook.com (10.242.227.156) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.888.5; Wed, 8 Feb 2017 12:19:48 +0000 Received: from AM1FFO11FD018.protection.gbl (2a01:111:f400:7e00::111) by VI1PR07CA0109.outlook.office365.com (2a01:111:e400:7a52::35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.888.5 via Frontend Transport; Wed, 8 Feb 2017 12:19:48 +0000 Received-SPF: SoftFail (protection.outlook.com: domain of transitioning linaro.org discourages use of 131.228.2.37 as permitted sender) Received: from hybrid2.ext.net.nokia.com (131.228.2.37) by AM1FFO11FD018.mail.protection.outlook.com (10.174.64.207) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.888.7 via Frontend Transport; Wed, 8 Feb 2017 12:19:48 +0000 Received: from fihe3nok1348.nsn-intra.net (10.158.36.136) by fihe3nok1348.nsn-intra.net (10.158.36.136) with Microsoft SMTP Server (TLS) id 15.1.466.34; Wed, 8 Feb 2017 14:19:47 +0200 Received: from mailrelay.int.nokia.com (10.130.128.21) by fihe3nok1348.nsn-intra.net (10.158.36.136) with Microsoft SMTP Server (TLS) id 15.1.466.34 via Frontend Transport; Wed, 8 Feb 2017 14:19:47 +0200 Received: from fihe3nok0734.emea.nsn-net.net (localhost [127.0.0.1]) by fihe3nok0734.emea.nsn-net.net (8.14.9/8.14.5) with ESMTP id v18CJgtV027390 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 8 Feb 2017 14:19:42 +0200 Received: from 10.144.19.15 ([10.144.104.219]) by fihe3nok0734.emea.nsn-net.net (8.14.9/8.14.5) with ESMTP id v18CJf6L027358 (version=TLSv1/SSLv3 cipher=AES128-SHA256 bits=128 verify=NOT) for ; Wed, 8 Feb 2017 14:19:42 +0200 X-HPESVCS-Source-Ip: 10.144.104.219 From: Petri Savolainen To: Date: Wed, 8 Feb 2017 14:19:41 +0200 Message-ID: <1486556381-22233-6-git-send-email-petri.savolainen@linaro.org> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1486556381-22233-1-git-send-email-petri.savolainen@linaro.org> References: <1486556381-22233-1-git-send-email-petri.savolainen@linaro.org> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:131.228.2.37; IPV:NLI; CTRY:FI; EFV:NLI; SFV:NSPM; SFS:(10019020)(6009001)(7916002)(39450400003)(39840400002)(39410400002)(39860400002)(39850400002)(2980300002)(199003)(189002)(2906002)(92566002)(97736004)(626004)(8936002)(5660300001)(86362001)(50226002)(50986999)(2351001)(36756003)(81166006)(47776003)(450100001)(53936002)(106466001)(8676002)(356003)(81156014)(5003940100001)(105596002)(2950100002)(33646002)(68736007)(48376002)(189998001)(305945005)(6916009)(110136004)(50466002)(22756006)(76176999)(77096006)(38730400002); DIR:OUT; SFP:1102; SCL:1; SRVR:AMSPR07MB280; H:hybrid2.ext.net.nokia.com; FPR:; SPF:SoftFail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; AM1FFO11FD018; 1:YSQ1Vb2kDp3AcrzcA6QqIkxM/ipTf+tyBES42xwrlu8obJzyq5JNWyYIz3lN8m8VXDVaKrX6gJ6MNZJUw+tbYDz+LNeydPAJUMprwxm2V9JQ2fPKMYTIA5NPoyEYcQEpuGg7xzBm8B4scAnCmHibaLuanQYAKtQKXktvsAJYMdpPPf/z8DqT1DIOIVC1FGefAbNxEFw1Kmc5W7F+cr5Y503fGF8bTPYh70MU8AadxnmUT7XuCpoItbBtrYRZ3XAOJPNOqYJZ9QwZJOqDNE72lsP61QNyKoBCZgoph7o9NEMtgge0V+XiDZNm3mOF5j95d7LA5zPrXE/A/nLAP8gVwxoe98L0EGPoEIS31Djdp9TlFjQXqS2nvbMwg80JaKgLi2/0KRh1kexdryrQ9XviMYwLLyGDtug8WOEI4F9zlznbEWKSkBe3hVtwzkpqDEcFJVPDaxwYsFAMG6s0pKg0hxorig6PSX4tWwaFw5tCsGSSOjTB2e1Rr692oSAaNKomooR2hIORoR16uNZAg7q7Bw== X-MS-Office365-Filtering-Correlation-Id: 8b2d7b7f-abdf-4c82-6528-08d4501cc636 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001); SRVR:AMSPR07MB280; X-Microsoft-Exchange-Diagnostics: 1; AMSPR07MB280; 3:G5kLXy/rDQiWWNat7xBFMf+M+hWhWihxGGRMxsBuazPhlqN4T0bM/yz0G1EoKYHHE23/4FVmNs0e6HhKMmpkBrF/C/6CgmQCvbrmYO3hzmNZZwuiGXXI54KL6iRuXdimqST/gYCzBZALW6FKjQI9iRZmScB30jOCY2EuArvsdN/yXSGLs9r+CAaCLoC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zw3KYfn4zvb1/4cvyRgrCHcIpzsXe1rCUhnzyEIVmKyuOSdhbgqGm3O2hglRbewdJaxTMm5vQatbCZ7IHhw+nwXuXRFIE9u5p2Jq8Pdw54+K4LteZVKSWlS3NnDE/YO4fZv5OKLw8DYIar0kWGZI3nLB5vvL2o7t/P8GmVkj8If378zo11HdRP12/flqBxHt5z9HYUy1zJmR8kAcrpjf5QeKyUqDs2PXIPAFs6YQSWm2rO4A8pyqQcfkJwKx6Csab1ACErH7C2eXBvgH1Hb0O45kOj2AigjJUvZFQNBGPLZZPiX8PM3w2vTiEUFDanRaNd/OnIYXkypv1YrV8OUH4G4qSpzkd1FbeMfd5Y/+7AQLmhPpUBenwt3Vc3K2aLNMhJq6BC3DGG1U0Pqr5lalE7b+xH2VNQ5mFU1YjpTiLPbpUa3JsmfIDVS+VCx0dXADZcutRxycQE+6ZYYhLc4v5IBT54o4spXDsdfVd9MU6sQm91YRfFnOx+myzgOz0N2fSqkiqqFl3WXJ/HOKznWArQ= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040375)(601004)(2401047)(8121501046)(13016025)(13018025)(5005006)(20170203043)(2017020702029)(3002001)(10201501046)(6055026)(6041248)(20161123564025)(20161123555025)(20161123562025)(20161123560025)(20161123558025)(6072148); SRVR:AMSPR07MB280; BCL:0; PCL:0; RULEID:; SRVR:AMSPR07MB280; X-Microsoft-Exchange-Diagnostics: 1; AMSPR07MB280; 4:4Hn/fDQCudBP0uOUmwAlhXdCUyvx3OfVOGnePV2dUsb2iuI6SgG9dCOch4TqlN2G0ck+5ZCZfZESIRC9W5gRoIZKeffwN3yoWX5Ox4InPA4v8lPCU8le6TZKvtHAPGAEyS3QVwl6MnE87uUSFt2LQqejivHqV98zIqrLGhQNWMYQHQ64lA/4j77OvPtrD90keJOOiIhGY81o0Fl87+fTFpQ+l36BSLzuDlJJJf5OPAieL0O8js7LNkES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ZH9usWRCZxiOd+Ir+/q2SkViWs1NDASw+hvOXXGAAuJResexfD6uDdcwTDNS0GUP1cc+935XYbZlkSGoWDMALrJjSVX2hQvyB48C6i8GvN+Gdew1LL9t+9g==; 24:2vhbF4NqWERgU2Ccy/DgOVrP9CNahYQhIWX0mEustGqBheNY/aqMuIcRENtzf8Y8VxMJlMaFJqoWwK/pRIxeXie6pliKJHI2xJ+Dv4oKMR0= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; AMSPR07MB280; 7:ngKBsg+odrsPGXnx8YT855i/19Tv7h1LkWLyDIPRtfV7dKRYpZ36A8i+5gPpt60Vrb/wRUTTDDpJecN6vdckog/Bm9pJm/U3sa0IC2KNu0kWqN94G6ela6edfb9MFIf7A6zEUs1XzMNLprLJtYLmgO0t+6D2+ugPnBPDjQPGjz+QxrJ45CbL+jEWPR2loxeXBO/HYsSCUQQ+FWAgxz0U+HXhwgUI+9B0PcYauZR+NewCXKjT6FpLDN1WXWBM6zGd932ZogQ+DVRtjp48/Al+BGg9cV99XKku7QBAsjA0jaMJlhkJeg7z8YbwpPM7VCQb9JyjxiM26V5LkkyRDdjYoX+Zrg11lBkzRXcFmxto873A5bGJ2APzYbN0ZNZKwpyKhgJLHjZ261M9wgM8GSvhMorwwpO7DW6IHVg6bANYCypkF3IjKgAt1IvRItnM2JWWskLimr91PRth8salvD4qGuElI3G4LhTwBUGiMvWUZSIGnzDgIgfeNHqOhoKfiMoBwkMjKXYozPEO3OKMKWgqHg== X-OriginatorOrg: nokia.onmicrosoft.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Feb 2017 12:19:48.0062 (UTC) X-MS-Exchange-CrossTenant-Id: 5d471751-9675-428d-917b-70f44f9630b0 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5d471751-9675-428d-917b-70f44f9630b0; Ip=[131.228.2.37]; Helo=[hybrid2.ext.net.nokia.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AMSPR07MB280 Subject: [lng-odp] [PATCH 5/5] test: l2fwd: use packet_data 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" Since l2fwd can assume that all packets are Ethernet. Also odp_packet_data() points to the first byte of the frame directly after packet input. Signed-off-by: Petri Savolainen --- test/common_plat/performance/odp_l2fwd.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) -- 2.8.1 diff --git a/test/common_plat/performance/odp_l2fwd.c b/test/common_plat/performance/odp_l2fwd.c index 9864c64..8f5c5e1 100644 --- a/test/common_plat/performance/odp_l2fwd.c +++ b/test/common_plat/performance/odp_l2fwd.c @@ -241,15 +241,13 @@ static inline void fill_eth_addrs(odp_packet_t pkt_tbl[], odp_packet_prefetch(pkt, 0, ODPH_ETHHDR_LEN); - if (odp_packet_has_eth(pkt)) { - eth = (odph_ethhdr_t *)odp_packet_l2_ptr(pkt, NULL); + eth = odp_packet_data(pkt); - if (gbl_args->appl.src_change) - eth->src = gbl_args->port_eth_addr[dst_port]; + if (gbl_args->appl.src_change) + eth->src = gbl_args->port_eth_addr[dst_port]; - if (gbl_args->appl.dst_change) - eth->dst = gbl_args->dst_eth_addr[dst_port]; - } + if (gbl_args->appl.dst_change) + eth->dst = gbl_args->dst_eth_addr[dst_port]; } }