From patchwork Mon Feb 13 12:53:26 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petri Savolainen X-Patchwork-Id: 93880 Delivered-To: patch@linaro.org Received: by 10.140.20.99 with SMTP id 90csp1080305qgi; Mon, 13 Feb 2017 04:54:07 -0800 (PST) X-Received: by 10.200.53.37 with SMTP id y34mr20564916qtb.128.1486990446952; Mon, 13 Feb 2017 04:54:06 -0800 (PST) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id x34si7169255qte.67.2017.02.13.04.54.06; Mon, 13 Feb 2017 04:54:06 -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 895F6607F1; Mon, 13 Feb 2017 12:54:06 +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 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 3F65F60668; Mon, 13 Feb 2017 12:54:03 +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 1561960698; Mon, 13 Feb 2017 12:54:00 +0000 (UTC) Received: from EUR02-AM5-obe.outbound.protection.outlook.com (mail-eopbgr00126.outbound.protection.outlook.com [40.107.0.126]) by lists.linaro.org (Postfix) with ESMTPS id 0B5A660659 for ; Mon, 13 Feb 2017 12:53:59 +0000 (UTC) Received: from VI1PR07CA0116.eurprd07.prod.outlook.com (10.165.229.170) by DB6PR0701MB1736.eurprd07.prod.outlook.com (10.168.10.10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.919.10; Mon, 13 Feb 2017 12:53:57 +0000 Received: from DB5EUR03FT048.eop-EUR03.prod.protection.outlook.com (2a01:111:f400:7e0a::205) by VI1PR07CA0116.outlook.office365.com (2a01:111:e400:7a52::42) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.888.5 via Frontend Transport; Mon, 13 Feb 2017 12:53:57 +0000 Received-SPF: SoftFail (protection.outlook.com: domain of transitioning linaro.org discourages use of 131.228.2.38 as permitted sender) Received: from hybrid2.ext.net.nokia.com (131.228.2.38) by DB5EUR03FT048.mail.protection.outlook.com (10.152.21.28) 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; Mon, 13 Feb 2017 12:53:57 +0000 Received: from fihe3nok1349.nsn-intra.net (10.158.36.137) by fihe3nok1349.nsn-intra.net (10.158.36.137) with Microsoft SMTP Server (TLS) id 15.1.466.34; Mon, 13 Feb 2017 14:53:53 +0200 Received: from mailrelay.int.nokia.com (10.130.128.30) by fihe3nok1349.nsn-intra.net (10.158.36.137) with Microsoft SMTP Server (TLS) id 15.1.466.34 via Frontend Transport; Mon, 13 Feb 2017 14:53:53 +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 v1DCrUeZ020089 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 13 Feb 2017 14:53:30 +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 v1DCrU2C020084 (version=TLSv1/SSLv3 cipher=AES128-SHA256 bits=128 verify=NOT) for ; Mon, 13 Feb 2017 14:53:30 +0200 X-HPESVCS-Source-Ip: 10.144.104.219 From: Petri Savolainen To: Date: Mon, 13 Feb 2017 14:53:26 +0200 Message-ID: <1486990410-14928-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.38; IPV:NLI; CTRY:FI; EFV:NLI; SFV:NSPM; SFS:(10019020)(6009001)(7916002)(39840400002)(39450400003)(39860400002)(39410400002)(39850400002)(2980300002)(199003)(189002)(50466002)(356003)(97736004)(6916009)(2906002)(48376002)(77096006)(50986999)(5660300001)(5003940100001)(105596002)(106466001)(6666003)(189998001)(86362001)(2351001)(626004)(450100001)(47776003)(8936002)(92566002)(38730400002)(68736007)(305945005)(110136004)(50226002)(22756006)(81156014)(81166006)(53936002)(8676002)(33646002)(36756003)(217873001); DIR:OUT; SFP:1102; SCL:1; SRVR:DB6PR0701MB1736; H:hybrid2.ext.net.nokia.com; FPR:; SPF:SoftFail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; DB5EUR03FT048; 1:P3k4OP7WTzCZpRdvFcaM6Up0/O7TVF+q+ASNnKvEL6+Cwqes+0XBO4u9YPS2AtpAjD3g1g1NHhmzN9dqTKwDrG4ndkKfck2HFKpjdUWNyDyLlBRwEPiYBUvBEjGAnfS/i0wnGDDZhF5kOyCX1NlRFJeHFLh+yQCsPIrd19gady7rZkpNqTq5YHkFQZTqGAauo07hFYSq2DKDjS4rzTHVFmj03gyZVXFIvc9qn4hZ8dTXfJjklkb2MNT0FncWn5w/2k5aQGqa9mlTW0V5kqkwVYq7es7c3LemZYdb8p35kQiNRRhXtm9WObJf6PKrpq7hZxE9dlVqi9DEs9Z5R/hThErTppwkmtSwzW7WwkwKl3JkVmQ3VDr8KL5G1TVVh8Ul1k8o8R2N0ZIGN6xp/bchqeaTey4Fj0xsqGkODTlvXoz09w7nbIUKtQ90IY+8o9BZwQTj/qaDxHQxtdxCIXTX6g== X-MS-Office365-Filtering-Correlation-Id: 828a1cf6-2c02-456e-61ab-08d4540f5fb2 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001); SRVR:DB6PR0701MB1736; X-Microsoft-Exchange-Diagnostics: 1; DB6PR0701MB1736; 3:27B6H1j1AILWUHkdb7fAGIMuUpARmo/k+yvfYjR3DX8KLgS3iAiULPpcTdrgndYnp9j6ZLyCUsrTyXwI96TyDHMIFT65dRvm3yZbH3tzzdsE+1y5lGiX5/5qy8sMGTXOmsIvXz6dOKsrDtEm/Y174rzOll/tNpVmmtvkcc7O7cpjWxVRUtmJbHdiLSY5hIAUOFbDKZYXC/cUU43h6Dd2JLu/PqEeIvN5kF/DD9yJFKx0KzksZK7UA3+txvmE+RHuMaIpcvdcUEEv6l85UNu35pGbwhRUdGBwOjxNhZcJ8NbajJdVPcMK/QyM0aWJfRt/uLGI52ZkB1/xhoo/JqFwuTejV6tdm52zdSctKXcCd1WsCeoWm6WYzHeW+x8fPklA; 25:PdxTzgAPKc+1o8uDZlRWngDC1YlVkZjREkL9xEmuRjn0pS/4v+rE8PEEWSlygJBUH9j3FDn5W1UXcae7LVHDSqnTPZCvRhvkG9UKfaZC1akhqLCQlQFRpeWU9KXKbBXfuRKFnLHva6vzxeTdbhLvXJq8/buKZjbmIImE4OrCyzKmOcPgLwRDF08AeNYxJIsmxpjMnLCnHvz1/atb3jfXfA7DuT7bQPFnquxln+eYWupbldLA03XLEpSCOXE5CmuxcsUB+jHWQqHoqvgJ7mwCXBdOrsdMbH9Luk064t/ajQhSV6IfKOxRTGl4L1kFNbFWL8YZk1pH39t1s3D3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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)(20161123558025)(20161123564025)(20161123562025)(20161123555025)(20161123560025)(6072148); SRVR:DB6PR0701MB1736; BCL:0; PCL:0; RULEID:; SRVR:DB6PR0701MB1736; X-Microsoft-Exchange-Diagnostics: 1; DB6PR0701MB1736; 4:3G7i4/B0pt98jrsAbqfSWhS4jgOyQg65GXQ7u6LmARVCnqFc2zgxajmxUU3Yxx/jyQyaUKXlszAbUSSArJph0VDNobrs46SMg0ebug2FylPqqMZsDVmoPCB/5OIT4au9Dkdn838wr5tmTGP0+lhyL4J8VQ9QIN/XcHPm52nEPV8lqTbwLUDUxukUIR97CqD0Fx85H/nc92sKSOxIMg1MLLMsRXXQEs5ADHHf+q3RP+xVGaKnrRuT1zo3vynHuOECMepb8kwdXLyFv62rOk/1EkEGgMHVKmOKKEuh5wzl3vB9VKvVh9ZXhRCDnyeX/4BO1yuQ5/VHaBimuwSMEEWMaw4lvWsqiWs3k8rkAaXfoXk2NJiJdJDsG/R50sJpgRlPLsF0W+5AfsGNN7ExUqNjZIbvjMbhgR9uQGUxd+j0X6DjoX/peE4xe1ptHXT0TX6+iq5fA89mN+3kuW1kFGk8LYjHQmgISAarpcmdnn2iOJA0rQISGJDCNexGN/gVqhRpOtT9hO3+kzhFhZZmUkgLPj+qVCvK4xSwyy2GN2xq3sMUbl1qu5x1u4ob+C//uMcTMEaRtWlkIiwUzH3HZMxAsoHSb5kbr2kd656L1r7AvEFUEy8dGcJm1IXDkOTbmVhFAcrYct6qhKmbsqSVOd6WBaUuwi4FJtxCfxyNtaCa2vw= X-Forefront-PRVS: 02176E2458 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DB6PR0701MB1736; 23:K8UaOS/bo/v9YGaK73UBHqzuQZP8CMeii3va6p1?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microsoft-Exchange-Diagnostics: 1; DB6PR0701MB1736; 6:poVP+60j62EV7LRijC3BKJZDLNXYZFdi+xs7EJZGlMFnNqKf1ZvLxfxebeOh77F3pi6jZnXYhUql01lWUmRwXP0h0QXhQ28NF3vjbcdmL6qnvWKDM9Pmk7GNPN7fNaU91QVdKfqjgbvsgOTmO08WBIP2mg/3NhPqCxv74a+QOtv+7lvG3Kvzocr3zsHFApbXSHK6r5Y5c00wPzI5Iuhv6DnKp+R4AFhXCfnOVR659VboZnKVGdnj5qJXfRplH1xruK3yAY85naTsX8jhEhiekXYZv/KFQbdFb24ar/g0/zM4SydB9TXiQFnBTTFf/ACtR3AjZaApPGzXGXNAiuLXGiSe6EgLWIJU8uw2/Mrahmkk06wDFF0qMPfWLvFmI9Sf9pIzd8LY83dbtkH7hal6VQZMNLJ8zaAwiZcY20Qbrkg=; 5:d6Fl98qpanhdCw9xRTxmqS2AaK/ZT/hHg4Ezr0IBKS2MSwRwwzBDXciKW4OhhShyu6wQ/Sg8kFuYxChE0h9mU94oMXwHOPcIHgJqaI6XD8GokzRaa2VXYlL3BpTDiAf51lSOqhw/goxMgll0gJcbXAOyfugSgmmBMil+kZHJdso=; 24:uFlQaPFllhB+/ECzgxcus5Sav+GlQUE7TogEqpLiGus9+/eyi25xVhmAeqfiRLVnHY0j0I9O4sLbsCXmQXYKzgTMdXVAb8KajMjby5N1u70= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; DB6PR0701MB1736; 7:UaaWMsIYWSYOsLo3QkZqoWIBPoLLXBhdXztYYwJBta/xG0NQUpyE4eI/J/19vDGyv3mqn/AG0WmIaGRP1sRmzsI6g1lrlCeX9ZNsXGaCieKtkmjcLD4CYaI9NxEPSMOkTPxegs4mwRVUJjlFMenGeG+YhwS3vIk3C4r8S1Ryjhw8uodDsiqp6yDRkyqsWFcYo1OhPMRCOG333LuUV6U+hmgpHbqZAoe72689mlU5mno7amDsY03XT1Wqd2yguPJCXTsQt3pT/zsy7Ivp0UIwSJGk5Ex44+dmDy4EhEmRTv3E6yLOio3Ig0VkeN+2xGZ4CjU1NBuIHqcIu5ogmV00LQq7iwDhdpOlnKgAWxDpi2wbBg6bIEc8m/cY/m7uwa/HsXy5T9gVO+cSClQN2vu9ECkktsvP1UTPYfVp9Ly4vEWWJ0VR5p7yuk+09u7HnFACoBjrGv/vEax5PxPdc2XjY0v4GwFnsd2no5TtFgSNWv2IW3CdE64AfCn46kKBHMEHVALokj0X8ko0OTzZ2l6qhg== X-OriginatorOrg: nokia.onmicrosoft.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Feb 2017 12:53:57.1601 (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.38]; Helo=[hybrid2.ext.net.nokia.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR0701MB1736 Subject: [lng-odp] [API-NEXT PATCH 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. 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 | 20 +- .../linux-generic/include/odp_packet_internal.h | 85 +-- platform/linux-generic/odp_packet.c | 614 ++++++--------------- test/common_plat/validation/api/packet/packet.c | 241 +++++--- 4 files changed, 359 insertions(+), 601 deletions(-) -- 2.8.1