From patchwork Mon Feb 27 15:57:36 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petri Savolainen X-Patchwork-Id: 94558 Delivered-To: patch@linaro.org Received: by 10.140.20.113 with SMTP id 104csp922523qgi; Mon, 27 Feb 2017 07:58:25 -0800 (PST) X-Received: by 10.200.39.194 with SMTP id x2mr6077508qtx.139.1488211105903; Mon, 27 Feb 2017 07:58:25 -0800 (PST) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id i62si12080729qtd.237.2017.02.27.07.58.25; Mon, 27 Feb 2017 07:58:25 -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 6BD28635F7; Mon, 27 Feb 2017 15:58:25 +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 58ACA635FA; Mon, 27 Feb 2017 15:58:08 +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 D7FF9635F5; Mon, 27 Feb 2017 15:58:04 +0000 (UTC) Received: from EUR02-HE1-obe.outbound.protection.outlook.com (mail-eopbgr10099.outbound.protection.outlook.com [40.107.1.99]) by lists.linaro.org (Postfix) with ESMTPS id 33999635F5 for ; Mon, 27 Feb 2017 15:57:54 +0000 (UTC) Received: from VI1PR07CA0031.eurprd07.prod.outlook.com (10.163.160.169) by VI1PR0701MB1741.eurprd07.prod.outlook.com (10.167.196.135) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.947.2; Mon, 27 Feb 2017 15:57:51 +0000 Received: from AM5EUR03FT011.eop-EUR03.prod.protection.outlook.com (2a01:111:f400:7e08::203) by VI1PR07CA0031.outlook.office365.com (2a01:111:e400:533d::41) 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; Mon, 27 Feb 2017 15:57: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 AM5EUR03FT011.mail.protection.outlook.com (10.152.16.152) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.919.10 via Frontend Transport; Mon, 27 Feb 2017 15:57:51 +0000 Received: from fihe3nok1349.nsn-intra.net (10.158.36.137) by fihe3nok1347.nsn-intra.net (10.158.36.135) with Microsoft SMTP Server (TLS) id 15.1.466.34; Mon, 27 Feb 2017 17:57:46 +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; Mon, 27 Feb 2017 17:57:46 +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 v1RFvbD2004999 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 27 Feb 2017 17:57:37 +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 v1RFvbi4004996 (version=TLSv1/SSLv3 cipher=AES128-SHA256 bits=128 verify=NOT) for ; Mon, 27 Feb 2017 17:57:37 +0200 X-HPESVCS-Source-Ip: 10.144.104.219 From: Petri Savolainen To: Date: Mon, 27 Feb 2017 17:57:36 +0200 Message-ID: <1488211057-15651-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.36; IPV:NLI; CTRY:FI; EFV:NLI; SFV:NSPM; SFS:(10019020)(6009001)(7916002)(39850400002)(39410400002)(39450400003)(39860400002)(39840400002)(2980300002)(199003)(189002)(189998001)(8936002)(2906002)(38730400002)(110136004)(105596002)(81166006)(450100001)(8676002)(81156014)(50226002)(77096006)(356003)(305945005)(106466001)(53936002)(5003940100001)(626004)(2351001)(92566002)(22756006)(48376002)(68736007)(6916009)(36756003)(33646002)(50466002)(5660300001)(86362001)(50986999)(97736004)(47776003); DIR:OUT; SFP:1102; SCL:1; SRVR:VI1PR0701MB1741; H:hybrid2.ext.net.nokia.com; FPR:; SPF:SoftFail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; AM5EUR03FT011; 1:1Yo1lpMQgmwoSSrqFwKGv6gWCMsuk59BUY/JY9uBFG5wPTR1mPAoXzQNyrNiPiTh7d+kfLrBexb7kYA8mXGseSaqJPugQ37PWeVREdUCIxmLacfzVfKgxbKxYsQ263ch5t2YL7Va3d2r49Ua8YeR1Np//aF8pJ+yQ5AwSjvdzv3WXq9q/U6kTesUewnWJqbrwZg7wOPQAL9PWowMkinO7k00bvGPWNKMb4kf9XFdCJhC64FXu/nGI52DaJwp9s0pLcXme01ps/tk/L/4pmdXgG+6pJhLeShOo4/mXPwybg47aPQbluJX3bMtn5EAlRdeZxdf9yNMe1rwA7xlhvTfyA58/fCcDX8FVbf0bfvm9sEGaq9i5HCfgIFBYwp0GMN71YTFjHerfeWiKuZK3ZHbT02hW8TgJ5X19+GBB2tgRQuy5PDZvG8D+jWkHlJ2csFCLvBVLlQ0aJUPNZrqQcNq/g== X-MS-Office365-Filtering-Correlation-Id: 10ddfeb4-c343-40bc-f609-08d45f296230 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001); SRVR:VI1PR0701MB1741; X-Microsoft-Exchange-Diagnostics: 1; VI1PR0701MB1741; 3:rv5wbwAQdRXsYYHPGRikjAl0VgFCHEeF9zoDq7j8gStDIh0+AhieyQq9wZumC0+RR4+WZKt8tAPchmMSq/lOnwhcysqqJea7qYiLRTpWLHLP2fCix3Pl8+aD0lE7y5xKVsu0gdcaqgKQGOyGCSs4IOFGC7XQAOUaUwAgMTAhK8HLBd0R0cMTaQ27sRe5tdTisz0Ksfw3ftulYYE9RhElG+amHxUlCrYlRaM+cXDOwKUUC/Ffj38/sJ3dSkPRitxQPp+pfcS8t6mCgBOyc0EbeB/sz7l6D2Zmxt07V3BGjMs5WEBGMuGrHcatTsWBWFyILmPZgHji9IgLdeYdVoIggEup3GcsFkPyBc203GTJYRAQECujn0PDS6y8Ch1ag1Bq; 25:Tq6PFt3P7rPwiyCjOjVnmjP2bpsYYhPy7yeFt8ScXbe7m4agSCUS5bv/n3CibqKJXsabDzPGLpvIjTJdVvSuyxHrsac/dRk/tnSq0c5+TUAVa5HyluYjwyJnge84wrLWTauNFzTd5/HKTPIP6SyRV/B4iGM/dniAW/b1JPXg45V1fllHd6eRqgR36DnyShIS/K4FIu/gcDJfogRW1e8D66oOgh9hCOAzaHjXYqzxiDTB97rTMqp4CXabhxjBr3dTPhI5FIf8N7A2MFRFl+LalnZUiXZTPbkThUK5gHFhOwFFGDHeKeGggj0j3ieiBBUNzKRXv8h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lnfEvVcIw7o= 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)(8121501046)(13016025)(13018025)(3002001)(10201501046)(6055026)(6041248)(20161123558025)(20161123560025)(20161123562025)(20161123555025)(20161123564025)(6072148); SRVR:VI1PR0701MB1741; BCL:0; PCL:0; RULEID:; SRVR:VI1PR0701MB1741; X-Microsoft-Exchange-Diagnostics: 1; VI1PR0701MB1741; 4:AEaXTh9FB4bmAdDZXYdL11rVLZU0pGx8Ipw5uvzkvoDZNu/VdZyamQOeY0tCLTuCxOdakTEu7WuaSFKaDzgk4BpFfC9oQtVtoZJOuSqZSUvROhfBCsP8oRAhkAvuf9ebRX98Od+d3WCphrv+Q+PG3aqtD9n4VS1YpKeRDjHUHgp71OQ71MlLinm5ld8ESug1fbRVEB89ydnXFnm5mgBejPH4zT26RLFTQgci9Hkj5FroqjIcT2EWj1d4ipQ2mr7e3UJ35l38FrB0+pwOn1duWWDdyMFlmrUY/fOpr5jyXNzv4XJ80K3rgIaTRjh4I86oyTCus8DIhhOSLT6ThMmT5gmVntMpdVXyhIFXMY8XRbiDob9uyE4d2/qLwPE+16GEEAVS4nEiq/gOn3X1cc1kk9AmRcHbGYDd+GZgpdbfOLpL1t0s/+lwWGNwioVD5MSHCHy4c1unsZe5pjpx9Fb8ENy3edPFrViBEtqnobeqzKgCyqlQZWMbBXbP5r5Dk3iQ9HHEVrMu1IhcT3JhuQwhLhpbkJBIAaGaqHcpo+1H7QhZ++i0Sk2vDaeZihB/PN7l0SLOUihki4l/Yz0BpMcxF7TxM9sOUB6fb3aNHUXWJpzwhhkwQ4EyL/LeNQkKNrrjqQRynaAMJfi3XmYLPJtDQpCFqGBkMlPRa6S8s45tPD4= X-Forefront-PRVS: 02318D10FB X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; VI1PR0701MB1741; 23:WqT5w7wD+HY/RSM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+onpfYQ1loIGf345LC6zXwe76ueDX3aFVtCwhg== X-OriginatorOrg: nokia.onmicrosoft.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Feb 2017 15:57:51.0975 (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: VI1PR0701MB1741 Subject: [lng-odp] [PATCH 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 | 6 ++++++ platform/linux-generic/odp_packet.c | 5 ----- platform/linux-generic/pktio/ipc.c | 2 +- 3 files changed, 7 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..7a394dd 100644 --- a/platform/linux-generic/include/odp_packet_internal.h +++ b/platform/linux-generic/include/odp_packet_internal.h @@ -163,6 +163,12 @@ static inline odp_packet_hdr_t *odp_packet_hdr(odp_packet_t pkt) return (odp_packet_hdr_t *)(uintptr_t)pkt; } +/* Only one using this outside of packet.c is ipc.c */ +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 Mon Feb 27 15:57: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: 94559 Delivered-To: patch@linaro.org Received: by 10.140.20.113 with SMTP id 104csp922799qgi; Mon, 27 Feb 2017 07:59:11 -0800 (PST) X-Received: by 10.55.18.144 with SMTP id 16mr14606551qks.5.1488211151067; Mon, 27 Feb 2017 07:59:11 -0800 (PST) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id s4si4179251qtd.308.2017.02.27.07.59.10; Mon, 27 Feb 2017 07:59:11 -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 8CCC6635FD; Mon, 27 Feb 2017 15:59: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_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 C505463602; Mon, 27 Feb 2017 15:58:12 +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 34167635EF; Mon, 27 Feb 2017 15:58:05 +0000 (UTC) Received: from EUR03-AM5-obe.outbound.protection.outlook.com (mail-eopbgr30102.outbound.protection.outlook.com [40.107.3.102]) by lists.linaro.org (Postfix) with ESMTPS id 7DD19635EF for ; Mon, 27 Feb 2017 15:57:49 +0000 (UTC) Received: from DB6PR07CA0110.eurprd07.prod.outlook.com (10.175.238.152) by HE1PR0701MB2922.eurprd07.prod.outlook.com (10.168.92.147) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.947.2; Mon, 27 Feb 2017 15:57:46 +0000 Received: from VE1EUR03FT025.eop-EUR03.prod.protection.outlook.com (2a01:111:f400:7e09::204) by DB6PR07CA0110.outlook.office365.com (2603:10a6:6:2c::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; Mon, 27 Feb 2017 15:57:45 +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 VE1EUR03FT025.mail.protection.outlook.com (10.152.18.74) 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; Mon, 27 Feb 2017 15:57:45 +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; Mon, 27 Feb 2017 17:57:45 +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; Mon, 27 Feb 2017 17:57:44 +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 v1RFvblW005002 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 27 Feb 2017 17:57:37 +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 v1RFvbi5004996 (version=TLSv1/SSLv3 cipher=AES128-SHA256 bits=128 verify=NOT) for ; Mon, 27 Feb 2017 17:57:37 +0200 X-HPESVCS-Source-Ip: 10.144.104.219 From: Petri Savolainen To: Date: Mon, 27 Feb 2017 17:57:37 +0200 Message-ID: <1488211057-15651-2-git-send-email-petri.savolainen@linaro.org> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1488211057-15651-1-git-send-email-petri.savolainen@linaro.org> References: <1488211057-15651-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)(39410400002)(39450400003)(39840400002)(39860400002)(39850400002)(2980300002)(199003)(189002)(47776003)(50226002)(105596002)(2351001)(106466001)(68736007)(305945005)(8936002)(356003)(33646002)(50466002)(450100001)(22756006)(86362001)(48376002)(97736004)(76176999)(8676002)(77096006)(81166006)(2906002)(6916009)(50986999)(92566002)(189998001)(81156014)(2950100002)(5003940100001)(53936002)(5660300001)(626004)(38730400002)(110136004)(36756003); DIR:OUT; SFP:1102; SCL:1; SRVR:HE1PR0701MB2922; H:hybrid2.ext.net.nokia.com; FPR:; SPF:SoftFail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; VE1EUR03FT025; 1:tTIGt2TSbLU1zSSTL+afvcdrPQQFXHH5sLzEXLzuC4V/fwUflIq721tAit5GBzQqvQPyEDEWbcOlFf2G8HxtWKASy51FPQdeIaBR6By2P5N2HLVB4iBnAztEFnHRTJ+Rnl7utlPWmG33LEncNorTw2qCsW7dDF4ewKCFNWxZ+TNVOmMU6ITTJxvcG9w1GJcwRGo5kB8Y9jSejyouybsbJcB86iKId4m5ShqkMlwFaRg2pE844SCxh3NlSv+w6ftIm/Bl8D0AZdS9Gg9Pdar9lP/Jv8GS3CZeiyUzhj72ugPBtSnsQdLUeyCjAfOxQVMxkMRWYRDFfyi1xmzVBvIbLD0QmmAGJDFyNKva5OuY0qt9nKD+yRX1AZFZ7XF8z628LrRpogfNfrbvE4fZ4ntKApvb8FOPA6XWXvmXaEYpeoh5fP/VxyJ8A5PpGb2kOb5x4tQT/6voalTwbMdUP1b7PA== X-MS-Office365-Filtering-Correlation-Id: da9e1696-89d4-4c9b-7f96-08d45f295ef8 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001); SRVR:HE1PR0701MB2922; X-Microsoft-Exchange-Diagnostics: 1; HE1PR0701MB2922; 3:hJUWgawwWUQzfsg/9lO2K9cbwErAXwlEGJx95i7pKgtm7AtuuzKE5LUZt2Pm9+NHt/04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XT48Br2QsOC6V0ahFMHrsrwf2t9sxHVj6QcwaUl/IlIRCVjap9fk5zUphvIBSU=; 20:fU7kJlwt3QhqatAs/EDi51HYhKZ6vHSRGsJESaP61Npaz1g+lql3Je3BEgWbdKGI5Cl7J6Gt6Cjcj001HP84fiRko3xcaENubJlQOyIBMRkY/Yhki5GoCgnpaQCj1Xh8F7LNYZl/16lqMseRG8PtxxCP44z3reS2oSahbqDXylH2j1jftZB3bVwp7+62zhqZvaPPbyn6OQ6PPaZqORqnpM3y6vSGXV4N/RpvpSBnLI0y1XPeih5DYNsg3f+WTBfujorBoh7chEYxe2+djGndUPlJ3HKCoL87m60Vq5T+jj7JJ8JrHGB9H5pqaEt+Cm4hJBQ5Fvji4+OMZFcJixNerhtmcrHGRsPSNuC6Jryijuy3E6lsv5Kf9O9UhkuV2DFZmxk7YJLrm/5jpUifoZeuGIXw/rPQcUkTkheQroGr+PXHGIO+7zH0YTd6+JQLY0GFhlyIZu//6Sapjg7Qik3nWCJLFzz+8JrRCgkPegeys+vVZqfsFhSzhC7g/TMpo9R5DspwSGtjwghnyloTsF3zgml42z4i4x3+eZ5Er72phErMUPk3bSEi/PwJg8/2k9Gni5Oc8a++qK5wjU4ISDqmUBuLfaJbztzEIt36ytmdWFU= 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)(13016025)(8121501046)(5005006)(3002001)(10201501046)(6055026)(6041248)(20161123558025)(20161123564025)(20161123562025)(20161123555025)(20161123560025)(6072148); SRVR:HE1PR0701MB2922; BCL:0; PCL:0; RULEID:; SRVR:HE1PR0701MB2922; X-Microsoft-Exchange-Diagnostics: 1; HE1PR0701MB2922; 4:iDP1itTLFCXiraBg0jTd2t9peFJGryMnKSX0mez55s3DAKo16zhzABs69spf3dAuK7X80BIUkRZtOTJzFCNiCxqK0HTbs6u0OI6N9zR6WhiNtSlyGScCQ+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dInxn0wn3IKuyRi4NDO6DdCzcMLoDYjyg0yJU0eu7k0RWTQacgCUK02s6i9vIWq+Qtcw=; 5:BVK49BWg6ralxoqRJ4lnJKTwUKo2IVsA7BxACdd8IepGK5SCLjh54WCwv8lOxU0eeBncAnr5hJbIfc9UeimXM1VWb9RiObtu/IS62gnKeufbLF5n/3giS338+ZFIcdjWj7jcadzzkzliNh/w+zHFzw==; 24:AJI7xRrRALJU2AJGIU9LvT4ORlpgoVHBtkjaxcC96dBmXrTYrepJ7EUFjDZ8LoWyDd3ZfbNk+ONuKAWqSk5Q4r7aXEk834DgzK5TSitD8NQ= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; HE1PR0701MB2922; 7:8n9b+DJ02xt69SuVzGrvz/EC6ziHjiVmuyU+mBNgPy3T05GmAl27Ak+Qz/98J91hIWfbgszpeClKoBM9TquHlVeNhIPR94WWMy993rjMJy+G7VmMRFUcI9i3JqP1BJcdi3+9mGQWMBdgiFPjmgwvr/9C45SSDSQgydKMGD5WxiytU31Swt+nPVVQVt+/QrUe99j2dWJ/F32sjIHbBwVxtVNKBcCwQEAbjuPdMIrGk44g90qgCZJyKTaLvjcjNyi8pkljT50TNKex06Q4sFU9OmUuq4+cH2j5rPsl9vW5J94wfRRYrcLdapPAK/Ho8scIzALjaxzddNhzEcnBdRn/Bw== X-OriginatorOrg: nokia.onmicrosoft.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Feb 2017 15:57:45.6786 (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: HE1PR0701MB2922 Subject: [lng-odp] [PATCH 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); }