From patchwork Wed Mar 1 09:27:48 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petri Savolainen X-Patchwork-Id: 94685 Delivered-To: patch@linaro.org Received: by 10.140.20.113 with SMTP id 104csp1700882qgi; Wed, 1 Mar 2017 01:28:10 -0800 (PST) X-Received: by 10.200.40.242 with SMTP id j47mr8637578qtj.24.1488360490864; Wed, 01 Mar 2017 01:28:10 -0800 (PST) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id h56si3809671qta.166.2017.03.01.01.28.10; Wed, 01 Mar 2017 01:28:10 -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 5523963C91; Wed, 1 Mar 2017 09:28:10 +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 93871637B7; Wed, 1 Mar 2017 09:28: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 6CE15637B8; Wed, 1 Mar 2017 09:28:03 +0000 (UTC) Received: from EUR02-AM5-obe.outbound.protection.outlook.com (mail-eopbgr00104.outbound.protection.outlook.com [40.107.0.104]) by lists.linaro.org (Postfix) with ESMTPS id 3E457637B4 for ; Wed, 1 Mar 2017 09:28:02 +0000 (UTC) Received: from DB6PR0701CA0028.eurprd07.prod.outlook.com (10.168.7.166) by DB6PR0701MB2918.eurprd07.prod.outlook.com (10.168.83.147) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.947.2; Wed, 1 Mar 2017 09:28:00 +0000 Received: from AM5EUR03FT014.eop-EUR03.prod.protection.outlook.com (2a01:111:f400:7e08::204) by DB6PR0701CA0028.outlook.office365.com (2603:10a6:4:3::38) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.947.2 via Frontend Transport; Wed, 1 Mar 2017 09:28:00 +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 AM5EUR03FT014.mail.protection.outlook.com (10.152.16.130) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.933.11 via Frontend Transport; Wed, 1 Mar 2017 09:28:00 +0000 Received: from fihe3nok1349.nsn-intra.net (10.158.36.137) by fihe3nok1346.nsn-intra.net (10.158.36.134) with Microsoft SMTP Server (TLS) id 15.1.466.34; Wed, 1 Mar 2017 11:27:59 +0200 Received: from mailrelay.int.nokia.com (10.130.128.21) by fihe3nok1349.nsn-intra.net (10.158.36.137) with Microsoft SMTP Server (TLS) id 15.1.466.34 via Frontend Transport; Wed, 1 Mar 2017 11:27:59 +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 v219Rnwd001344 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 1 Mar 2017 11:27:49 +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 v219Rno7001338 (version=TLSv1/SSLv3 cipher=AES128-SHA256 bits=128 verify=NOT) for ; Wed, 1 Mar 2017 11:27:49 +0200 X-HPESVCS-Source-Ip: 10.144.104.219 From: Petri Savolainen To: Date: Wed, 1 Mar 2017 11:27:48 +0200 Message-ID: <1488360469-25958-1-git-send-email-petri.savolainen@linaro.org> X-Mailer: git-send-email 2.8.1 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)(39840400002)(39860400002)(39850400002)(39410400002)(39450400003)(2980300002)(189002)(199003)(9170700003)(50986999)(189998001)(53936002)(33646002)(305945005)(105596002)(2351001)(50466002)(626004)(86362001)(38730400002)(47776003)(356003)(110136004)(2906002)(5003940100001)(36756003)(22756006)(77096006)(92566002)(6916009)(81166006)(8676002)(106466001)(8936002)(50226002)(5660300001)(450100001); DIR:OUT; SFP:1102; SCL:1; SRVR:DB6PR0701MB2918; H:hybrid2.ext.net.nokia.com; FPR:; SPF:SoftFail; MLV:sfv; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; AM5EUR03FT014; 1:6wJHz77NcfjQF2WuZ3Ngcdg25XEg7bf9aCH6IvNgLzw1jTYoVy0o60gju8T5D7LdKkOQY1URHZoOHCt2xrpsrmg5DW2+HSftcxHvhjgs8+yUhjkEoq9J6DWyuL1FGeqyb7EmObdCHcMRFqXWFnOJ5EYhdZbgy3UmDEv24EeelFjo+RG4mqXowrLqNRK1KW7+48aK+ugFemy9IhDq0KiVri3t9kb2BJUdaMSHX4nXcW/4YX36BNjnz4q8Ntkl/LH686dBrPEWQzeOgmP/JpmBxGah88i/5IZx6wIzBSOcO0N7aYYiX5wAXVlMURXBLuti7M58pDEXdkn6d2WAIQZQOVYERjjdro9k+EoWT1jmLkK5riNDj7zUoIjFJ4/y50yrOk4aTLc4/LtFiND1oEC/8zm0TP6FQw83AhQzSXPi2nJuKVCglx/DnBfta9TbovotL9wm6jtGBrr4cQHb11xtlg== X-MS-Office365-Filtering-Correlation-Id: 394e8dd4-4fbd-4062-0c95-08d460854147 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001); SRVR:DB6PR0701MB2918; X-Microsoft-Exchange-Diagnostics: 1; DB6PR0701MB2918; 3:SI10Y7M0yDAa2o32l9qAPSJzqtgPxi+2wThk7CJ6hIe6OoVxvso0+ThSQY7hOt6qK27O559e+umyk30TUzDegrFz2tPWFE4zM3Kp3WcSDc3LHh0AtfhIyZdslEbWbH7szcN4yAYtW+/vPP+D7yLHuTsg1qyt7lzYwPmPF3MRYaKiDGsYIxHcNNuGwud2JZjZvl3DE5XR8YMb+hX10EM9YIEA2s6j5KzJrXvMfHHLH4tB+usilr0p7nJzbaDIhjrn77AD61AYKUogN3Yg0dwoTAKnfUuOjRYBUVlc3zFeEt92SRFk+XEV8AhlZSXwvVUWHNS9acOIa5HG8WaRsbmbggV47PojJr8zpNkw2o8uKH2HADPRNxl6RCHKRD9Aiq2L; 25:MMYnv06X7qMVV3VvoekcehmRzeZhxpG6TAMTvXetrxvL5hp+MblhCkt29ZyX+2n4Xz59DnP/hVrlRAvH1wEUZb1BOh2ggDiuUTENEq+3BRAgjNfUhmanOuPQL1EO3EgOfOmp705j8OPRYBw3izHKhMgXDPYq1JyIr3NtLvtT+baXuQMRDcmoTxC3Gmhvt8TmVXW8XvqQJ4rzfA3dhHPd/ITmDHUNYfnISuC99oqYUCk8Gwsnui2mSDXxLksspY3hFqTC7NL6TxwJClnFW0SOXBZeDicjtEhcVwJhRLvX4JF/Pjdj6Hi0aWWu0VEgQbVIvNGnvJ6f4rkgja+2i/H84FnU32dscpNdZOUgsKLZjV5xf/vTAvIGq4tSyOC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-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040375)(601004)(2401047)(13016025)(13018025)(8121501046)(5005006)(3002001)(10201501046)(6055026)(6041248)(20161123558025)(20161123562025)(20161123560025)(20161123564025)(20161123555025)(6072148); SRVR:DB6PR0701MB2918; BCL:0; PCL:0; RULEID:; SRVR:DB6PR0701MB2918; X-Microsoft-Exchange-Diagnostics: 1; DB6PR0701MB2918; 4:4Y3JZC1hk8JufQGMnP8Dluilg54itBgyhMiuhLMpIbFLU/NLoceI1b5R3CELmjO7nnrYFKGyJkfpkmxG42onVt3qR/H8Sk4ps693ExQtg1HMJhSrzW/bTJ3esob2mKxBuG0KOEyWdpv3tY7xYTrguYe1s7wjt2EjmR1LGlMvksb3c24hMqw3y9LwegE4QwRVohLRqkWxYAVTrkISOFWiRK+Zl78zu3DfxlZuE2lWayz6rh3/vNOodbNLVwuTxCtFScLwmibAOSGh5pGe7iQpJJCAG2kSCGJvM8UU2geq5GE8BlZ9Tnae9XkxqtgiiRmt1pJDy61a/DCjsGfEk6e9muSB+QJ8bc3BB1KSqXzKeodcw1dxZJOZD6aLbPC+rmMZ9OWLo++rApT4gyVMMgWVJjGK+GT9vnPE0+eT62MOD7nYOThNODw+bhvQ1L7b2QiAQCbPhqBehAH+hvYmZ/Jjm06uf/Z4+Vmkl0v6KiYjXCE0SwDHUoTQcYkx+tr2AvfQnT1sITN70DIbz4j9Ro8UsDKSKYwB1TlL0OjtPJ/6nEU78pvvTpnL5fQ5oERWplBW5O3Q8wDucVcfLiAwPJ9bcasF+5XPCBF0gS4sQcp4PHwxjGBN97t29OVcb5ZGJLyYhSEStgP1EKV9DgsRPN7bmlTNc/ALYA1TnWu8DmWylrk= X-Forefront-PRVS: 0233768B38 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DB6PR0701MB2918; 23:vSfY7440KdZ/yWmI1lgwj0uQpF5uFipcUDdQjt3?= WEO4QV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Qf8UUXcyHIzqGhpuw3sylTPjeUoPufV2b1AXLmLvC1h0RGk4mc41rNIlqRT3NdF7Me/FEov2HuiQiFLN84YjXERps7Pu/k2wuTjN9xR5ivAs7JYqJmfp5q/LSfFbWbYzDZVcq3u19RXf4NyIDiW8RmBDryUA4xELtWvfIBfjDF8JaAakbLkp9Tc/iz5yQL159fFTAsXpWWp26MZEktOUU77G0hhDHd0hvquPrMcSbO9wbqnHXhMlRbOQUShZHY7RMndAwIdK/JNpeCmz0weQYu/8W9IZ7jKOHpgMqzxq+ZA4tJoE6UPw6ByMuMJMP4cIFxhupHK05qOu6YyZv7+7zeP5OQuEBUwtpKDr37sb9sVbVk=; 5:U3zcDOKT/+A5zrLuaysvaZRR3vzMr4Gd6VFRxnQ9cGYTfAvLzS8qV+D4aBr0FU5gh7zcSulas6gSIxzM//TR87fjgOYnre30+yTr4yE2g0GP95BdmvjixmUSCypwTbsVFKVYsg0hjTLVOx29SFszZw==; 24:RiKg1y1raxDCTPty2oYU6cJjpzMlsgGnlPpO4lneVKVi2YwtkwoPGfvyY48iRSzv7fYqUiZSnxWxhSXEgPZo/DiE+Ba4QWXc8KddCOpi16g= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; DB6PR0701MB2918; 7:DhM6TPxHWkkIIEPrGGjX0ZWhXPFagz2PlmK1pgH0p+0kpyCA3AQW6dbFOP7z3sdDHory+IqXuBT34MQccgLIuP2A2jgM3VucqFXiwEaYXAjqGFmJF8RGWGDawi6JfdHhlnfyRsfzoWHMamhlFDJNf3+TM0afNjzPe0pHS7UOqLTt0nDnhIUoGc6XzdZng1PvsUxBbWrRhdX9JXzruwp8vYMNlSr/L3rlEQQXV8gU+7bMzalMjFSjCtoGtjhSobO0kJ/fA/WCggSWUSWxnIfmMwzCOw7C1h+RdVIirRwL3oIzslK+3EXphubGblOJ7tW7KnDXKaHFegYi7oT6kl7YMg== X-OriginatorOrg: nokia.onmicrosoft.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Mar 2017 09:28:00.7393 (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: DB6PR0701MB2918 Subject: [lng-odp] [PATCH v2 1/2] linux-gen: ipc: use hdr to handle conversion function 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" Use conversion function instead of casting. Signed-off-by: Petri Savolainen --- platform/linux-generic/include/odp_packet_internal.h | 5 +++++ platform/linux-generic/odp_packet.c | 5 ----- platform/linux-generic/pktio/ipc.c | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) -- 2.8.1 diff --git a/platform/linux-generic/include/odp_packet_internal.h b/platform/linux-generic/include/odp_packet_internal.h index 4f844d1..0a9f177 100644 --- a/platform/linux-generic/include/odp_packet_internal.h +++ b/platform/linux-generic/include/odp_packet_internal.h @@ -163,6 +163,11 @@ static inline odp_packet_hdr_t *odp_packet_hdr(odp_packet_t pkt) return (odp_packet_hdr_t *)(uintptr_t)pkt; } +static inline odp_packet_t packet_handle(odp_packet_hdr_t *pkt_hdr) +{ + return (odp_packet_t)pkt_hdr; +} + static inline void copy_packet_parser_metadata(odp_packet_hdr_t *src_hdr, odp_packet_hdr_t *dst_hdr) { diff --git a/platform/linux-generic/odp_packet.c b/platform/linux-generic/odp_packet.c index c21f635..3019418 100644 --- a/platform/linux-generic/odp_packet.c +++ b/platform/linux-generic/odp_packet.c @@ -48,11 +48,6 @@ static inline odp_packet_hdr_t *packet_hdr(odp_packet_t pkt) return (odp_packet_hdr_t *)(uintptr_t)pkt; } -static inline odp_packet_t packet_handle(odp_packet_hdr_t *pkt_hdr) -{ - return (odp_packet_t)pkt_hdr; -} - static inline odp_buffer_t buffer_handle(odp_packet_hdr_t *pkt_hdr) { return pkt_hdr->buf_hdr.handle.handle; diff --git a/platform/linux-generic/pktio/ipc.c b/platform/linux-generic/pktio/ipc.c index 377f20e..06175e5 100644 --- a/platform/linux-generic/pktio/ipc.c +++ b/platform/linux-generic/pktio/ipc.c @@ -409,7 +409,7 @@ static void _ipc_free_ring_packets(pktio_entry_t *pktio_entry, _ring_t *r) void *mbase = pktio_entry->s.ipc.pool_mdata_base; phdr = (void *)((uint8_t *)mbase + offsets[i]); - pkt = (odp_packet_t)phdr->buf_hdr.handle.handle; + pkt = packet_handle(phdr); odp_packet_free(pkt); } } From patchwork Wed Mar 1 09:27:49 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petri Savolainen X-Patchwork-Id: 94686 Delivered-To: patch@linaro.org Received: by 10.140.20.113 with SMTP id 104csp1701032qgi; Wed, 1 Mar 2017 01:28:42 -0800 (PST) X-Received: by 10.55.158.84 with SMTP id h81mr7870483qke.85.1488360522702; Wed, 01 Mar 2017 01:28:42 -0800 (PST) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id q131si3803851qke.144.2017.03.01.01.28.42; Wed, 01 Mar 2017 01:28:42 -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 425A9637B4; Wed, 1 Mar 2017 09: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 20825637B8; Wed, 1 Mar 2017 09:28: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 C521C63C93; Wed, 1 Mar 2017 09:28:34 +0000 (UTC) Received: from EUR02-AM5-obe.outbound.protection.outlook.com (mail-eopbgr00137.outbound.protection.outlook.com [40.107.0.137]) by lists.linaro.org (Postfix) with ESMTPS id 18835637B7 for ; Wed, 1 Mar 2017 09:28:11 +0000 (UTC) Received: from AM5PR0701CA0062.eurprd07.prod.outlook.com (10.169.145.152) by HE1PR0701MB1737.eurprd07.prod.outlook.com (10.167.246.135) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.947.2; Wed, 1 Mar 2017 09:28:07 +0000 Received: from DB5EUR03FT051.eop-EUR03.prod.protection.outlook.com (2a01:111:f400:7e0a::208) by AM5PR0701CA0062.outlook.office365.com (2603:10a6:203:2::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.947.2 via Frontend Transport; Wed, 1 Mar 2017 09:28:07 +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 DB5EUR03FT051.mail.protection.outlook.com (10.152.21.19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.933.11 via Frontend Transport; Wed, 1 Mar 2017 09:28:07 +0000 Received: from fihe3nok1349.nsn-intra.net (10.158.36.137) by fihe3nok1348.nsn-intra.net (10.158.36.136) with Microsoft SMTP Server (TLS) id 15.1.466.34; Wed, 1 Mar 2017 11:27:58 +0200 Received: from mailrelay.int.nokia.com (10.130.128.21) by fihe3nok1349.nsn-intra.net (10.158.36.137) with Microsoft SMTP Server (TLS) id 15.1.466.34 via Frontend Transport; Wed, 1 Mar 2017 11:27:58 +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 v219RnsW001347 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 1 Mar 2017 11:27:49 +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 v219Rno8001338 (version=TLSv1/SSLv3 cipher=AES128-SHA256 bits=128 verify=NOT) for ; Wed, 1 Mar 2017 11:27:49 +0200 X-HPESVCS-Source-Ip: 10.144.104.219 From: Petri Savolainen To: Date: Wed, 1 Mar 2017 11:27:49 +0200 Message-ID: <1488360469-25958-2-git-send-email-petri.savolainen@linaro.org> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1488360469-25958-1-git-send-email-petri.savolainen@linaro.org> References: <1488360469-25958-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)(9170700003)(356003)(2351001)(50466002)(105596002)(92566002)(2906002)(106466001)(47776003)(305945005)(110136004)(38730400002)(53936002)(22756006)(5660300001)(33646002)(6916009)(450100001)(2950100002)(50226002)(77096006)(189998001)(81166006)(5003940100001)(8936002)(8676002)(36756003)(86362001)(626004)(76176999)(50986999); DIR:OUT; SFP:1102; SCL:1; SRVR:HE1PR0701MB1737; H:hybrid2.ext.net.nokia.com; FPR:; SPF:SoftFail; MLV:sfv; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; DB5EUR03FT051; 1:VzAnKvZ46ftmKeLLCzYI3hLsbNtvNRQsxIGHvVzRikLMpylpWlmIDIvcGae6Wk9+5QjMf9z3cnkji6FO6/vzKvO1doyJWrtAT8tcdEwDRv/VbvAljql55nwYi2K9CEEjPR37tHkX2NWs1AHngZvkmK6FKLfF4Tuo+VsTwYGqVpX5inGsrHuNMP6OwDLqNxLA7CTlRCqEbIEeBnB2ByGr7IVwS7UluXBh+VXPrr2+haAv5sk00Q34QCtr3zYIA+Kd6RAvgaUnTXh66mRnyr3smqxMwmvn4ACed2vRs/az3/lWOnF+YWXyagRCKxbnbf3oRHm6L6anQzxA6Vne/FM5UkgT7k5UOlmGPnNt56tJ2ivxIDNy7hLmRiJfRlRGzDaReG66FVBjkHfs1OdKWLNY8MDZ/UKiEwQ/znt2CuiMgWiUBDu3p4nERqbyMjK6LTymsSEleKJnG8C/pPYUW49kzw== X-MS-Office365-Filtering-Correlation-Id: c43bc902-ea92-4cda-0dc4-08d460854530 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001); SRVR:HE1PR0701MB1737; X-Microsoft-Exchange-Diagnostics: 1; HE1PR0701MB1737; 3:ugX3lWI4Ixzs8ycsQzWiyzvVYMxumRqMPTBmrnUseWgiQZws/e6ca/LfYzgUdyf2gITsOnutEX+y2yBQdIGRnAUJqk+3aHcB8zENPiUdXhpfNxDzw+I1+cbl7+fqJpQBQ6CjCFBAxYE6TIIWzvWfSPcUCB01CCaUDMhGaISztBDsOkbhB4f3ZNfUWXZVxzilCvI2bNwt4K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oDgD3xa6MkkOK7JE3bfEpSRg/tI7fvjnkqiI+AmHQsk9fZaQwg5pZ+RqYPj66A+u8Wu2Cx6aZDk5ZBZ6g2YBDl2+wX3RUpts2EaxZYGIIKhkK62lqXCbypRbHsd6VHAUwZGc2o8RIop6AvbKgVCiXZeez9c5cxG4KFl8C7/cja7qPcQ5F9ZUfLSfhAFNLKt5QvLpR1UaXNmIe6cgVJf/LVTS0rGyKkXkbeJwJyhtlikYnzLg5uVe4BbchyRCXX6tcjAFwGJ4oMgMQwXBI+zXwV/Ln4xZDXhvATZafu7jlbe7pcbuBwmdSk4D6+9dC874zbvBrw6NpMBDK/qBsRe8k8HOKp5oQo7h0tE4OQxdBAOGmo6KDew1ko49O2r8n2rxc5z9UFuiT6pfTWmq8xOF55P2mVRxtMJ+ugAi7MxCM1a6goCZRIa8zG5iIrYdtCvi4mStEob9zH4+v2Y0eVCfsQXR806Cs9qEDbI4OqRIIBkzoecaW7HFdSiiRwJ7caIVVFI81IIbpqg= 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)(13018025)(8121501046)(5005006)(3002001)(10201501046)(6055026)(6041248)(20161123555025)(20161123562025)(20161123564025)(20161123558025)(20161123560025)(6072148); SRVR:HE1PR0701MB1737; BCL:0; PCL:0; RULEID:; SRVR:HE1PR0701MB1737; X-Microsoft-Exchange-Diagnostics: 1; HE1PR0701MB1737; 4:hr8i2fwltteOYAFlWJN2oBKkCa6N+vLQyjQe/YT9w1hEKmplIS12xn9rpWmBo34p7JDEFJRmVSN1HS147+Khdz0biNmIM45Vj2HsU1pjD4VapsGgkAnyZvwDC7LXh+UG6EL/XKEJMXLTXCKbqv78Gj5yRpgVen4U4qhwpSxGLpiXRjifqqiQdJ09qWuuZn3PED4gLStUbjA5aCffZ5mgQjMokQkcr6PYVuE3e20CC+6JimpQ6lqYmDH7+G5PGiokKX8gl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pKj/VDGkcughBpT8IEj1IlGc8pwLYjQJrk7yV8w==; 24:akIJj+YvojreybOA2aWMsr4BvjhaddXFJx9n2WyZqoZECtESheGMNK3ErbIdO0joMjWCfv+ItoayOCCUiVIWs2N6ugxtj/FPn4rE/dG7DuA= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; HE1PR0701MB1737; 7:QAGuewjRQ/xdHFDw4UXF+18fUrZiAznpvxqc/FUSPYfx/i/AVq0nqSMIIo20orweBDeHSkjCStZ5pLVwryWyIT3VfvW7VUAsFKDRHOyNz+5NFgpY0HypTKfYbI5BHw7dJNWoS4toCgp+vVSVV6G0yHwe9GUeMW/mCgnt1L8tOwcTONwGGZ5RXDQ/D/MhJTaxuXh1Ke0Y0qv1xhGRxy9cEQIHmg9I1yNzIBD/EJzV4nt+MWFvATtjhgrBmX/IYZ9xgx9c4puimlu0n+3l5V1TXZ7R8KKIbF+9+vQNLyWvB+/VQHYqIidstJadLrTidORP/ga7EgZ+EOx1IHEYPd+L9g== X-OriginatorOrg: nokia.onmicrosoft.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Mar 2017 09:28:07.2682 (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: HE1PR0701MB1737 Subject: [lng-odp] [PATCH v2 2/2] linux-gen: tm: use handle conversion function 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" Use (from buffer to packet handle) conversion function instead of casting. Signed-off-by: Petri Savolainen --- platform/linux-generic/odp_traffic_mngr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.8.1 diff --git a/platform/linux-generic/odp_traffic_mngr.c b/platform/linux-generic/odp_traffic_mngr.c index 309f237..4e9358b 100644 --- a/platform/linux-generic/odp_traffic_mngr.c +++ b/platform/linux-generic/odp_traffic_mngr.c @@ -107,7 +107,7 @@ static int queue_tm_reenq(queue_entry_t *queue, odp_buffer_hdr_t *buf_hdr) odp_tm_queue_t tm_queue = MAKE_ODP_TM_QUEUE((uint8_t *)queue - offsetof(tm_queue_obj_t, tm_qentry)); - odp_packet_t pkt = (odp_packet_t)buf_hdr->handle.handle; + odp_packet_t pkt = _odp_packet_from_buffer(buf_hdr->handle.handle); return odp_tm_enq(tm_queue, pkt); }