Message ID | 1475495356-4038-4-git-send-email-matias.elo@nokia.com |
---|---|
State | Accepted |
Commit | 3c78ee3f2c9274ebfd6b51e1ec203218b792fc9b |
Headers | show
Delivered-To: patch@linaro.org Received: by 10.140.106.72 with SMTP id d66csp1622179qgf; Mon, 3 Oct 2016 04:50:07 -0700 (PDT) X-Received: by 10.55.10.15 with SMTP id 15mr5105541qkk.99.1475495407497; Mon, 03 Oct 2016 04:50:07 -0700 (PDT) Return-Path: <lng-odp-bounces@lists.linaro.org> Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id p144si9107167qke.61.2016.10.03.04.50.07; Mon, 03 Oct 2016 04:50:07 -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 3006C60D3D; Mon, 3 Oct 2016 11:50: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_H3, RCVD_IN_MSPIKE_WL, 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 B893F60CEC; Mon, 3 Oct 2016 11:50: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 E584760D35; Mon, 3 Oct 2016 11:49:58 +0000 (UTC) Received: from EUR02-HE1-obe.outbound.protection.outlook.com (mail-eopbgr10096.outbound.protection.outlook.com [40.107.1.96]) by lists.linaro.org (Postfix) with ESMTPS id 8FBEF609D0 for <lng-odp@lists.linaro.org>; Mon, 3 Oct 2016 11:49:36 +0000 (UTC) Received: from DB4PR07CA016.eurprd07.prod.outlook.com (10.242.229.26) by AM2PR07MB0852.eurprd07.prod.outlook.com (10.161.71.150) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.649.16; Mon, 3 Oct 2016 11:49:34 +0000 Received: from DB3FFO11FD006.protection.gbl (2a01:111:f400:7e04::167) by DB4PR07CA016.outlook.office365.com (2a01:111:e400:9828::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.649.16 via Frontend Transport; Mon, 3 Oct 2016 11:49:34 +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 DB3FFO11FD006.mail.protection.outlook.com (10.47.216.95) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.629.5 via Frontend Transport; Mon, 3 Oct 2016 11:49:34 +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 u93BnHj2001144 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for <lng-odp@lists.linaro.org>; Mon, 3 Oct 2016 14:49:17 +0300 Received: from 10.144.19.15 ([10.144.104.92]) by fihe3nok0735.emea.nsn-net.net (8.14.9/8.14.5) with ESMTP id u93BnHPV001104 (version=TLSv1/SSLv3 cipher=AES128-SHA256 bits=128 verify=NOT) for <lng-odp@lists.linaro.org>; Mon, 3 Oct 2016 14:49:17 +0300 X-HPESVCS-Source-Ip: 10.144.104.92 From: Matias Elo <matias.elo@nokia.com> To: <lng-odp@lists.linaro.org> Date: Mon, 3 Oct 2016 14:49:15 +0300 Message-ID: <1475495356-4038-4-git-send-email-matias.elo@nokia.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1475495356-4038-1-git-send-email-matias.elo@nokia.com> References: <1475495356-4038-1-git-send-email-matias.elo@nokia.com> 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)(189002)(199003)(2351001)(68736007)(107886002)(92566002)(97736004)(7846002)(305945005)(189998001)(586003)(8676002)(229853001)(8936002)(110136003)(81166006)(81156014)(356003)(450100001)(47776003)(50226002)(87936001)(77096005)(106466001)(76176999)(50986999)(2950100002)(42882006)(6916009)(50466002)(5003940100001)(626004)(2906002)(48376002)(33646002)(19580405001)(5660300001)(36756003)(19580395003)(11100500001)(32563001); DIR:OUT; SFP:1102; SCL:1; SRVR:AM2PR07MB0852; H:fihe3nok0735.emea.nsn-net.net; FPR:; SPF:Pass; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; DB3FFO11FD006; 1:pMONfHjhlqJaBNfLSarHipIfttwChuXqHvbsTDJGa0Z9kd0Ucrc4FyPhQ+XqTvnRWimjTTwK0+/q7NO+jhOZISWEOJ365elTOEskCS7jvTMKI1V95eZ0pE9+NUjtnvM5ibcdKT63DwbmAwFMHggRY1ngVr8Yyv0xq7U2VVJqkhVW0kx+6gHPzIn3aPyjZEZZvj+om7f0E1vcj0E6ES69iQqBrie9CZepjdcI5g3GTPDGLxmQcJLYmGDOsSuv7LXu76WCdHDgeaiKqohfRarawzhEU+bO0qlZ7yZRPpEXu42HzBm/OmccOjromz4WwbCBS6/CB+I0S3PU8B/UM2S5RLmXyJS2QvloowfdpjsVf6TSrRf8CpO52IOTeYx2Cjk/XoTdEYCUrpjtdM2XQvVcCG18hbNrE1oU+g9FCBqbb5WSUid6EbG3iRL9SLM3HYiebzjLTRgF3frYPHbiiu7fqv+KwjHJljsQNQaetF2VX7Y= MIME-Version: 1.0 Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: 2cc4c420-a2e9-4570-89b2-08d3eb835889 X-Microsoft-Exchange-Diagnostics: 1; AM2PR07MB0852; 2:MNyNX7L2Z+C3wQH1i0FXK3zrPFIMC4QIorTRIehV9/m4hbi24v3v3mYrxmpa81788RyfQTbl23LI5UEliHVsopQCYu4aDrR7PmGe0ckOdCvwtVB8o8e7He1h1wg7WLxR5cMmC4nT/8EbClsqkoYfWkSwpBHLHrq9qMm6MGfiHBzzkOfkbmDXC+6h++irxoOBF6EiJCzmVFGW93ha5HhpAQ==; 3:GGk57b8KNw2kpc2E91KTfUkvzATHgmF2KltF9+H5j5soNr7Jz4pTj12jMduncTZI6xkvJC4F5pTgo25raPW4jg1Axtl0jhB6AQujV5zkPpmbzlKiiA1TrsOQxTzVqhujzdOYw6NLvNU4NvSjjEYXgjyP+QU52MKG3cRDDF54pEMAba+RCrA9GOi26AvG8PrwCvmjE3LIweClXHygXPmuoJyl6i4SV5X2iSSKoPlbP5TyT2k2/glVJytj4Li3qXrEup6g6pCKoltkBLaESbJVFn4C8MntbTyoNf7xtgAAgRI=; 25:RJPF2Gw2/ZxdXYf/JV0ogi904GVndxP4+dPUsukBKRDxA6Id3w6pBwbyvbpKpY0pWqQ4hOCsKLWKxWIuUhewP03I2O+hyM6TO0o2tBtf3wrtsk8kiwuV78BiOVBlkKNiO7ZQE56uuzBVfASMk2liOib9Knk8YNpeQgRmw+pDWyMUKBHGZqgwHMOpmr0LHjWzopfX8RBQ1p8Q8K44i9htAoaTtld4vfAFr0h6fhD9w8n8M9QyfrzBS+Hpd6PsbiloAJGflogcUlqJ7Pe2yJbvhjEjLWZpp+QJ0az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BBjJL1l7EgYWx4lRhVJPInm48PWu7w2x9TgCZS3CjUO/NbscPLht03mTTRrhjIrP2gx+5lxsBVE= X-Microsoft-Antispam-PRVS: <AM2PR07MB085247B7EB00BAFC040C04F887C20@AM2PR07MB0852.eurprd07.prod.outlook.com> X-Exchange-Antispam-Report-Test: UriScan:(82608151540597); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040176)(601004)(2401047)(13018025)(13016025)(8121501046)(5005006)(10201501046)(3002001)(6055026); SRVR:AM2PR07MB0852; BCL:0; PCL:0; RULEID:; SRVR:AM2PR07MB0852; X-Microsoft-Exchange-Diagnostics: 1; AM2PR07MB0852; 4:GDu3TR0P3hgeheghdZWpdlFK2NRJXD74t+vfsiHzQqqhtx7lDvqZB5O/I2blnYkzxR/S2zRZZ9csqJllmKa8s9YnDIPRc17d6JtZCvjI9NP0TQ4fQTC6iUsYIr7QhNF9+V/EA+mbZSZDz5JxD+cKGUfzd0hW0GTjGn2eVN1H19IePY7xqGCTtoJVoaUoKsuRNFSUfqLnpaQe2kvtRBgoA1X033+m7YrCb6q+n9GigjcxoA5U89kbjOYRZJf8x7gGyLL/rZFu2z5EgsyQtnKkROhC0snNWqCrn/AGImJWTFBrpCOVcDynAjtW/dIMgKbSof8Tt8fYUiHS4Kgl0TOQurqsAgo5hogePEpbGzcEOkguNc8I2BxuL1PjlC0Gq0SKXECPpKqSBcOh0G7Yp6H6m3UWZyVD0GypiqCAtBIJ3FBRgZ2kMdkEsIMMOlImBCfv3m22GsgT+o6UPbC8URb/Kf5qaU/ISIzdBWqan6EXUo8+eME+DU9cDCBhRgYH2nu0 X-Forefront-PRVS: 008421A8FF X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; AM2PR07MB0852; 23:lu5WNR81oAeKXbL+9yGthfCtcXcREILWvxdyPL74D?= =?us-ascii?Q?T+KqCJt53I+JqfPnLwhpzfYSEVvlgvkEh4i0znWYaigAYKbSCKtx+DN8ZqON?= =?us-ascii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6GYAVsX7ksSaF0oA5C/DahK0K3SDFcj5pDQHflaHHhHPBYlfBW4vrY2seJSU3KymR8LvdO+w4f2ueBLyYSOHbQl0Xq/iBhWDpeO7Q6l2M3HfN5hrcdsAnpbbJv2fY7LLVL4e45RuUhitnhQTPQeI+DAFrGyccgFjTJ4bOfFtZiySw90/1cmbUTEiHiu6wfdCUpDLhaS4Q+F3XQENSBy4q9wCZ/3UUv/LuAX8+Nh1XDrp58Cn3FFMw2boTis/f69mVw== X-OriginatorOrg: nokia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Oct 2016 11:49:34.5995 (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: AM2PR07MB0852 X-Topics: patch Subject: [lng-odp] [PATCH v3 4/5] example: l3fwd: remove unnecessary output arguments X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "The OpenDataPlane \(ODP\) List" <lng-odp.lists.linaro.org> List-Unsubscribe: <https://lists.linaro.org/mailman/options/lng-odp>, <mailto:lng-odp-request@lists.linaro.org?subject=unsubscribe> List-Archive: <http://lists.linaro.org/pipermail/lng-odp/> List-Post: <mailto:lng-odp@lists.linaro.org> List-Help: <mailto:lng-odp-request@lists.linaro.org?subject=help> List-Subscribe: <https://lists.linaro.org/mailman/listinfo/lng-odp>, <mailto:lng-odp-request@lists.linaro.org?subject=subscribe> Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" <lng-odp-bounces@lists.linaro.org> |
diff --git a/example/l3fwd/odp_l3fwd.c b/example/l3fwd/odp_l3fwd.c index df412af..0f8068f 100644 --- a/example/l3fwd/odp_l3fwd.c +++ b/example/l3fwd/odp_l3fwd.c @@ -182,10 +182,9 @@ static int l3fwd_pkt_hash(odp_packet_t pkt, int sif) odph_ethhdr_t *eth; odph_udphdr_t *udp; odph_ipv4hdr_t *ip; - uint32_t len; int dif; - ip = odp_packet_l3_ptr(pkt, &len); + ip = odp_packet_l3_ptr(pkt, NULL); key.dst_ip = odp_be_to_cpu_32(ip->dst_addr); key.src_ip = odp_be_to_cpu_32(ip->src_addr); key.proto = ip->proto; @@ -222,11 +221,10 @@ static int l3fwd_pkt_lpm(odp_packet_t pkt, int sif) { odph_ipv4hdr_t *ip; odph_ethhdr_t *eth; - uint32_t len; int dif; int ret; - ip = odp_packet_l3_ptr(pkt, &len); + ip = odp_packet_l3_ptr(pkt, NULL); ipv4_dec_ttl_csum_update(ip); eth = odp_packet_l2_ptr(pkt, NULL);
There is no need to save the number of data bytes remaining in the segment when calling odp_packet_l3_ptr(). Signed-off-by: Matias Elo <matias.elo@nokia.com> --- example/l3fwd/odp_l3fwd.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) -- 2.7.4