From patchwork Wed Feb 15 12:29:28 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petri Savolainen X-Patchwork-Id: 93998 Delivered-To: patch@linaro.org Received: by 10.140.20.99 with SMTP id 90csp2005334qgi; Wed, 15 Feb 2017 04:31:10 -0800 (PST) X-Received: by 10.200.52.209 with SMTP id x17mr34853155qtb.74.1487161870158; Wed, 15 Feb 2017 04:31:10 -0800 (PST) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id f191si2719091qka.167.2017.02.15.04.31.09; Wed, 15 Feb 2017 04:31: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 BAE6762F1B; Wed, 15 Feb 2017 12:31:09 +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=-2.9 required=5.0 tests=BAD_ENC_HEADER,BAYES_00, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H5, 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 A2DCD62D79; Wed, 15 Feb 2017 12:29:59 +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 AFB5D60BD7; Wed, 15 Feb 2017 12:29:53 +0000 (UTC) Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-db5eur01on0116.outbound.protection.outlook.com [104.47.2.116]) by lists.linaro.org (Postfix) with ESMTPS id 59971609DD for ; Wed, 15 Feb 2017 12:29:52 +0000 (UTC) Received: from HE1PR0701CA0088.eurprd07.prod.outlook.com (10.168.122.32) by VI1PR0701MB1742.eurprd07.prod.outlook.com (10.167.196.136) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.919.10; Wed, 15 Feb 2017 12:29:50 +0000 Received: from AM5EUR03FT051.eop-EUR03.prod.protection.outlook.com (2a01:111:f400:7e08::209) by HE1PR0701CA0088.outlook.office365.com (2603:10a6:3:64::32) 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; Wed, 15 Feb 2017 12:29: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 AM5EUR03FT051.mail.protection.outlook.com (10.152.16.246) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.904.16 via Frontend Transport; Wed, 15 Feb 2017 12:29:49 +0000 Received: from fihe3nok1347.nsn-intra.net (10.158.36.135) by fihe3nok1347.nsn-intra.net (10.158.36.135) with Microsoft SMTP Server (TLS) id 15.1.466.34; Wed, 15 Feb 2017 14:29:45 +0200 Received: from mailrelay.int.nokia.com (10.130.128.30) by fihe3nok1347.nsn-intra.net (10.158.36.135) with Microsoft SMTP Server (TLS) id 15.1.466.34 via Frontend Transport; Wed, 15 Feb 2017 14:29:45 +0200 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 v1FCTW5D002928 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 15 Feb 2017 14:29:32 +0200 Received: from 10.144.19.15 ([10.144.104.219]) by fihe3nok0735.emea.nsn-net.net (8.14.9/8.14.5) with ESMTP id v1FCTWsm002922 (version=TLSv1/SSLv3 cipher=AES128-SHA256 bits=128 verify=NOT) for ; Wed, 15 Feb 2017 14:29:32 +0200 X-HPESVCS-Source-Ip: 10.144.104.219 From: Petri Savolainen To: Date: Wed, 15 Feb 2017 14:29:28 +0200 Message-ID: <1487161772-632-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)(39450400003)(39860400002)(39840400002)(39410400002)(39850400002)(2980300002)(199003)(189002)(36756003)(5660300001)(68736007)(33646002)(6916009)(6666003)(450100001)(47776003)(92566002)(305945005)(356003)(2351001)(389900002)(105596002)(5003940100001)(106466001)(8676002)(81166006)(86362001)(81156014)(2906002)(50226002)(8936002)(48376002)(50986999)(189998001)(97736004)(626004)(22756006)(38730400002)(110136004)(77096006)(50466002)(53936002)(217873001); DIR:OUT; SFP:1102; SCL:1; SRVR:VI1PR0701MB1742; H:hybrid2.ext.net.nokia.com; FPR:; SPF:SoftFail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; AM5EUR03FT051; 1:LThC9vAqdzhX9KMPsI+y6PkcLxbbEmCtJOtSb3q7X37I1BrVD49p5I7piBbuY31bTGizOvaY3uA4JdsbrsKqMY8bp65abnx0S3KAAviXAHW8u4T3udIMGgJCt3YBUeFBFjtYmKjRQoblJcaHTfu00YWJ1oDqptRm3TTlcNX+gUZkeXIAVlfoRIzhg2ebhKM+bLHiK4iXbuMle3jc/FNudL9/y0GaO/804qirJ0iw/kdz2ez2cWEYP6SHnQw83Qq2QvdzWAxfxqJMhGTSxf2GX6/vWBPnvugg1lOewEmGIqkdJhKN39TqNPOQAi1SuJeqNRZjlNAfwVP8ZPinO6Dv56IuZaMhGHIXS9JT4QxNDtchssVlNHH9O6uOBbBsgV88KGQu6qs/cKIDaLhUfjinJg8uUa5paZp+EbbZ9BmBvTWPlnnvSEtYGW25NA9NaYBKALheVgiu1tHlP2Dx7y5STg== X-MS-Office365-Filtering-Correlation-Id: 7e64b26e-5768-420a-9bd1-08d4559e55e5 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001); SRVR:VI1PR0701MB1742; X-Microsoft-Exchange-Diagnostics: 1; VI1PR0701MB1742; 3:f9W2TpPLOkjfQYge1jB7pWQxZWOagH5GVLrgs3AqkeXUw6eQgHROc61PLEnmXEPDC25jN1NKR7wrqeSnrZvHUrUv51sppUEZD/aVxwSzBqmGqYe0ai7cMl6BtxkjFQBIs2AvCc1sJOy/d02ElIanKfXT9dCeVEUlqHCYgY9JcRdA5wE9MAa9gcwy/Im+MyW7fulYI7JTcQSJqxkbRUPLVsCR9T1r/Ihkm5CIBPKZJxLaj7Rer7AiI1vOIkrqhsGK00di7t9dF7tBf4WBiL52KR6aLXN6nrO1sZjI8/mgLrNRSNtLbDYok3JYOQ3kyqyTjyEdaYMJzZHI3GnTM1yBo4R7xb/5kYAHnZBo/S7spDdSHHCRfOcyVGmxqc1mY2G8; 25:kRJ+X3Xov3w2hkvEaQfDqxF/yqHQWxVFAnHNHoe9LnuOUyHf817ZNevE7tJH33HEkN5IJG2t/9aAIkREPs6qnREFQrQ1vOhVKplP4N4Nmv3Vctej/Mt0K561NULjVbBnx8QmUYLyxrAm2MUkmBHB46lbHEV2nDi7uri+nbyyvLJ84HlBRuslsOSUYVlTL1Cw3ARSlL/qzH9oTiCKTgkURCgikJOjIEin8O3sD3iyvrg3rW/jPSKi/aa7NXeF1D4+q38WH71uYNVCbSlVahgNVIic0Vvr8yREnzwmy0/Q3vYi839c2v+zrq485YQ9WZIDC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e+hoo19QnVM0aQa3Nm3zTlA/Tdrls= 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)(10201501046)(3002001)(6055026)(6041248)(20161123555025)(20161123558025)(20161123564025)(20161123562025)(20161123560025)(6072148); SRVR:VI1PR0701MB1742; BCL:0; PCL:0; RULEID:; SRVR:VI1PR0701MB1742; X-Microsoft-Exchange-Diagnostics: 1; VI1PR0701MB1742; 4:kpGha6M2gUNIMCFv8jIxv+wybng3xPLa6aJEBzGHCzdWhXywLA1yvMaZegYrg5HtHQJj/kE/jOeoYgFQZHJn8bd8d52FlwiyRCtFZUEsWA1zGef4DTLNnOWB7cgti1ECq1V3DSqMfSmASBOMS5TNTim567vhGxiIhNE8QZZxtws1yHsuOtJV2uztJd0azCYP5WMPc7PiWwtA1PDXaIlkksKKzippbCooOnqt03811avaMer4dtJ5xwz9KFaezgoVFxmqGjSNIAwzEWUgVVldF25K/nLVN5NkFHWQclGjulbvr7zysNTQ0nQ648EKfsy9cnlL834Uk38WSR8Qf0ID/O1xP9WDK4Xlv6xtXnEzOYG+E+Goirftmcym47H7sbUJE2ZxF8kPaktWWgQXJxe74rTjJzMbHmcZ7B5sqrE6M0vh2ft4l5bflBwOvqQFFau51Z68B6+8FMzdHGVjuNwHZcpy6J7hzT1FeW6Ei6xZtO5jbOUw0QxkWSi43LnRz3P+WT0mDYwy0r8DSA2Da0urVaFc592dhv+3nblVx6A/QYnMu0ztQufQk5SMsSJZatmr6k3EM7gl7angTFwnmXBQSwG4N8iG5V1HIimSi2tfxLoEIqUTiZFufE3NPnsh/Dkqsa7kRcQvFXuRFKe4bQ0hQH506LrE2gQwskPsR0CaEIk= X-Forefront-PRVS: 021975AE46 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; VI1PR0701MB1742; 23:Fy1Xf94BW87+JEfJnYrWqaB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Dq/hxfJBxUgDSaxncIX3m6EHI3rPOJnrWz61tzX8k= X-Microsoft-Exchange-Diagnostics: 1; VI1PR0701MB1742; 6:vKrNRMuA4MmPhErjwY+bxGEc20Hdjrt8SQSDqgYrJP+finI/JPo7ypjcCxNhUSVfbhuOuPXzBZ4iltRsV5OmIi1/Z8f78rxTYnZjVMEFBecwRn0gfQmqYG8egNcxASN9TQYioLhZd8Xnx09LnRarRWmKKqZEDpGI2njltKBHaUJd5iBBmGp0cXfBd5PJVUPT5/CY4reM7mY2Qc92b9NSJFedNoOCGfc8F0Hd9ArxbcURpK6DBpVvESdicf8BeJkPnHdAfhjnJUJsF6r4e4k8xly897ZdHaFM4w9VQbqvwsx1DBgX9RTNuin1PbzpbIGPBkSedGbethpNau9QJ8a8sewsNAI6AGpeP1C/sq9PyrBUenwxwYabi553O2oZKkGe6E5b9ZVAKqQ25MjXV+6EsvyRrvPvr2vKBPrfUVAEEPU=; 5:/jnSraakhgY1wWX8ceTss5BEiOs42o/PY6mUl4rEpr0ZfNhNcGQZ6Gb2kSThYsyPL/f1H1rZQs0UEoINvxyZJExjMAx1b+raxbbO9XWpuNdc7DeP95u3aN/1RGKQpWW/9ogTw8qkQL7IVk6fpWdLNQ==; 24:uK84vrbj835Soxa+FQ/AYPB0AyRNuzwHEoErqQ5C0ewLwpOu8bfCZjcVntu7GKFfpxCEOJ/yjBOYHCFzr4rHFDuX+/FRF+QoeUtRW9MUr0U= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; VI1PR0701MB1742; 7:PIXQ02h+orHK6RNOrPVuloc4pO0qXn+8P8xsYvnZI7w/WGNKLUResNPDtE4Dd1voLrBIEd2FSL9l09BrVMTfOmT/bk3L5qfiI9mbLYhwl1EQdupUnsNRXyxKNYu7wSXFCFlcWZked2WSM7GtIsa5TmfkEjtjv/os9MSYN2X+/dZbyzbotnwrO3vlAvdC1rlm31Gfh4gEHee+sdW530iuU3soJ73REL+UN83i9zWDiBnvTQuJPQCaiNr0sUflwl18jUEDeuATdRGCnvQgvzjN0sWiLoZlSPUE1auCWFoYrMRkcL/jHI7KoYcPQYWJqd43at9fAbziQozCmyv9PAqgHK3hJ22Uo1D8tBsfuGiLMCicM4jjPBNzS61g9Kjeu3CshkBDipRYprkHf7VGMRNDjtDAcb2w5oifYTd2TRfPs/v+Jqqa2lZKWFjfOPqLo83dFXhWAuQbU7+5lKX3eVOvKlFhUWaZ2IdApJpydQdrUvtUMCTqyt0JBflbk+VXPnUPR4HktCLmXVv0J2FODyAVpw== X-OriginatorOrg: nokia.onmicrosoft.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Feb 2017 12:29:49.9606 (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: VI1PR0701MB1742 Subject: [lng-odp] [API-NEXT PATCH v2 0/4] Packet references as copy 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" Change packet references API specification to enable implementation as packet copy. Remove validation test cases which test for out-of-range inputs. Generally, results are undefined for bad or out-of-range inputs. Update validation tests with the API change. Greatly simplify packet reference implementation by reverting the previous one and adding a packet copy based implementation. When the first reference implementation is simple, performance and simplicity of the current (single reference) code base is mainteined. Performance of multi-reference packets can be upgraded gradually as long as performance and code simplicity are not sacrificed. v2: - highlight in API that zero copy is default behaviour - simplified odp_packet_ref_static() implementation Petri Savolainen (4): api: packet: references may be implemented as copy validation: packet: remove non compatible tests Revert "linux-generic: packet: implement reference apis" linux-gen: packet: implement references as copy include/odp/api/spec/packet.h | 21 +- .../linux-generic/include/odp_packet_internal.h | 85 +-- platform/linux-generic/odp_packet.c | 610 ++++++--------------- test/common_plat/validation/api/packet/packet.c | 241 +++++--- 4 files changed, 356 insertions(+), 601 deletions(-) -- 2.8.1