From patchwork Thu Oct 27 13:42:08 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Elo, Matias \(Nokia - FI/Espoo\)" X-Patchwork-Id: 79658 Delivered-To: patch@linaro.org Received: by 10.140.97.247 with SMTP id m110csp630386qge; Thu, 27 Oct 2016 06:42:34 -0700 (PDT) X-Received: by 10.159.35.68 with SMTP id 62mr5913871uae.4.1477575754347; Thu, 27 Oct 2016 06:42:34 -0700 (PDT) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id b31si3144363uab.101.2016.10.27.06.42.31; Thu, 27 Oct 2016 06:42:34 -0700 (PDT) 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=fail (p=NONE dis=NONE) header.from=nokia.com Received: by lists.linaro.org (Postfix, from userid 109) id 60B05617D0; Thu, 27 Oct 2016 13:42:31 +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 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 0A05660DDE; Thu, 27 Oct 2016 13:42:23 +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 E852A60DB7; Thu, 27 Oct 2016 13:42:17 +0000 (UTC) Received: from EUR03-DB5-obe.outbound.protection.outlook.com (mail-eopbgr40136.outbound.protection.outlook.com [40.107.4.136]) by lists.linaro.org (Postfix) with ESMTPS id 1B4F260DB7 for ; Thu, 27 Oct 2016 13:42:14 +0000 (UTC) Received: from AM5PR0701CA0021.eurprd07.prod.outlook.com (10.168.161.31) by HE1PR0701MB2251.eurprd07.prod.outlook.com (10.168.36.146) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.679.5; Thu, 27 Oct 2016 13:42:12 +0000 Received: from DB3FFO11FD048.protection.gbl (2a01:111:f400:7e04::167) by AM5PR0701CA0021.outlook.office365.com (2603:10a6:203:51::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.707.1 via Frontend Transport; Thu, 27 Oct 2016 13:42:12 +0000 Received-SPF: Pass (protection.outlook.com: domain of nokia.com designates 131.228.2.241 as permitted sender) receiver=protection.outlook.com; client-ip=131.228.2.241; helo=fihe3nok0735.emea.nsn-net.net; Received: from fihe3nok0735.emea.nsn-net.net (131.228.2.241) by DB3FFO11FD048.mail.protection.outlook.com (10.47.217.79) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.679.5 via Frontend Transport; Thu, 27 Oct 2016 13:42:12 +0000 Received: from fihe3nok0735.emea.nsn-net.net (localhost [127.0.0.1]) by fihe3nok0735.emea.nsn-net.net (8.14.9/8.14.5) with ESMTP id u9RDg8pc021390 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 27 Oct 2016 16:42:08 +0300 Received: from 10.144.19.15 ([10.145.147.156]) by fihe3nok0735.emea.nsn-net.net (8.14.9/8.14.5) with ESMTP id u9RDg8e5021381 (version=TLSv1/SSLv3 cipher=AES128-SHA256 bits=128 verify=NOT) for ; Thu, 27 Oct 2016 16:42:08 +0300 X-HPESVCS-Source-Ip: 10.145.147.156 From: Matias Elo To: Date: Thu, 27 Oct 2016 16:42:08 +0300 Message-ID: <1477575728-24290-1-git-send-email-matias.elo@nokia.com> X-Mailer: git-send-email 2.7.4 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:131.228.2.241; IPV:NLI; CTRY:FI; EFV:NLI; SFV:NSPM; SFS:(10019020)(6009001)(7916002)(2980300002)(438002)(199003)(189002)(107886002)(305945005)(11100500001)(189998001)(7846002)(229853001)(2351001)(586003)(92566002)(2906002)(42882006)(6916009)(106466001)(50466002)(356003)(110136003)(5003940100001)(87936001)(97736004)(8936002)(626004)(47776003)(50226002)(5660300001)(68736007)(36756003)(81156014)(81166006)(33646002)(450100001)(19580395003)(50986999)(19580405001)(48376002)(8676002)(15975445007)(77096005)(32563001); DIR:OUT; SFP:1102; SCL:1; SRVR:HE1PR0701MB2251; H:fihe3nok0735.emea.nsn-net.net; FPR:; SPF:Pass; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; DB3FFO11FD048; 1:tJGD9atJLNuv4oRZmltsrVbG71vNxuavXIqwFtUaOU7iovAf3UQka+5NsJ+Zg2oliDdR4+Kvrmz2BFA0vugVELviqwwMUh/RE17q/GzdZFQc+wl7jWn0WIj8Ydwh3c1/209jm4kyM6TNa/FZWDPK01VZzveMJP6kFVcoYeSidtxUIj/cs4lTWFGLRNrglOOJHr3wN1cuyXl+PGipQbooxeVlQq+8Eziq2jtdGduE980J8+or8NBxhVszylRSzJ7VfhQu/XIqDzXm2hW1KkxwceLpSgG8loWh3zwUSOlCqt50PxfPes79V3JbhI0Zu6lTmmBFggrnxaC5+7iPxcfnSBMP/QmcLCAgb6Rx30huUliUhm9fTZ9ql0vl/vrZA6cRKyMba242TqHs3gYlXSw/cfhAlduMCRMbL9ur43R4HeBYSG19/qn8H2XoNZkXxooJCHS+/eUVtLA8aTVtDXWVGOxyGChqhO+NtZWeWlkf8w2FbmJxeKwhV6GELgsAlG9f MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: 5133e09e-38f9-4cd3-a9bc-08d3fe6f0e3b X-Microsoft-Exchange-Diagnostics: 1; HE1PR0701MB2251; 2:+7meO/E6lxshuD399ubb2koNIxNOXnD7UYzdFHPo+6MTcCCu7PE+i2UupYQ8NK2EJI9xbdPjVFF4af3S63qOgGTnXFNv6u3PY3Di9bhpKKJW4DVW63S1vrOqEKLevjQpnklqWfyPB4KGBT6tPyVmLNSiQtp7LwgJTbw/FjYLDDfMRIBbTrDvpDPVQqw27PpLSueRjA1RpTlMbtRQZWOC0Q==; 3:Yj8zPPNToaeipTINiWmvVhQEDSLUlYvnHeZp1Yrw0rZoHH7LY65KkRTzWOawmeWavL7gQXJraL0FLgY9sldSgutsy9+Z16qV9/38GjDEho+C81ni+5FFa+4nOX07Et0FTnzlPAfSeCQzC4+vYJ17mFVvLJtqdoGa59hyvFGlLawCI+5HWz7Myp52D2DnlEESJGQIHTq3IZh3Lo7NTwZPrOpM8pk8lY8oAdXL+KY4bGkRtagnEU2VDJRjPHh8EO0+GgaS/wynGT/n/zAs3/PPBMdYLQs+Fkp/JoIT76bDUH4=; 25:A1tjUv4xNik+SALoa/OIwj1KCZpyGrCxb5z6rB6oDATQmuMly2Sts8rciGau4MAWsttZbNrvrOxr53s6qJF8y4YnAxsSCLO0MKHI5pzMNxjQ2Il7apy6mIAUe1eBgnakixAYWqM8t56NaYh/QB5VWroiYiyw1JSWZx41eGiWny8pAGTrGqxvQWXAspQBlxK9kwEwtIicA6QVCD+J8KjxEUVg3ZRk/N0dzJTg2BIAcWCIbRuekOSt3nAGVrt8HunHYi1bi9t+PIEPVrUqEc17EmFYkuaDuBC0tXkp5cDv5/yPK+q2pbN3e/5j/1wjDcELwKmvWndDfvQfENqOSv3Cgx1iohX5FCTtIzZI785dtVRrTm/BQuc2A62xOjSbKa5PScnwEeAWNXqoC3xfD8k2g4RCFQKaYRa167/l9GpEzZiz9nEvhUeSxAox6O0051uk X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(8251501002); SRVR:HE1PR0701MB2251; X-Microsoft-Exchange-Diagnostics: 1; HE1PR0701MB2251; 31:i7ccnqXHkdPjDHK9vjcZFPyKyabvd2Xkz8DmvRV3GX7Mq3Ezl29rqAYK8OVSnsJXXwdWfTKNvviQq468lvp+0ZDWx08KcJvad5K7ctRjnfQgcEDMSA55UeXsPGdo5XNC47eCBCg6PFgX9MTh9/y1wpSllbUlrWmjvgZ1GC5U2XbJ1D4F0bmxFmC6iDhqn5/wvacZupwMUDenPNNjvIUpFQAp9SY9XI6kPxHUCiOHuYW6hEKKoSWwI8fElptroranzt3rn0rxaQBeqWHCnTpfIQ==; 20:Zp+qThEGGpQMa8P3fB4ZBjugvMTg/c17rybYXEV4d2hupf8C0uUQUlKyeYvfmi7xGeHhv3Xz1ET1b/3AtnOwjvWGIj3fRt3WKjmB9LyRlQvdPnFwGBfPkoxuI/ibqP+vMJKJaeghJxXPqPbldtHLs04VtVdyS75xsxiXFB6cdzANWcTpxjKmJUgrb7BP2P16SU7264ahtWxEw895zVLot5lAYXPJTTLiplx+KOow8bRh/tDU1PuSBuLNhO7v2nfJohBV51x0DYm+0euptg/eh4JvW1tVLAfuBGvQEIC2e5ANNdOudCgSpAOfCMLzFhHylCg56eHe+0I8TYgr+zvJwxl85/hyQiR6pOssLR6Y35Y8EEwfSONzMZoVwTera41xrJ9L1yhcDe30Ni/Ez15vH4yC+2WVUY8ZrIm5wKnR4UO/UpBQydCHLjkUWuc1ZEGoBXuu/566PdKy9qufgiEqF4xG/f97+CtpqYSU9R1jXsqNXF0DftAWXpaJf5XLjIYBF9teMo/trY3z++iJUF9osStSA/sJTAQbc80oERzKfWd94zxtC8C2McHVC7ZycOb3zjU8b90rC78AFR+mVmvSB6oW5f+IUO7Lu2XJtt3AQB4= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(82608151540597); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040176)(601004)(2401047)(5005006)(8121501046)(13016025)(13018025)(10201501046)(3002001)(6055026); SRVR:HE1PR0701MB2251; BCL:0; PCL:0; RULEID:; SRVR:HE1PR0701MB2251; X-Microsoft-Exchange-Diagnostics: 1; HE1PR0701MB2251; 4:FGWVkWEd02xD6yKm0gpWkCc9rZuvaHWegCHnGZKZp6UV6P9fxOsyrdr+PTPsxBnD4ixHI2bDEOjM38DMRq35iijE5AxWEb7STexi3bMk57ox8DkOl0U8BbMhWKs+VUPG8sML1vs0TqKByfWRk5lE4/yXBSfuolJPmYLCRP1kF2JvWYuqKqAkl7Qcqc8XccmdQUEz+HovHJK6Gx9TbaCbwPyieZlFZHdpFtlMMki60oaK6ageqNh8pGoo5rFupwhXjRwIlaQ899XL5PqcAfPnjidteeQQ5h/ZSjcfsB2+6b0MFocirkch+Yx4ZcFomsDlF5H/RB1aGKc+01bd8p5oTLHmXS7a8B78pKicQNnTMus8vZDmf4eF46RVKdwfJil2xhQOkIblzr7yFSR9uy7RZE9i8yVPX5sEUsrbTtpuEz3FTDgrby3IOvsi/1WYwowczoxJSYifvHGsSfOn2zS6K1uswEgAuJ2HkFiBxJ5uys5SxU9/PI2UN4aJChS/U/nZ X-Forefront-PRVS: 0108A997B2 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; HE1PR0701MB2251; 23:AEW2O8616O7+ZHUg2Ced20d9Pz9F0zKNHGPqrp2?= =?us-ascii?Q?sQrAccixJSTmrDtU7TKfO7QgYjUZKfmFnkhYdFAzjTnenIg6eR7/8RgHNFhA?= =?us-ascii?Q?qIRcDj0psP38h+tQs2e2jrGfNSg3combUa4H+NIDGNi/DPmZpP6qiFORH0wQ?= =?us-ascii?Q?lJeM1XU9zM2nE8SVetDJnStCBisx7eZwRkJ393ODaJxT8EgJpiLXpgQZfKBA?= =?us-ascii?Q?M2Fy6DOG1DWKhGbsuit1xb7Bx+zYH2F+B54ICWA4d3NyPIlGQhdXRa2Xt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ft-Exchange-Diagnostics: 1; HE1PR0701MB2251; 6:ctOxbYLu2MZTwsKmwslfOA4F5ufsSdqsgVObS8U8yaAbRPUlS0k027Euez7zeLzYR2nHODEXjY+Wm4EVZKE5jKO3Ijcsww2PxntFXcoG+AcbHaoU/fSra8H4eB9KJWupZQGXjsv02WvvQKK1BxuL+mUsjhlXoZ8NPBZJ4rKrepIRIL62e5ZNYrcrWVupeCvudEJIS2NYM38gbeIalnU0T+xBtoqxuXWTdM/o4pA8Icmyoh/bX+ovUVcxi493NLFQ2/Y99g+tEIaeoUAhkyuJyS3VonKvLOVh5iu93Dl3dPBr8dVEUEdnG82TfCDR8Rp6oFvcL9RuP3EqjDLNfVoK3YC1EnCg50N+N/xLgN27cSY=; 5:H+DEkWvWuhFeEuC5cyHBcSEU/3xqUPirukAOn8TgKm8s+4orUpovUMcba1vbkiKDzpUvf6TyjUwOdaLG+vul3mVA1InhrlHtJR6CeG/2gtWABvYSagSixoVHYzrAMDjUWCQDkqDLD4rXRAYnNT9NTA==; 24:l5yDV4b1q6chQ0dyOtwRKDvCIw5cCVnTazJEYFJa6yvIq2rcvRha6t/35UEZTXAMHzJVazOuME/uij6FN/qiZraxJtVFEy1sLcKzA8ONBsc= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; HE1PR0701MB2251; 7:XP+1Lgr0gpc9WURY+nCO+Ph+YdWdIwijiXfR3OdpftPKCw60YCHqJdl8XfHOQNQSY3B+ro/MMSj8vSnq6eXHNK4H2D6WSOcZLPMp3hrZQUmKXxFqeTDE7PbXpxD1lkl4YrKN00tzH6eaAhemNiqsMGkAJ9GzrO9yM63KWcWx37NPAjcVPlZzT994WYSDQvJryrHh2dnD6cTIatF4wc+RAnHxP3BBBhXCysFsYgNc7gV963BmzogrAU9hkz2cyw4DapRiIefKuikroDTggEYTmZGB57NtLUp6REN9tF2WjRcq4JOZqcN90Z2hi0pjUFpBCpWoXi8kcoZavX7br4wuxkZ7Tie4BbAW0jdfVwNr9mA= X-OriginatorOrg: nokia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Oct 2016 13:42:12.0959 (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.241]; Helo=[fihe3nok0735.emea.nsn-net.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR0701MB2251 X-Topics: patch Subject: [lng-odp] [PATCH] example: l3fwd: prevent possible use of uninitialised variables 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" Fixes bug https://bugs.linaro.org/show_bug.cgi?id=2564 Signed-off-by: Matias Elo --- example/l3fwd/odp_l3fwd.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) -- 2.7.4 Reviewed-by: Bill Fischofer diff --git a/example/l3fwd/odp_l3fwd.c b/example/l3fwd/odp_l3fwd.c index fa1b299..8919bd3 100644 --- a/example/l3fwd/odp_l3fwd.c +++ b/example/l3fwd/odp_l3fwd.c @@ -309,7 +309,9 @@ static int run_worker(void *arg) } } - num_pktio = thr_arg->nb_pktio; + if (num_pktio == 0) + LOG_ABORT("No pktio devices found\n"); + if_idx = input_ifs[pktio]; inq = input_queues[pktio];