Message ID | 1474010009-7435-4-git-send-email-matias.elo@nokia.com |
---|---|
State | Superseded |
Headers | show
Delivered-To: patch@linaro.org Received: by 10.140.106.72 with SMTP id d66csp346953qgf; Fri, 16 Sep 2016 00:14:44 -0700 (PDT) X-Received: by 10.55.111.2 with SMTP id k2mr14343381qkc.188.1474010084295; Fri, 16 Sep 2016 00:14:44 -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 r57si1315406qtr.135.2016.09.16.00.14.43; Fri, 16 Sep 2016 00:14:44 -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 C9DCC61945; Fri, 16 Sep 2016 07:14:43 +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 1949C60C4E; Fri, 16 Sep 2016 07:14: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 D840A60C8E; Fri, 16 Sep 2016 07:14:27 +0000 (UTC) Received: from EUR03-VE1-obe.outbound.protection.outlook.com (mail-eopbgr50132.outbound.protection.outlook.com [40.107.5.132]) by lists.linaro.org (Postfix) with ESMTPS id 94E2460C4B for <lng-odp@lists.linaro.org>; Fri, 16 Sep 2016 07:13:55 +0000 (UTC) Received: from AM2PR07CA0022.eurprd07.prod.outlook.com (10.163.24.160) by HE1PR0701MB1996.eurprd07.prod.outlook.com (10.167.189.146) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.629.8; Fri, 16 Sep 2016 07:13:53 +0000 Received: from AM1FFO11FD002.protection.gbl (2a01:111:f400:7e00::163) by AM2PR07CA0022.outlook.office365.com (2a01:111:e400:8448::32) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id 15.1.629.8 via Frontend Transport; Fri, 16 Sep 2016 07:13:53 +0000 Received-SPF: Pass (protection.outlook.com: domain of nokia.com designates 131.228.2.240 as permitted sender) receiver=protection.outlook.com; client-ip=131.228.2.240; helo=fihe3nok0734.emea.nsn-net.net; Received: from fihe3nok0734.emea.nsn-net.net (131.228.2.240) by AM1FFO11FD002.mail.protection.outlook.com (10.174.64.84) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.619.6 via Frontend Transport; Fri, 16 Sep 2016 07:13:53 +0000 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 u8G7DXYV017485 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for <lng-odp@lists.linaro.org>; Fri, 16 Sep 2016 10:13:33 +0300 Received: from 10.144.19.15 ([10.144.104.92]) by fihe3nok0734.emea.nsn-net.net (8.14.9/8.14.5) with ESMTP id u8G7DXpp017473 (version=TLSv1/SSLv3 cipher=AES128-SHA256 bits=128 verify=NOT) for <lng-odp@lists.linaro.org>; Fri, 16 Sep 2016 10:13:33 +0300 X-HPESVCS-Source-Ip: 10.144.104.92 From: Matias Elo <matias.elo@nokia.com> To: <lng-odp@lists.linaro.org> Date: Fri, 16 Sep 2016 10:13:28 +0300 Message-ID: <1474010009-7435-4-git-send-email-matias.elo@nokia.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1474010009-7435-1-git-send-email-matias.elo@nokia.com> References: <1474010009-7435-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.240; IPV:NLI; CTRY:FI; EFV:NLI; SFV:NSPM; SFS:(10019020)(6009001)(7916002)(2980300002)(438002)(189002)(199003)(450100001)(11100500001)(305945005)(36756003)(47776003)(16796002)(2950100001)(87936001)(356003)(7846002)(2906002)(77096005)(110136003)(2351001)(229853001)(106466001)(33646002)(8936002)(107886002)(8676002)(81166006)(50986999)(189998001)(5660300001)(81156014)(76176999)(92566002)(19580405001)(586003)(68736007)(50226002)(50466002)(48376002)(626004)(5003940100001)(97736004)(19580395003)(32563001)(42882005); DIR:OUT; SFP:1102; SCL:1; SRVR:HE1PR0701MB1996; H:fihe3nok0734.emea.nsn-net.net; FPR:; SPF:Pass; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; AM1FFO11FD002; 1:bFclE23yBbT+0KEbhzW5ZDjB+F5OxQdtystT0FgK6TuDdhiws2DMdp5CmmY6HFaDBvwXX5kBlW9ZRRe0X90wz8mvQgt9nCA6r2oucvH79mRtcViRakjcnB9hnimu1xOKY0rQhPwcUb547ipC+dKWs6+T+e6H5CkqFB7HscP6jH4G76OTPh313wpxdYK6vD+Qrkdc5WpBejWp7h7+KYohhQfoVd604gRShflNdcuaxDhzWukNgjBg01lAZvRbP77RDh4t8f5IAek661tSUF3gG1pEZWv8r9/2BQr7sxz2qjeNG5/rzwkVkI6fhE6o79B7auu1/My6dq9KpdFkMCBA4bfjDuZLE8nq04E8Lfkm7HyUkdJYVppCPwwKRs5UZXI8so+Q1o087HdYV6mWietWIbpEAwpeLpO02VBv7wSNH9/8Hl3XIaurWxdC4xEsdVVd3J+ACmnrs17qAyFSLoAlnZV9C1mvufZRQaOFAZDpuyA= MIME-Version: 1.0 Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: cc779520-629f-4540-990c-08d3de010411 X-Microsoft-Exchange-Diagnostics: 1; HE1PR0701MB1996; 2:zKLsqgMxEDc2zlb+wvMwoDMJhPPOfz3VgzVb+R+qbLbN1s8l0GOBHuiglxqb6CDHm7905Wt3MUOEFVbBxPYkcetS7RKg4A7R4wAG+mBW0edTir/15ZUFRvLyDZ+2mKfL8bENLaw9TKLVlKDCvFo/hJ4IFG/EqSt4+wuQZI9Hc8p4LkL2va+qe3CQ4ecA9DPZ; 3:nFoBAGC/bnMa76UGbe2MdLKHZFgs7Z1vOVz7ouXAoaS0V7H0Er7gsVRM/DkzLYlRnRdnVwu015SplxeXdPSGgHDuTpNac6Mgxy1iMiVIBDTzxh5WwW+JM/OB2dZS5ChkzdpnpgjNIwyyDjT3OoZ1ltijXf9/Ppx70H4rcyCIskqg0ZzkeDPpIbMqUk9aAt7mCbkyg29bbKxQLIYzFDAUe9KYMfPkPSYCptpYE03bAsWbn4HWtRlt5Y5mS6hTqW8GIsQzwdYPhAnFErZoDVmvlg== X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(8251501002); SRVR:HE1PR0701MB1996; X-Microsoft-Exchange-Diagnostics: 1; HE1PR0701MB1996; 25:TD0rECVMLTmbzEEHrjjcmMZZLGR4zBRo8nErOTJjf+7TC03GzPeHCe1+PDIo+TUFguOtUWAclJqU6qD+yInqOLJ2wg+E3XsfSgnV2/pNEFV4shIYFk5lqK8kI9tCJ0QA5rYsUji/Cjv/93Zl8ZHQz7HO8hlnZLPkq4R1kWK9WgT1livQH4p9w/xLxRBxU/qNN7OGhtOzpkhaxMLmEOWoJ+gMU7tRiP2emF98Uz00vJ8dPzRrPOsK2Zs2eZ9e6ZfC7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wOAntNyg5SgJjLVIYRmPKslq4hcdA4rCLh2KVOLnfSwBDZn6ABLch+BW1tw7glv6UtNjzmHA7rcAvfqiB8bls/Iu2o8YZCd5L/7wpptgQj6ZPPrpBMzvh/nPYk8/RACnDiQnomRx7H492u2fBevSwNefn53DFE+itPZIiu/nqWHSb/OBs0BlTOEv8+fcvUfWduP2t2ZGU6wSpUyMB4XyTmiAE7DjIk+SflcWnwjTQLoMj7zK/caPDYWoifAYGtRYOPOL0XLWIz+prb3kDL0pYk4OSpB4NbR8mhaFugWklF1L49V6U= X-Microsoft-Antispam-PRVS: <HE1PR0701MB1996CA3F577B022016AEAFCE87F30@HE1PR0701MB1996.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)(8121501046)(5005006)(13016025)(13018025)(3002001)(10201501046)(6055026); SRVR:HE1PR0701MB1996; BCL:0; PCL:0; RULEID:; SRVR:HE1PR0701MB1996; X-Microsoft-Exchange-Diagnostics: 1; HE1PR0701MB1996; 4:Fdba3HL/rXsLTJl1vJ585TxoRsVxFMrYes+kpDdqd0qKyhROdmKhZHeGcNO7uuSG7DgXWlYbxZLS58spKWLPqWDGdj0HIIuq3LBcKDWiswENJvZMKSVZKUmFq0MWfeiUMzNT9NhOH3oBy165q9rBXy1rjfnaJr9nDmOEY607IP0RErrzpLaV3fsc/ESQ/PmP1FCgnVn98vgC5NkZZB0CD5def3cGZKkPlA96ocrzhknfXLnhZTZntyviZAerglyOx38g7xNXsYbWa2drUlBdjgbWZFemIrJxwgUX+ceMlKV2KwNfh/X3Y9IIU/AdGYN4b3tDmQnuQBPXrmL8971vXjwYbeI/0L7m2NJuLYE6ibRT0x4cPLnSrC/5I3rxfC2g+1+Hqa5s7TW/8ZcZO+T2dCK+zxBd4t1Qhv7J3WWGJkwTVI/H3MG/xoLlQEw5Ovwk4+E8k1ZO0N4aBnFenAngjAP7Yf/2hYPfX+27yDFQ60I= X-Forefront-PRVS: 0067A8BA2A X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; HE1PR0701MB1996; 23:eQop7jh9wl5Dj1v173Of/OoNJBCuIf193C0uEru?= =?us-ascii?Q?jqMxAn3fZlwA9e0CYkzJoZpACZPPr5ZZZocicmd/iIlZK4YwtaWODAchgvBQ?= =?us-ascii?Q?gv99jNzcd3nDxUghEhjQAXIi9oeR6fkCGv8/bQ0LDEUd62D/g0pffAi+5fKw?= =?us-ascii?Q?ywArUllZFosvLVH74i3KMp3gZG8yIvA9aYMI14EsEwn195g0mE1qy9CpBHHs?= =?us-ascii?Q?IQc38EtGGLBy/fKvNPxmCHKMvXvIKABbzkddxBuiTuW5aFdGtFFeddA7VucJ?= =?us-ascii?Q?yBYjYRmGKdfPUHUPJ8l6CguQOXeeMTrFb4FeO62J/vpLJFy91BHo7UMj34/a?= =?us-ascii?Q?k53oZNxkaAU01V7B5tdY/ea64+rcOkTGHujG7J16Yg61lEOw3hZGUkCFyJH2?= =?us-ascii?Q?GxpnVoIKMTNQMn0Gw4gtHDGoP1Rbtvebr5gId6AnZ2FCWwTeA61q7slj6Z1k?= =?us-ascii?Q?bNKxQCrtyMKLVbYLjMU1++PIZpiWMkhNBjyCuftud/MuvdbPpwPxCHEDVOpk?= =?us-ascii?Q?5I4pacW33KYapsym7Es6xawBMhddQ0z48KbF0ovO43iYBUGfWQXl5XaoQu0a?= =?us-ascii?Q?VVvODN+41o0UREFEl3Bipl4x1sCp5oDYlGHru/wt2+rWyKBAhuCAJ/TiPxgR?= =?us-ascii?Q?7Rdx5nwREHh/93i8cpkUG9co89ZdHmipsyOCM8r7ZYZeyoVhjGDICKkBFbYP?= =?us-ascii?Q?BdVyyTJTuaHUb85VoPhehGEUtDpbaIeu58QIV8X4+HjqVsskskkssjYBKZtR?= =?us-ascii?Q?yexCLXEn62dSplL9Q4bTiYsiAzkAltVoulfHFBgXZz4aOUnX3srNMPpGLlTD?= =?us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eCSBETOA7Nb/KeJkYKVCIdL9t7bDTy4xhAKBiGkQ0s1vsirgEEEZj8hrp4NxwgYSwie7wOjnxsRTh38V6C8GXjRmCgZhJWNoHHaKTJBC+dCRmkGrjfksLyi1P+E5Vclq7pSt1hgzjyEN/X5Cq/kVGa9qFwvmM1eIuRCVwplsSdHNSK0uATDFkK3eGq8AWJ2Q89NBHZxKXcagkJQ4OG8p7rnDbCchFL6h6TUqdo2ja0VYGJU6I9t SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: nokia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Sep 2016 07:13:53.2407 (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.240]; Helo=[fihe3nok0734.emea.nsn-net.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR0701MB1996 X-Topics: patch Subject: [lng-odp] [PATCH v2 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 f767fb4..9e29e1b 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