From patchwork Thu Mar 30 13:58:53 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petri Savolainen X-Patchwork-Id: 96294 Delivered-To: patch@linaro.org Received: by 10.140.89.233 with SMTP id v96csp251587qgd; Thu, 30 Mar 2017 06:59:40 -0700 (PDT) X-Received: by 10.237.53.231 with SMTP id d36mr6128209qte.240.1490882380362; Thu, 30 Mar 2017 06:59:40 -0700 (PDT) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id b18si1880114qkj.175.2017.03.30.06.59.40; Thu, 30 Mar 2017 06:59:40 -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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id DB88063540; Thu, 30 Mar 2017 13:59:39 +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_H4, 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 2473F60BED; Thu, 30 Mar 2017 13:59:32 +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 8DD9260C61; Thu, 30 Mar 2017 13:59:16 +0000 (UTC) Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-ve1eur01on0122.outbound.protection.outlook.com [104.47.1.122]) by lists.linaro.org (Postfix) with ESMTPS id E866060AC6 for ; Thu, 30 Mar 2017 13:59:14 +0000 (UTC) Received: from HE1PR0701CA0005.eurprd07.prod.outlook.com (10.165.214.143) by VI1PR07MB3376.eurprd07.prod.outlook.com (10.175.244.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1005.2; Thu, 30 Mar 2017 13:59:13 +0000 Received: from DB5EUR03FT034.eop-EUR03.prod.protection.outlook.com (2a01:111:f400:7e0a::204) by HE1PR0701CA0005.outlook.office365.com (2603:10a6:3:5::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1019.8 via Frontend Transport; Thu, 30 Mar 2017 13:59:12 +0000 Received-SPF: SoftFail (protection.outlook.com: domain of transitioning linaro.org discourages use of 131.228.2.240 as permitted sender) Received: from mailrelay.int.nokia.com (131.228.2.240) by DB5EUR03FT034.mail.protection.outlook.com (10.152.20.87) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.1005.5 via Frontend Transport; Thu, 30 Mar 2017 13:59:12 +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 v2UDwugh028523 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 30 Mar 2017 16:58:56 +0300 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 v2UDwu7K028515 (version=TLSv1/SSLv3 cipher=AES128-SHA256 bits=128 verify=NOT) for ; Thu, 30 Mar 2017 16:58:56 +0300 X-HPESVCS-Source-Ip: 10.144.104.219 From: Petri Savolainen To: Date: Thu, 30 Mar 2017 16:58:53 +0300 Message-ID: <1490882336-13721-2-git-send-email-petri.savolainen@linaro.org> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1490882336-13721-1-git-send-email-petri.savolainen@linaro.org> References: <1490882336-13721-1-git-send-email-petri.savolainen@linaro.org> X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:131.228.2.240; IPV:CAL; CTRY:FI; EFV:NLI; SFV:NSPM; SFS:(10019020)(6009001)(39410400002)(39400400002)(39840400002)(39860400002)(39850400002)(39450400003)(2980300002)(189002)(199003)(9170700003)(5003940100001)(8676002)(81166006)(50466002)(33646002)(2351001)(76176999)(106466001)(105596002)(50986999)(48376002)(22756006)(47776003)(36756003)(6666003)(2950100002)(6916009)(2906002)(53936002)(189998001)(77096006)(50226002)(86362001)(5660300001)(356003)(8936002)(38730400002)(110136004)(305945005)(217873001); DIR:OUT; SFP:1102; SCL:1; SRVR:VI1PR07MB3376; H:mailrelay.int.nokia.com; FPR:; SPF:SoftFail; MLV:sfv; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; DB5EUR03FT034; 1:Wn1rNBtiQXtKvBKMbie/UXYSw/p5Iu8uWP1fI5w8WqeqQkWNF2IzD2HnrJKji8wsCRGfRyhI1JaF/uy29c9z5uiOd9ZjEjYSnS5Og6RJ6iGZs73F5nOfblj5RSlXb0lxEFCgINeam4ogLxjm71LxtZ8x7Lu3CTNXhhpaI5rZ8ywEsHYbebbSIton/xmNEg/C8WDwF55m0F8yGJPZzPk6TDjlSJGhCDrgI//f0cKDAmca4FCHyhD/eNVfr23ooEyaghS/Iz9HFJHK1rZNtDJLU/hk3wrLLQHc4Z6/4+pRkV8xSw8INz0KeVZmSxaFwmoMEvtEwgAAgh4sHKtgB+k/Pc/8088UKnY42CNe5sHD89dNyx/bG0pV29dYzsCe+6lxsf0GnzTZypERuSjWIjMKlAB7aj7dq7+efCtQh1z3ZPUEHLn5Eyfnd/si+Rab4xI3ek3cw0fkhA0PxtHG7z1utPkd2OtT6Ng3DFRH6MVZZx/fCU9dRKn726KMMntEsXUUi3DNqbjraUchrC6qeMb+Ug== MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: db17c10b-5fac-4a72-5559-08d47774f1e0 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254075)(2017030256075)(201703131423075)(201703031133081); SRVR:VI1PR07MB3376; X-Microsoft-Exchange-Diagnostics: 1; VI1PR07MB3376; 3:LAa34ITR5WE8xYb1g7gwk0GDa7+0fk46Ch5wsR0MPZRkXp2So7mQRNYwLLt/eGl8kfYWAFMVTYHfA/ZzVpPwUzXrK2zNCYo+mNs2D1CW37VhdddvXGBelVUe3Cr2fULSo1WtchX7ir9wg0l5aF3veCpXlCy1j4+lJQEgqvdncCJgabYX3RHMsBa31NWZFkic8gZGC/x8rmWkQssLsO58l54CJmsE0U3ylxsxTWSwrzORjX1CXXU6OI7xFXw9Z8whR0jIw4v/WHb/fRU5DAxVdRoKzYi3iqrednHouhP+d8unfigI1d9Z1oQNjjtWNsjInXwvUekMQpb3JUSQ4Z1/JFAayuGa3uE8yGn2XeSulh0/MXzXfALA/oI+YFhBGCqO7DsXKt8slzsQE/GvGegXeFSpXzVM2dFf8RwoPeVk9SK0oyC525iyGlXPh3OAMiSK3gN02kyeL37nvGQ1Nbj4Dtn6Or9HXv+lRVMtk+61Rjeg0paOXax0E/T7V1eh1Svt X-Microsoft-Exchange-Diagnostics: 1; VI1PR07MB3376; 25:BA9bg//uCuCDrfibwFocjIhHddemDD5EUFyzwRuungWFe3Gt/+1zDFYBc7e0CiHxumAFa19iUpJciS1BO4yTBsslMmZS7WdPgQkF66/lXw5gg4EQq/g8cidQs6TFua2w792YAyV7dJO8PuVQBxJ+m+5bI6aWlEbfw72IrIXKocVPw6iblwwj8rPWuuO37iohpqH8yotmYnIzQJoS9NXIcClWZA7nUejbexYogHvuCN/faGxWx2h1M41I+CbXXqidcJ9wOrFU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V9Zpu1LymH9Ilbp/3FMQYy4KjcRbqeVRNbulFe8gU/JSLFPLSUbUtWSf13uMfxZQRo70jQbgwzhMEJ7NqeVyv1ZacC8oojg7RhERDgXo= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040450)(601004)(2401047)(13023025)(13021025)(13013025)(8121501046)(5005006)(3002001)(10201501046)(6055026)(6041248)(20161123562025)(201703131423075)(201702281528075)(201703061421075)(20161123560025)(20161123555025)(20161123564025)(6072148); SRVR:VI1PR07MB3376; BCL:0; PCL:0; RULEID:; SRVR:VI1PR07MB3376; X-Microsoft-Exchange-Diagnostics: 1; VI1PR07MB3376; 4:iK9A2H+OaMvzzoUMOvEBPVJE2XyWYNDw6sJL0NjtULU5O9xD60yaSvMRxBqVqON5DDrKasUeeHJ1ZG4UnzB44MymfJtY6joe+akPTnfl5KSqTaGzCM28RHhNMtdE91r5SYvksPQVMDwmksnVxU5iVCEZBkc05itwP2ZSPnpKweikbp8CWZWZGYi3BmsQ150UGxQfK060Xi2cmaCc0nRfxw9ERVbB0kqSgs8z9rMjRvYp63irTUW4YwrrZLMaJoKR2uz5jbFgEOUa77srmnDue2nLr9QhJq38B5lDklC7seZlgGJHSS9lxkqqNDQVteHQCZNaGXhKDcK61znv3FtdUF0eCPG6DGCM8RRYqWVxULy/zBLGoV/ICZ+3YSRYpIbz8fTfUnE6bilgjjBBdcPMu9BaVDnpGwEnzJtCw1wEo5B1YO6YNkZ6hfOS0TF2fQcanDboI2WyHcDL1JRqlRvPLCh3Ce8xxLRMZeCIaJkBO4NSXmSPTO9T5LN8nb+rgXlDYOokayhhl7006tBV3tlppKQPoYcM37+Jhg8lwflqB1q/k5EFFrL2hAdXbB5irb0t71+6TpmGlYnkNnTDJg1Nh2b5kZbNfGCNZ/eBHG+cq29bCLnaNKZvkr7ZCOBJgAKb83/bb0noQArrTiOwRTDy1QkM3MylnAhrVv/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Q7CrlS8NCP/2TVd/O4lIT6Tl5X+S3ZSN7Kqk627cCVZdiBR/dugMcbslI/E7oS5vXpZQnQxqqdTlI+0TsxY6z2aDCwovyIY9OGu6LHyeHwUXDwqrUZ0xMTbmnN5/u7JRx7vuEcsXRLvu3s= X-Microsoft-Exchange-Diagnostics: 1; VI1PR07MB3376; 6:KUnZyGduO3hvYAud6hlzJcAyc8kewUzW8Eg4ZhVXAY1SCtQi1PS7cfaBaeSFJaEc6jQ1U6DzH7qJznDjTbn2nGAkoHwTuq0zkRIewswlEZOMGJohkKhBMIKV8VoV3T8SzGIfDKmZehSbBztjb8pTTY2wS8aYPkbO0x8vF4fNs0mmb5LjGm9iYuvAdHjgXxLeaRH+v4GfztskTka0lzpSwedRrdprCCmYjg07wrzsazde6asxEsnQarWwlCmRc9SICKcPvCt6FXY62om73Y88UpUKq+ed8kssE5cns+9xQdRFe+wigrh4Utv34hGwjNvaQKCI2ajjUPDQn0t5adtQpWiJG9xy7GnvBs+FHC465O2KkR3WSP//gob/bc8uOeiq/50KsxVZnUJXZqT8uVRP25tgZ1Z2deXamuqF3eOqsgU=; 5:2iT642HTJVZtm6LZwPQuNtmfVpe5pjFxAEK3E0+jKQzTaPybrkB/jIRH3gu30B64e3+BUCLLPAACj7TuAn231ANf2fPWcEo8/a65NhtosU8TXCu6Il2CqxX+OCW8dhk1i2nGsCDqU9owqFarqGK4eg==; 24:iOMsXBCjAqGBUNvCq2AnYNY5MLSayuuWzJTN5ak+Cy4gYy7D7VjrjITl8Loi14KML3IH8ZKlBeUmaZotvEFS7zq4CIvQPlCx3VIU3fDoQro= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; VI1PR07MB3376; 7:EdeUbHGY1ORSZovfC/YS9/IzQLTV/gnZXkDGVdDHXgp4uLovTZSNczENdB0+Mu9iNED4aDy5PNk37GSPmCHnT/u2Un0QoUJpPn9kZ/Q6UodDnTXpVe5e8BagwogMItyWBkBzga03Ggy0c4y61em/JIyjTuJ3vvJ2mylxnnQgA/GQHFFfiYDl7DvOlRe0/5+/AjPOlpAjp/mbnW6r/rX/6jIyy2LAu8PO4wV9Hd8UKVBlcIZ0s19yYbAc/tA741JLDyBSKFGjHxFImHIfT6xEl+KL8iMBgEr/qswxp7ZGia/Bu4EmFKOsm/ahz7Tphp+zezNVPicLZuBhB9bVgxluaA== X-OriginatorOrg: nokia.onmicrosoft.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Mar 2017 13:59:12.2130 (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=[mailrelay.int.nokia.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR07MB3376 Subject: [lng-odp] [API-NEXT PATCH v2 1/4] api: hints: remove ODP_DEPRECATED from API 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" Remove ODP_DEPRECATED macro as it depends on (GCC) compiler type attribute, which may not be supported (the same way) by all compilers. Also the attribute works only for types, but not e.g. for fields of structure. A new configuration option will be added to control deprecated definitions. Signed-off-by: Petri Savolainen --- include/odp/api/spec/hints.h | 6 ------ 1 file changed, 6 deletions(-) -- 2.8.1 diff --git a/include/odp/api/spec/hints.h b/include/odp/api/spec/hints.h index 82400f0..7434c6a 100644 --- a/include/odp/api/spec/hints.h +++ b/include/odp/api/spec/hints.h @@ -52,11 +52,6 @@ extern "C" { #define ODP_PRINTF_FORMAT(x, y) __attribute__((format(printf, (x), (y)))) /** - * Indicate deprecated variables, functions or types - */ -#define ODP_DEPRECATED __attribute__((__deprecated__)) - -/** * Intentionally unused variables of functions */ #define ODP_UNUSED __attribute__((__unused__)) @@ -96,7 +91,6 @@ extern "C" { #define ODP_WEAK_SYMBOL #define ODP_HOT_CODE #define ODP_COLD_CODE -#define ODP_DEPRECATED #define ODP_UNUSED #define odp_likely(x) #define odp_unlikely(x) From patchwork Thu Mar 30 13:58:54 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petri Savolainen X-Patchwork-Id: 96298 Delivered-To: patch@linaro.org Received: by 10.140.89.233 with SMTP id v96csp253412qgd; Thu, 30 Mar 2017 07:02:38 -0700 (PDT) X-Received: by 10.237.53.177 with SMTP id c46mr7230934qte.124.1490882558455; Thu, 30 Mar 2017 07:02:38 -0700 (PDT) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id l14si1907534qtl.15.2017.03.30.07.02.38; Thu, 30 Mar 2017 07:02:38 -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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 0263D63536; Thu, 30 Mar 2017 14:02:37 +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_H4, 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 D8B706353C; Thu, 30 Mar 2017 13:59:35 +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 5C30D60BED; Thu, 30 Mar 2017 13:59:26 +0000 (UTC) Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-ve1eur01on0118.outbound.protection.outlook.com [104.47.1.118]) by lists.linaro.org (Postfix) with ESMTPS id 06A1460C60 for ; Thu, 30 Mar 2017 13:59:21 +0000 (UTC) Received: from HE1PR0701CA0030.eurprd07.prod.outlook.com (10.165.214.168) by AM4PR07MB3364.eurprd07.prod.outlook.com (10.171.189.149) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1005.2; Thu, 30 Mar 2017 13:59:19 +0000 Received: from DB5EUR03FT034.eop-EUR03.prod.protection.outlook.com (2a01:111:f400:7e0a::203) by HE1PR0701CA0030.outlook.office365.com (2603:10a6:3:5::40) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1019.8 via Frontend Transport; Thu, 30 Mar 2017 13:59:19 +0000 Received-SPF: SoftFail (protection.outlook.com: domain of transitioning linaro.org discourages use of 131.228.2.240 as permitted sender) Received: from mailrelay.int.nokia.com (131.228.2.240) by DB5EUR03FT034.mail.protection.outlook.com (10.152.20.87) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.1005.5 via Frontend Transport; Thu, 30 Mar 2017 13:59:18 +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 v2UDwulf028527 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 30 Mar 2017 16:58:56 +0300 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 v2UDwu7L028515 (version=TLSv1/SSLv3 cipher=AES128-SHA256 bits=128 verify=NOT) for ; Thu, 30 Mar 2017 16:58:56 +0300 X-HPESVCS-Source-Ip: 10.144.104.219 From: Petri Savolainen To: Date: Thu, 30 Mar 2017 16:58:54 +0300 Message-ID: <1490882336-13721-3-git-send-email-petri.savolainen@linaro.org> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1490882336-13721-1-git-send-email-petri.savolainen@linaro.org> References: <1490882336-13721-1-git-send-email-petri.savolainen@linaro.org> X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:131.228.2.240; IPV:CAL; CTRY:FI; EFV:NLI; SFV:NSPM; SFS:(10019020)(6009001)(39410400002)(39850400002)(39860400002)(39840400002)(39450400003)(39400400002)(2980300002)(189002)(199003)(9170700003)(50226002)(189998001)(33646002)(50986999)(356003)(86362001)(5003940100001)(50466002)(36756003)(47776003)(2950100002)(6916009)(105596002)(53936002)(77096006)(8936002)(5660300001)(76176999)(110136004)(38730400002)(2906002)(305945005)(106466001)(81166006)(22756006)(8676002)(48376002)(2351001)(217873001); DIR:OUT; SFP:1102; SCL:1; SRVR:AM4PR07MB3364; H:mailrelay.int.nokia.com; FPR:; SPF:SoftFail; MLV:sfv; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; DB5EUR03FT034; 1:P7Tp82nwXUOK7Z7AgWBNwje3we0q2fwMUu39fSFDWwMTPSk7U0VFVcWeKEFP2GYqchkRfjzYXGpxTQ/z309wtctPyLFTX0YFiyzNF1+ESg7UnOnGpzqckEw77G1ybJpGHH4L3xTlAP8FlkEd4KMqC1Kqz/lCRXBGd/xcZ+qotSl+bL5sKiF9X/HJa3Xu0BnF4jzf62A7wIjuAwU95VPQgpUhPG/YbmyYY/vOEA18Sh4SIXQ8UKtAaNUhoBGIrHxaLpvYXkg/nN/D+z+i2zoTlk4OHeBBWKvGfUworCj3CaSjkQG2JXosO9LlRWIJDX0uqw3YP1zSsgpq3C/ycg1QtQYEDsCyKgyhZBfOrRyif3ALd8Y4qQEGaZZT472fY+7v6tfw0MjOTQ2MeFJ0/6zLWN7RkpWnI+8LRBJiCRiQMXXpszSvYnH6h264FKG8WtYsD0Z6XK/WDRkm0+N01QOxFnwzqET3bNOontqEokhm/XdL9wLERKfxR28qs8epdLw/ERJHkuHWi31r7Z0jjU4bUg== MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: 415cffb8-f74b-443e-97b8-08d47774f5e1 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254075)(2017030256075)(201703131423075)(201703031133081); SRVR:AM4PR07MB3364; X-Microsoft-Exchange-Diagnostics: 1; AM4PR07MB3364; 3:9ZaoAmJjuWMmIxyToiU5pVhNqWGnkB6GFNudFYRTVloK7nE9wc52YoeQc1CBtEb7DjILS+p6/poHzAdLfD+aXQxLU0xGC6e2pNWjN168X4pTZc3+GfBKyCwCOZFplbnaMGKO5N92QyBytjMOdl0DpaoWJiWw03R1xxw4ISvV8cwOzLkwws0jWlSoIGsjh54+uF/0Zq7qRd7FFfrp43zfc1C+499ULhB+7SduBYsmEJRJTWTx7AYobE0o5dTc0p7i5aIGq2rN0ofixso8rmj2k0QLBU6SyYRqRM7Qc85U5RsiRdm5sSF6H53P07G4Xcb5f/L9bMaVQAxUBG1+vHoo8BO5EQnq5KHv2ddRtbNRvQZUID3gLyU74TvuyFxfjN2vasMF77iuSvJlgv8ZH0qezfag4fN4DFl0VHFJ/cFydgp2gBc1gNglS64+gymyFptlmmwEKc47w7EL9tw5p4Kk1pMVS6TkIA+ZG6oxY6LH6pmVIO+zo9BdPgXeUUKyTl9z X-Microsoft-Exchange-Diagnostics: 1; AM4PR07MB3364; 25:gZPfaPnyT+6yyFpaz3zKE7MqHCKR68YSE7VqYndoetil38hXZML2x7cipn4cdSSVRXwhp8pQkJMfX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B7J8za0u7iMWDhL9/B825Sx9H5rSpJmXQFqQ8dj34RVfG2NGdgHpH6IE9G4JKoLl0+05J4O43Ogg8jL4CzbL3mAKffm1ZGYoJEqLMvDK8sQHawfYMpxn9qJb+rJd96eW/YoXrBYnMhqnOA79pXcjD1z6s91G5VtoSGL4szzqaQzqdE58wlU5i8PV1ENrOMDTmAMmhlG+nGnCSs+iYnUPknlCRaFJ80CjxIfkU0u9BIHFu/9R9Ksij83FZ5RT0dTWI2bfYMOeRLINzTEI= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(278428928389397); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040450)(601004)(2401047)(13023025)(5005006)(8121501046)(13013025)(13021025)(10201501046)(3002001)(6055026)(6041248)(20161123560025)(20161123564025)(20161123562025)(201703131423075)(201702281528075)(201703061421075)(20161123555025)(6072148); SRVR:AM4PR07MB3364; BCL:0; PCL:0; RULEID:; SRVR:AM4PR07MB3364; X-Microsoft-Exchange-Diagnostics: 1; AM4PR07MB3364; 4:tslj+U77fOSgl4IpPA87KsfqqwQ1zlQJ+NiQq7luy1BYF1gLmITvivL7RRMYaW68H2eHG9KgZ6JGOFqU9uMTyqOgwXKongjM2Z5HXn9eah7/IfawNHeC32sE0lBcs7ZiJGzflRV3E7eAIFc7QxH/1/xilCwnBVytoV7fwbsA0yOTmZHpnwrSR2Bld1R/damvdZmo7DvO4hZEyw+JrKfeGtUqk5DbXxD8cCqCi0eXOR30esFbQOmjcXm4wLElWr2ad4YX4gzUj5Fppmq7tw2lBWups5l/48qs/WZK/YwpQEmsyIBWfz+Y8Z6dL9rX5Lj3vue9voHugyaKXgGtIVNv4NRvOEyM0++aoFxWC2zvMmkCbODhFIyVRku6Y5zF/U2hQQx8bHzOYuV/++x+qTrnwCFPYjEla+khxz3Uz2NC+ih3ntjbPdzY2DFdvXI7dt1mrzVXGs5FGSWuZfoT0wQTtdA28RwoOWYa8H9UaHBzGB187zA9y4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fh0UbMCfW8pjxXIhY6C88= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; AM4PR07MB3364; 7:jWz0+QGrpxjRThjiuPiDQUCVIJ64oWJ6aa7f9WziOxYY+V6qS2rDjP3f7l0BnS1A+Soc7XZZl7YnRoZe9HmN86EID4XKpL8U2hJSWbPtGWoKZsrBYMOFmgei3PWPUDr3G6x0e7vxJJUTDnYJEPFUnA3m+QOEdfJg349Zy24/CAJFjn8VQcwwUPIbPzOZrMBIOIPrtJJhzKvfC/PhLkiAjGEXYXSIy4AA2tIDwaWHi0kx6OZGpxGgz+Zv+OYqqzGTtevxQ7m7C2Oxvhr9rYDzyZ6o55eKQz2eRX/Ng4sLs54kl7o9O85BQAHpCBn/R+XMIcTEumzFMz6kDLQlRQ8log== X-OriginatorOrg: nokia.onmicrosoft.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Mar 2017 13:59:18.9321 (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=[mailrelay.int.nokia.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM4PR07MB3364 Subject: [lng-odp] [API-NEXT PATCH v2 2/4] api: deprecated: add configure option and macros 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" Added configuration option --enable-deprecated to control if deprecated APIs are enabled or disabled. Added ODP_DEPRECATED_API macro into the API. Its value can be used to check if deprecated API definitions are enabled or disabled. Deprecated APIs are disabled by default. Deprecated APIs are meant to be removed completely in a later API version. Added ODP_DEPRECATE() macro to enforce deprecation of API definitions. When deprecated APIs are disabled, the macro renames API definitions so that application cannot use those any more, but a single implementation library can serve applications built with both options. Signed-off-by: Petri Savolainen --- configure.ac | 19 +++++++- doc/application-api-guide/api_guide_lines.dox | 6 +-- doc/platform-api-guide/Doxyfile | 1 + doc/process-guide/release-guide.adoc | 6 +-- include/odp/api/spec/.gitignore | 1 + include/odp/api/spec/deprecated.h.in | 50 ++++++++++++++++++++++ include/odp_api.h | 1 + platform/Makefile.inc | 1 + platform/linux-generic/Makefile.am | 1 + .../linux-generic/include/odp/api/deprecated.h | 26 +++++++++++ 10 files changed, 104 insertions(+), 8 deletions(-) create mode 100644 include/odp/api/spec/deprecated.h.in create mode 100644 platform/linux-generic/include/odp/api/deprecated.h -- 2.8.1 diff --git a/configure.ac b/configure.ac index 419c136..fe1e5b0 100644 --- a/configure.ac +++ b/configure.ac @@ -16,7 +16,8 @@ ODP_VERSION_API_MAJOR=odpapi_major_version AC_SUBST(ODP_VERSION_API_MAJOR) ODP_VERSION_API_MINOR=odpapi_minor_version AC_SUBST(ODP_VERSION_API_MINOR) -AC_CONFIG_FILES([include/odp/api/spec/version.h]) +AC_CONFIG_FILES([include/odp/api/spec/version.h + include/odp/api/spec/deprecated.h]) AM_INIT_AUTOMAKE([1.9 tar-pax subdir-objects]) AC_CONFIG_SRCDIR([helper/config.h.in]) @@ -284,7 +285,7 @@ ODP_CFLAGS="$ODP_CFLAGS -DODP_DEBUG=$ODP_DEBUG" ODP_ABI_COMPAT=1 abi_compat=yes AC_ARG_ENABLE([abi-compat], - [ --disable-abi-compat disables ABI compatible mode, enables inline code in header files], + [ --disable-abi-compat disables ABI compatible mode, enables inline code in header files], [if test "x$enableval" = "xno"; then ODP_ABI_COMPAT=0 abi_compat=no @@ -294,6 +295,19 @@ AC_ARG_ENABLE([abi-compat], AC_SUBST(ODP_ABI_COMPAT) ########################################################################## +# Enable/disable deprecated API definitions +########################################################################## +ODP_DEPRECATED_API=0 +deprecated=no +AC_ARG_ENABLE([deprecated], + [ --enable-deprecated enable deprecated API definitions], + [if test "x$enableval" = "xyes"; then + ODP_DEPRECATED_API=1 + deprecated=yes + fi]) +AC_SUBST(ODP_DEPRECATED_API) + +########################################################################## # Default warning setup ########################################################################## ODP_CFLAGS="$ODP_CFLAGS -W -Wall -Werror -Wstrict-prototypes -Wmissing-prototypes" @@ -379,6 +393,7 @@ AC_MSG_RESULT([ static libraries: ${enable_static} shared libraries: ${enable_shared} ABI compatible: ${abi_compat} + Deprecated APIs: ${deprecated} cunit: ${cunit_support} test_vald: ${test_vald} test_perf: ${test_perf} diff --git a/doc/application-api-guide/api_guide_lines.dox b/doc/application-api-guide/api_guide_lines.dox index 394e958..a6488c3 100644 --- a/doc/application-api-guide/api_guide_lines.dox +++ b/doc/application-api-guide/api_guide_lines.dox @@ -75,7 +75,7 @@ The former is a compile-time assertion and hence adds no additional path length. The latter is controlled by the ODP_NO_DEBUG compile-time switch and so is suitable for use in development/debug builds that can be compiled out for production use. Other mechanisms available to the implementer are: - ODP_ABORT() is provided for situations where further execution of the code must not occur and a level of tracing information should be left in the log. - - ODP_DEPRECATED() is used to signify that a call is planned for obsolescence. + - ODP_DEPRECATE() is used to signify that a call is planned for obsolescence. - ODP_LOG() is used to direct implementation messages to the application. @@ -197,8 +197,8 @@ This is one of the reasons why some features MAY be defined as OPTIONAL. While allowed, the proliferation of OPTIONAL features SHOULD be avoided to enable broad application portability across many implementations. At the same time, a "least common denominator" approach MUST NOT be taken as that defeats the purpose of providing higher-level abstractions in APIs. -@subsection odp_deprecated ODP DEPRECATED -A deprecated API will remain marked as such in the public API using #ODP_DEPRECATED for two release cycles for the #ODP_VERSION_API_MAJOR number. +@subsection odp_deprecate ODP DEPRECATE +A deprecated API will remain marked as such in the public API using #ODP_DEPRECATE() for two release cycles for the #ODP_VERSION_API_MAJOR number. For example an API marked as deprecated in 1.1.0 will still be present in 1.2.0 and removed in 1.3.0. A deprecated API will contain the doxygen tag \@deprecated with a description of the reason for the change. diff --git a/doc/platform-api-guide/Doxyfile b/doc/platform-api-guide/Doxyfile index fbe7c93..1f2d49a 100644 --- a/doc/platform-api-guide/Doxyfile +++ b/doc/platform-api-guide/Doxyfile @@ -17,4 +17,5 @@ PREDEFINED = __GNUC__ \ __LITTLE_ENDIAN_BITFIELD \ __x86_64__ \ ODP_PACKED \ + ODP_DEPRECATE(x)=x \ "ODP_HANDLE_T(type)=odp_handle_t type" diff --git a/doc/process-guide/release-guide.adoc b/doc/process-guide/release-guide.adoc index 8ea147a..595af91 100644 --- a/doc/process-guide/release-guide.adoc +++ b/doc/process-guide/release-guide.adoc @@ -251,7 +251,7 @@ Deleting or changing the published API follows the normal <>, * A deprecated indication is applied to the old API using the @deprecated doxygen syntax. * For a function change the old API it is additionally marked using the -ODP_DEPRECATED preprocessor macro. +ODP_DEPRECATE() preprocessor macro. * The CHANGELOG will have an entry in the API change section. * The Release Manager will resolve the duration for which the deprecated API. will be supported, and determine which future release it will be applied to. + @@ -275,7 +275,7 @@ The new API must have comparable coverage to the old API. * * @param name ... */ -odp_foo_t odp_foo_create(const char *name) ODP_DEPRECATED; +odp_foo_t ODP_DEPRECATE(odp_foo_create)(const char *name); /** * Create a bar @@ -298,7 +298,7 @@ compiler warning. * * @param name ... */ -odp_foo_t odp_foo_create(const char *name) ODP_DEPRECATED; +odp_foo_t ODP_DEPRECATE(odp_foo_create)(const char *name); ---- === Changing a struct member diff --git a/include/odp/api/spec/.gitignore b/include/odp/api/spec/.gitignore index 6702033..df9c87d 100644 --- a/include/odp/api/spec/.gitignore +++ b/include/odp/api/spec/.gitignore @@ -1 +1,2 @@ +deprecated.h version.h diff --git a/include/odp/api/spec/deprecated.h.in b/include/odp/api/spec/deprecated.h.in new file mode 100644 index 0000000..224f60f --- /dev/null +++ b/include/odp/api/spec/deprecated.h.in @@ -0,0 +1,50 @@ +/* Copyright (c) 2017, Linaro Limited + * All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +/** + * @file + * + * Macro for deprecated API definitions + */ + +#ifndef ODP_API_DEPRECATED_H_ +#define ODP_API_DEPRECATED_H_ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * Deprecated API definitions + * + * Some API definitions may be deprecated by this or a previous API version. + * This macro controls if those are enabled (and visible to the application) + * or disabled. + * + * * 0: Deprecated API definitions are disabled (default) + * * 1: Deprecated API definitions are enabled + */ +#define ODP_DEPRECATED_API @ODP_DEPRECATED_API@ + +/** + * @def ODP_DEPRECATE + * + * Macro to deprecate API definitions + */ + +#if ODP_DEPRECATED_API +#define ODP_DEPRECATE(x) x +#else +#define ODP_DEPRECATE(x) _deprecated_ ## x +#endif + +#ifdef __cplusplus +} +#endif + +#include +#endif diff --git a/include/odp_api.h b/include/odp_api.h index 73e5309..962415f 100644 --- a/include/odp_api.h +++ b/include/odp_api.h @@ -18,6 +18,7 @@ extern "C" { #endif +#include #include #include #include diff --git a/platform/Makefile.inc b/platform/Makefile.inc index 874cf88..f282770 100644 --- a/platform/Makefile.inc +++ b/platform/Makefile.inc @@ -29,6 +29,7 @@ odpapispecinclude_HEADERS = \ $(top_srcdir)/include/odp/api/spec/cpumask.h \ $(top_srcdir)/include/odp/api/spec/crypto.h \ $(top_srcdir)/include/odp/api/spec/debug.h \ + $(top_srcdir)/include/odp/api/spec/deprecated.h \ $(top_srcdir)/include/odp/api/spec/errno.h \ $(top_srcdir)/include/odp/api/spec/event.h \ $(top_srcdir)/include/odp/api/spec/hash.h \ diff --git a/platform/linux-generic/Makefile.am b/platform/linux-generic/Makefile.am index 70683ca..89c5e90 100644 --- a/platform/linux-generic/Makefile.am +++ b/platform/linux-generic/Makefile.am @@ -34,6 +34,7 @@ odpapiinclude_HEADERS = \ $(srcdir)/include/odp/api/cpumask.h \ $(srcdir)/include/odp/api/crypto.h \ $(srcdir)/include/odp/api/debug.h \ + $(srcdir)/include/odp/api/deprecated.h \ $(srcdir)/include/odp/api/errno.h \ $(srcdir)/include/odp/api/event.h \ $(srcdir)/include/odp/api/hash.h \ diff --git a/platform/linux-generic/include/odp/api/deprecated.h b/platform/linux-generic/include/odp/api/deprecated.h new file mode 100644 index 0000000..82797eb --- /dev/null +++ b/platform/linux-generic/include/odp/api/deprecated.h @@ -0,0 +1,26 @@ +/* Copyright (c) 2017, Linaro Limited + * All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +/** + * @file + * + * Control deprecated API definitions + */ + +#ifndef ODP_PLAT_DEPRECATED_H_ +#define ODP_PLAT_DEPRECATED_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +#include + +#ifdef __cplusplus +} +#endif + +#endif From patchwork Thu Mar 30 13:58:55 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petri Savolainen X-Patchwork-Id: 96296 Delivered-To: patch@linaro.org Received: by 10.140.89.233 with SMTP id v96csp252291qgd; Thu, 30 Mar 2017 07:00:58 -0700 (PDT) X-Received: by 10.55.200.88 with SMTP id c85mr5929971qkj.155.1490882457924; Thu, 30 Mar 2017 07:00:57 -0700 (PDT) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id l48si1877447qtb.285.2017.03.30.07.00.57; Thu, 30 Mar 2017 07:00:57 -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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 2E0E760C64; Thu, 30 Mar 2017 14:00:57 +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 7292463533; Thu, 30 Mar 2017 13:59:34 +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 07B6B60F57; Thu, 30 Mar 2017 13:59:22 +0000 (UTC) Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01on0095.outbound.protection.outlook.com [104.47.0.95]) by lists.linaro.org (Postfix) with ESMTPS id 61AB660AC6 for ; Thu, 30 Mar 2017 13:59:18 +0000 (UTC) Received: from HE1PR0701CA0032.eurprd07.prod.outlook.com (10.165.214.170) by HE1PR07MB0809.eurprd07.prod.outlook.com (10.162.24.148) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1005.2; Thu, 30 Mar 2017 13:59:16 +0000 Received: from DB5EUR03FT034.eop-EUR03.prod.protection.outlook.com (2a01:111:f400:7e0a::204) by HE1PR0701CA0032.outlook.office365.com (2603:10a6:3:5::42) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1005.2 via Frontend Transport; Thu, 30 Mar 2017 13:59:15 +0000 Received-SPF: SoftFail (protection.outlook.com: domain of transitioning linaro.org discourages use of 131.228.2.240 as permitted sender) Received: from mailrelay.int.nokia.com (131.228.2.240) by DB5EUR03FT034.mail.protection.outlook.com (10.152.20.87) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.1005.5 via Frontend Transport; Thu, 30 Mar 2017 13:59:15 +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 v2UDwu3G028533 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 30 Mar 2017 16:58:56 +0300 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 v2UDwu7M028515 (version=TLSv1/SSLv3 cipher=AES128-SHA256 bits=128 verify=NOT) for ; Thu, 30 Mar 2017 16:58:56 +0300 X-HPESVCS-Source-Ip: 10.144.104.219 From: Petri Savolainen To: Date: Thu, 30 Mar 2017 16:58:55 +0300 Message-ID: <1490882336-13721-4-git-send-email-petri.savolainen@linaro.org> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1490882336-13721-1-git-send-email-petri.savolainen@linaro.org> References: <1490882336-13721-1-git-send-email-petri.savolainen@linaro.org> X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:131.228.2.240; IPV:CAL; CTRY:FI; EFV:NLI; SFV:NSPM; SFS:(10019020)(6009001)(39410400002)(39400400002)(39850400002)(39450400003)(39860400002)(39840400002)(2980300002)(189002)(199003)(9170700003)(2950100002)(6916009)(5660300001)(50466002)(8676002)(77096006)(48376002)(81166006)(5003940100001)(38730400002)(36756003)(189998001)(53936002)(110136004)(33646002)(2351001)(86362001)(106466001)(76176999)(105596002)(50986999)(8936002)(47776003)(50226002)(305945005)(22756006)(2906002)(356003)(217873001); DIR:OUT; SFP:1102; SCL:1; SRVR:HE1PR07MB0809; H:mailrelay.int.nokia.com; FPR:; SPF:SoftFail; MLV:sfv; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; DB5EUR03FT034; 1:p++IpVECLYAZAdDBBo/PlE4moZ0jED648Km5YYvoqslVbKxm0YAr0/0lzEkW94NPCbWTTodvwuGzq0NvfYdkv3wLmJOp+DwTM+xITWpqHB10AbLQkDYsa6SjCgUo/ezkO9pF1AXABJ4J0tYz7pVbtXTYFWW8K6xiX829i88wjNjHHJXJ/sgPz4fLh8KaU2LefQVgvjyZ9qF8QLSzkjqq62pQaxXu4rI30dWE/8X5NlNNPhwutau9lCTosdHLQI5qVn5yOlIOakU9nReMCy4SlymVF+z4PldVvnx+SIluI73LCtSqB9sGGJqGlbzod1isq3io6vPGNMFXSUiJclvFVdaiZNKeM+/Iks2tEcL/6d6BjZGSqk27STDerxMgi3qN5XMDEt4gzfTLeGi3pbvHh/twKZCGel4N+jDfQO/BSaZv20OI3zjcP3h8/K/0pQ9HHT8H2MR/c6a+CHwTVFku1zR1Hy+wUeGJA52apT4/mtiFKhpEzlNcodvDM8Y2Mt89uqIYorlZ10PVSRUKqe1cBQ== MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: fedf99f0-6857-4568-f78b-08d47774f3c1 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254075)(2017030256075)(201703131423075)(201703031133081); SRVR:HE1PR07MB0809; X-Microsoft-Exchange-Diagnostics: 1; HE1PR07MB0809; 3:6SEiLhvEnM2FnrqDSS0eAu/kFvEFfe5mFUAEyd03PWprcW1OqSPYqbCVcMFi7AiEqdboGgBSBFsClUYvrfeEG7JKM6PhJyIDJJPwRFbOXyYVMPKKK2E0t7YlSFBzj8msSmC8m/eI46M01089Fw2CtRJpDxpww2DjAkoqNcly/ytrMFytgyCdEIPT1JxPSRxSXF/GFk3f+ZOpR9vxVCN/22plkz60G8zgcV3vzDa0wjoHil2VBOgSaqkwX7tMmtkYj0StCYmB/JkQM4h0Rgdzia5wtaqV/5wpXpmFUFMw7txIn6D83j5sPdV6K2xOXbjvGhcVuLCrYZbHcI6DeppxMqMT1yHkY8afncRKczIo33sCi7O2BlRUIOUkkSwNBhFUJebrwYUfZJMXVp3rOExEHTpj2GTJjd2TGZvU7DCIpbCCBx3anxZT0QCKzEu9+W/Aq2l3lwJA0aGLImfAQ1EtgtYKtxnRP+VDyND3yrL2wO7+3HMbFqTcxFNicxjO/b+0 X-Microsoft-Exchange-Diagnostics: 1; HE1PR07MB0809; 25:zlw7Co49BASbf5wWA+OVdzTXiV5bIElaxVtjlZQSttmESzYafyt4twvmu/AkTeRsGIkZ98Mrtc9KWLy/tnDwCgG/qwcZ4le/6eu7f5PkKN/djBSFmMMa8SBJAhGvMFHkvnd08keN0wEEz0YWAKuQhpk53Y42o+MGmJY67JCooxLafTvtJC1MhiMwgqWdbHeFbzAqtgEZpDez95UEmGFkos/knuRi8wxSHhlXWt3bAmq61egk+dwf2hkt3IoaR9AuexzYO83evzt3kwnqShzK/TA50ECmakml47PnBtQVpNPXxuiF4yPDpG+NCBx8N+mRKv0DsVa+h+RmXqHcamHwVf5i03x+jNREwA48LEau+vwwzC3kkfcxd6evMXBZ0/m/HYGJjW8uBeMBkz1tWgl+dj104/1CvXprYkKTxQ0buDaugUqE2QX9691KhNUkYBN+wZgunsXRK8wIl7iiXCN3lg==; 31:fxkocHwdRSlLJsdpN3ZifsLSrNc1ibwwve3aE6A43isE1ccSvq4sxKVzD9s52B2JyXNSkskpKu88yNQOmAmudnM7RUEkYDxgIWxenLzxhHDlnFJZHx4IiziD1LLCztRUUDReBjvaoHgYxay/Nlpc6MXzdhbThViRy975iXr/k9XlAOjY5WdkUVMBBz86lwUGT+KUy5ftj6OANCbMUekK7m/9Fcfe8mlliGKzRPC4sFhRHBDi/45J6osFNv0N0xD7iEwDFO94cBBxZk68Z813GA== X-Microsoft-Exchange-Diagnostics: 1; HE1PR07MB0809; 20:Az7ZmYXYCq22UuAoBXrgMb7T4hO2fLPS6fbhTmKy4hr0R2oXDiYPunkhzBUiAALPXZjklw2jB/51ZmguL781xanNrw+/3YWjntweUOJxP1ppu2oEWbrmlBOsfKwiqsZYNlBGjcH0uXDDruNo+9KVcK4PpkKEqPR1kjuXCyoZIAZqdhlkAkGpSa/36h5j1jslzekuc26Qb/pKMP7mcyEgaPWU8wIQ/wwYJRM7paIWN+/MQ1cgyTLhtQyGE1OUsSCmPbMNP61AfE+XB5Lgkbv8lL1DUAFBy+/+rMLeF940kdv2JTcUFjy/6IlAnlWP7P9SAuoK4H9XNjMRPumrZ+RoJ9yRovTT7Jl/Anc+hVMNK19vt2tg2ZikbbEg8eTMSYpnEpFhKp1hncF/h2AcSU6h/tA2bXAez+Onmm52vNqFsg++UosZz1GzwA6HicJSjoTaH6oCipWNo3ge0M/YsXpfg2R+bWKTrnhUhdRN1AfrxLb5YA7185LzhSZji7aCltubh6YQPGJi+u84bL5HiVZtNLSwW0ioex4tNyQHstTMdUWABfEt1X3sMpqh1zS9BCw9DBwB6RySFgZcRV3euFBJgjBkIGa0LsPBj8ndwDuENmE= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040450)(601004)(2401047)(8121501046)(5005006)(13013025)(13023025)(13021025)(10201501046)(3002001)(6055026)(6041248)(20161123560025)(201703131423075)(201702281528075)(201703061421075)(20161123555025)(20161123564025)(20161123562025)(6072148); SRVR:HE1PR07MB0809; BCL:0; PCL:0; RULEID:; SRVR:HE1PR07MB0809; X-Microsoft-Exchange-Diagnostics: 1; HE1PR07MB0809; 4:byHTlV4vULEM2W28fD4YuNQgXaWtJ1LL0G/LwgtkYsyPYnw4GLT95wDtMqcabLUkG2vb/kVCw4kbS9kwrJed5v2EbJmaTOJAEXhbx/D2P8ckpvgaImdHRfQD6138qkFA8bhtrTvP9S99BAnpBSpevugdN84RMLpmnTgVsFVR6ctbmHQGSDzzhsecb+tdPMTvB/KX4y6tCnxChRc6I0GP55Izs5yhVThet79ZGAWKFpD6KhPVMzhPfZmZ0a5S0Sw5xa8Mi5xUU5uq8nj8cv+LVxag6RZzB2aOTRebTs5V7LsrMJp9NVKeenRYLNCyDaypP67ENFTgYx21lsESQTeM7i4pWRmDB6RWfGH4NUYOHO8vxZnSHq2IfSBGYVCNC7TmgHx3ujDMPtciu71XRCs+Med2IHCFBqONxqhPcL+MZwy/oq6mRK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Vg9ooxPB1xMkZhWEd6ANuAdS0gHyEdyBxRG3ks= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; HE1PR07MB0809; 7:brdZtEv9chVPoVgTqQw8nKf5Woa/5Of718tRfugJwjym/gta9fiNfnQBb3/mRZRjci4pg/xdhmqLbWPLE8Bd2+O6dzL6eNoy/pIiQ+FjzPTTV7YnlOstfBN0gv7kR5dCI9QzBfhgqslPuh9riDZ2eZqKNTf/J35z3T/BgrNw21cauKuVm8V2ddFG0bocYoeicvj4GAAEX2bIvPBbsdQ2Vtwef2bnKVhU+I4JdJi3HQO/VspDC2pNf3wnsVG6W73UDxEU2iJerS4VcqPl3RkCQ7LKkAymfYC3FyBISg6+AQdV0zuW4phyWYV1/Fyih+XuZ0tuK4lqHLMkkiFRQgnHxA== X-OriginatorOrg: nokia.onmicrosoft.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Mar 2017 13:59:15.3538 (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=[mailrelay.int.nokia.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR07MB0809 Subject: [lng-odp] [API-NEXT PATCH v2 3/4] test: crypto: remove references to deprecated crypto apis 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" Remove last remaining references to deprecated API definitions. Signed-off-by: Petri Savolainen --- example/ipsec/odp_ipsec_misc.h | 4 ++-- example/ipsec/odp_ipsec_sa_db.c | 4 ++-- example/ipsec/odp_ipsec_stream.c | 6 +++--- test/common_plat/performance/odp_crypto.c | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) -- 2.8.1 diff --git a/example/ipsec/odp_ipsec_misc.h b/example/ipsec/odp_ipsec_misc.h index e0320eb..45cb022 100644 --- a/example/ipsec/odp_ipsec_misc.h +++ b/example/ipsec/odp_ipsec_misc.h @@ -98,10 +98,10 @@ int parse_key_string(char *keystring, key->length = key_bits_in / 8; } else { - if ((alg->u.auth == ODP_AUTH_ALG_MD5_96) && + if ((alg->u.auth == ODP_AUTH_ALG_MD5_HMAC) && (KEY_BITS_MD5_96 == key_bits_in)) key->length = key_bits_in / 8; - else if ((alg->u.auth == ODP_AUTH_ALG_SHA256_128) && + else if ((alg->u.auth == ODP_AUTH_ALG_SHA256_HMAC) && (KEY_BITS_SHA256_128 == key_bits_in)) key->length = key_bits_in / 8; } diff --git a/example/ipsec/odp_ipsec_sa_db.c b/example/ipsec/odp_ipsec_sa_db.c index 28215b5..10bbcb8 100644 --- a/example/ipsec/odp_ipsec_sa_db.c +++ b/example/ipsec/odp_ipsec_sa_db.c @@ -111,11 +111,11 @@ int create_sa_db_entry(char *input, odp_bool_t cipher) } else { if (0 == strcmp(token, "md5")) { entry->alg.u.auth = - ODP_AUTH_ALG_MD5_96; + ODP_AUTH_ALG_MD5_HMAC; entry->icv_len = 12; } else if (!strcmp(token, "sha256")) { entry->alg.u.auth = - ODP_AUTH_ALG_SHA256_128; + ODP_AUTH_ALG_SHA256_HMAC; entry->icv_len = 16; } else { entry->alg.u.auth = ODP_AUTH_ALG_NULL; diff --git a/example/ipsec/odp_ipsec_stream.c b/example/ipsec/odp_ipsec_stream.c index 428ec04..15087cb 100644 --- a/example/ipsec/odp_ipsec_stream.c +++ b/example/ipsec/odp_ipsec_stream.c @@ -227,8 +227,8 @@ odp_packet_t create_ipv4_packet(stream_db_entry_t *stream, /* AH (if specified) */ if (entry && (entry == stream->input.entry) && (ODP_AUTH_ALG_NULL != entry->ah.alg)) { - if (entry->ah.alg != ODP_AUTH_ALG_MD5_96 && - entry->ah.alg != ODP_AUTH_ALG_SHA256_128) + if (entry->ah.alg != ODP_AUTH_ALG_MD5_HMAC && + entry->ah.alg != ODP_AUTH_ALG_SHA256_HMAC) abort(); ah = (odph_ahhdr_t *)data; @@ -424,7 +424,7 @@ odp_bool_t verify_ipv4_packet(stream_db_entry_t *stream, return FALSE; if (odp_be_to_cpu_32(ah->spi) != entry->ah.spi) return FALSE; - if (ODP_AUTH_ALG_MD5_96 != entry->ah.alg) + if (ODP_AUTH_ALG_MD5_HMAC != entry->ah.alg) abort(); } else { if (entry && (ODP_AUTH_ALG_NULL != entry->ah.alg)) diff --git a/test/common_plat/performance/odp_crypto.c b/test/common_plat/performance/odp_crypto.c index 954bdb7..b385797 100644 --- a/test/common_plat/performance/odp_crypto.c +++ b/test/common_plat/performance/odp_crypto.c @@ -205,7 +205,7 @@ static crypto_alg_config_t algs_config[] = { .data = test_iv, .length = 8, }, - .auth_alg = ODP_AUTH_ALG_MD5_96, + .auth_alg = ODP_AUTH_ALG_MD5_HMAC, .auth_key = { .data = test_key16, .length = sizeof(test_key16) @@ -217,7 +217,7 @@ static crypto_alg_config_t algs_config[] = { .name = "null-hmac-md5-96", .session = { .cipher_alg = ODP_CIPHER_ALG_NULL, - .auth_alg = ODP_AUTH_ALG_MD5_96, + .auth_alg = ODP_AUTH_ALG_MD5_HMAC, .auth_key = { .data = test_key16, .length = sizeof(test_key16) From patchwork Thu Mar 30 13:58:56 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petri Savolainen X-Patchwork-Id: 96297 Delivered-To: patch@linaro.org Received: by 10.140.89.233 with SMTP id v96csp252794qgd; Thu, 30 Mar 2017 07:01:42 -0700 (PDT) X-Received: by 10.237.38.65 with SMTP id z59mr6281461qtc.215.1490882502850; Thu, 30 Mar 2017 07:01:42 -0700 (PDT) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id c67si1869684qkf.310.2017.03.30.07.01.42; Thu, 30 Mar 2017 07:01:42 -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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 6A9BB60C60; Thu, 30 Mar 2017 14:01: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 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 328E563539; Thu, 30 Mar 2017 13:59:35 +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 A5BB360C61; Thu, 30 Mar 2017 13:59:23 +0000 (UTC) Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01on0113.outbound.protection.outlook.com [104.47.0.113]) by lists.linaro.org (Postfix) with ESMTPS id 32C6C60BED for ; Thu, 30 Mar 2017 13:59:19 +0000 (UTC) Received: from HE1PR0701CA0019.eurprd07.prod.outlook.com (10.165.214.157) by HE1PR07MB0811.eurprd07.prod.outlook.com (10.162.24.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1005.2; Thu, 30 Mar 2017 13:59:17 +0000 Received: from DB5EUR03FT034.eop-EUR03.prod.protection.outlook.com (2a01:111:f400:7e0a::209) by HE1PR0701CA0019.outlook.office365.com (2603:10a6:3:5::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1019.8 via Frontend Transport; Thu, 30 Mar 2017 13:59:16 +0000 Received-SPF: SoftFail (protection.outlook.com: domain of transitioning linaro.org discourages use of 131.228.2.240 as permitted sender) Received: from mailrelay.int.nokia.com (131.228.2.240) by DB5EUR03FT034.mail.protection.outlook.com (10.152.20.87) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.1005.5 via Frontend Transport; Thu, 30 Mar 2017 13:59:16 +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 v2UDwuFt028536 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 30 Mar 2017 16:58:56 +0300 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 v2UDwu7N028515 (version=TLSv1/SSLv3 cipher=AES128-SHA256 bits=128 verify=NOT) for ; Thu, 30 Mar 2017 16:58:56 +0300 X-HPESVCS-Source-Ip: 10.144.104.219 From: Petri Savolainen To: Date: Thu, 30 Mar 2017 16:58:56 +0300 Message-ID: <1490882336-13721-5-git-send-email-petri.savolainen@linaro.org> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1490882336-13721-1-git-send-email-petri.savolainen@linaro.org> References: <1490882336-13721-1-git-send-email-petri.savolainen@linaro.org> X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:131.228.2.240; IPV:CAL; CTRY:FI; EFV:NLI; SFV:NSPM; SFS:(10019020)(6009001)(39450400003)(39410400002)(39400400002)(39850400002)(39840400002)(39860400002)(2980300002)(189002)(199003)(9170700003)(36756003)(76176999)(50986999)(110136004)(106466001)(2950100002)(6916009)(33646002)(5660300001)(105596002)(2906002)(38730400002)(575784001)(2351001)(22756006)(48376002)(189998001)(305945005)(8936002)(86362001)(47776003)(50226002)(77096006)(81166006)(53936002)(50466002)(5003940100001)(356003)(8676002)(217873001); DIR:OUT; SFP:1102; SCL:1; SRVR:HE1PR07MB0811; H:mailrelay.int.nokia.com; FPR:; SPF:SoftFail; MLV:sfv; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; DB5EUR03FT034; 1:LrtMlz5692HcIPx5GSz2IT8sl+NXMbzlMfr+yJxjnJeoVog0aSx+32qIJC1ZTorC1WKOiphsctfkTM5Ny0ug6jQFIuiBIZiQKwA3n/C2fKIv6UxrGcZS1jNuqFD+qhw0mWyF5naRBjoOOHng+j2RPVWBC8oVL5UEXSp9VM9fYm0mT/1gYin3cegbYx5bvT4y6K53o0aoXBOnecfQ+XdhNx/vcK5ECUlmAjVmh8n50dOlpJvyb53bhaf95/tvUiWWhtTk0pVezk5CCgTLH/vdaQeNxPq7wOZ1yx/sISz0rqN1sCiAduRgH2GZBynhCgpGV4Nfup9J+sxAWjGdxQlOYX2YnKGcWR+FBJPo8Q0ReksjmK/4GhicBOkMA4tuY9KIC+MJrGCtZPnsz2hF+oGOe6aHDCG4G0KRks9S8LZd2xex6oIj1KsKo7KunpSoS/zvDJf0zWAhgO8hoWI6H+izZzlE0jBGpYEU3YBkZ8dU0N7UlieRMVeiuoP2JgQ4E1cMqhqU0KMjPzlzyi2d70ZOiw== MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: 8817e1c5-0e4a-414c-2cee-08d47774f477 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254075)(2017030256075)(201703131423075)(201703031133081); SRVR:HE1PR07MB0811; X-Microsoft-Exchange-Diagnostics: 1; HE1PR07MB0811; 3:LaKI2QCDrX4hUWU5khvMOWI5uBpq7Vbs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MBg0QlYSPwE4m82SdK0K4YxtSQxITVx1m4pXWsYpaq/aJm2XsxsmMgWxHAEjorchRQHp8FqTRHy50mBfVxiM+VGhjfDCiJtudLHTumWVyRsLDcBlywUbwwql1KQZAJfVXLOEYnxZpx4So/+YbVhlP6rljBYTsbEo8Mm/1xtRPGmPDM+w== X-Microsoft-Exchange-Diagnostics: 1; HE1PR07MB0811; 20:SHINW/+JC2gxI+OYMQu2vZ6NHrIENmTvE/ePux8Hp8GcpJMC9EF0c6ESpor+Y6j2fYkPSuRyjGb3QHJvO/XkzvvevojLn3sG/NRVNFnyFemVvfi/Nv7uo4IVIKTJ/Cd+PwFZSyb5LpkKzh8WoVrPU5iPYGRKGGL+3Yra4dzwKKGrywcKWfizftP3r4DsAWL2qXorumx7mASLYxli0FIB+XYta7GBuQYjvyERVeH9l1HP1N4SmZm0l9RYxGa3YraXrIiMDayRHdYuj8x2Bl1mAjO0AwkGSt4esgryUrjCepZugemn62iIdgS44gt3ezt55LaIcdJIYn7V44SMa1rKR5e4riyAvNoOgT6h4/C2Pz40h3mI/9MEX+9FGrMdzLNQqZKpnQHNFlLPEe1k9pSHacUuPKrdZ8ybOiiCHIyP7LxD8gsnyS8ftAuTiCqnsFKmUhE+b8gQz2A6gIABAScYuxOMyboOANoe8OM0OqeLrpElPDYT7z4YHbahgHxpLqAiUF6vuS8uup0NPOfunUrzUAOPH66ZHbAIhJiH5jrQ6Cl2to6nR/NM6+M+Kq8js5M9wmaW/0n+6drCmcPFdLDDEv668m4DHZS7++BQei0xiSg= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040450)(601004)(2401047)(8121501046)(13013025)(5005006)(13023025)(13021025)(10201501046)(3002001)(6055026)(6041248)(20161123555025)(20161123562025)(20161123564025)(20161123560025)(201703131423075)(201702281528075)(201703061421075)(6072148); SRVR:HE1PR07MB0811; BCL:0; PCL:0; RULEID:; SRVR:HE1PR07MB0811; X-Microsoft-Exchange-Diagnostics: 1; HE1PR07MB0811; 4:pRj48JN8eSIs0/rBkS/B8qsvHoB543ux8YVvB5YRoANWZYuBSSjn0i3mLv/Hoba98ClJDivntXmrRmhRat82xHwB+Gs40ru2HBN5AtUwqDtcGD0J+vUSDaOcvz7nLGTDQEym0TxuxL9ucax4R8UKIe9oLs1Y+ShP9y+azh8quo6WrWPg0sLL51KoX45UAV9dljQe0E5eC4GlnP1US2ACrMqKfgckt8J45bvwcD9innEL9edJCLAXLSl5WPECzm6FP3uYtXFYAsxKzKGzTyK4syn98dsCkpD/FK06IBj+d3Vsqb40BSbvUMcQG+W/fvv4V+0LBNndKTaiImE5zl++LktIOxyb0quz3S5pP68AC9hZtY+ivUv8fL7xutuyFtbsnktEzG1a5gwAEVgLPlkf7pU8QiJ77ECH0F05IKqUrjPimpAe+LnTrrcc0XBF0ODGI6hg+NQQOZJ1AWYWhNtZUqs5ePAkpLNwWaSZVVVjBb7Ra52/H2kQN3tzpysgoE6j5AR3FBUWQyiUSVXlYfBrb8BLg/vClh3le5kwyxjTF839IF8lHMVtz4fSZFB930lOxwGaptTrY5BmykTVHfKFFShn9dXuqB7M3S5lle4c+bRlz6Kv1Pw3g7JsifZ0CRijoadb+2qpLDSPYkfiuU3IrRxVZoN7RUXYMMA397sfUrqTeFwDbQ0KNu9FN81yHVqHHFi5aE6+5ShbbQtsJ1qakjmgZnk6cL3gXS/MPZUBqw6LBFM1HQzPwGPFVxehMBuB X-Forefront-PRVS: 02622CEF0A X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; HE1PR07MB0811; 23:406qZaGQLbdvi6GculHNSEkpiTyAdcZYvutQ0pMqb?= Gw8T4yrdwybWQTFpdvnXPKN/g61ROtH6iqF30qZgTC0gKbTW/j+NRD3VfLMlb34BcfioLIabWjRV1TOv/BkR985fUVtPx7K+HskeueIPZ+w0ygXdcGwg8GqrxGWvKu3kN98JrP6nQeGQarzCRcPsIvwI5Zfd5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H81fJDa8MlSGi/W8xQzmz+1uftYQCqJKUhCERdvMafqBBn6PpUsi57aBkfnF0vXsY9CxH4fKyItn/01bqDIxHnerE9UlDwhX0LzI4piTFuy2PIW6dwK02Y3FBZue3iuHsHrNhXF0kWEN/dKjGRPKLp1ieDlz3H/hBzcEoj0NwIstWFMqBy5YasSLYwvfRKvmczZupRdB0FroQzzNGRqTWpmOxKZxoUcW1c17NHDvTP2b0Di1bT0w4jXkkwaC8=; 5:bUZPGobrmJ80MF22Xt8nt2vK3YCSbAaddWq3zWO9OBqK7ElbNoh4cFuJ5RYLZ3iPWUbgRpX00TWF4NwVxFant9mcPYfyQjD6fJ+abNmYC4pF7WFTpdL+91ap+h6FYXVeaQx8S+JJrBmLLNbw4CXw4A==; 24:ZnsHwDMjBVCs3FMlf6Iz2BYy1qO0gYvAwy84RhmAtqQpl54PcakqOw0cKMRNLetp/8wqlgYIo3sAnb1gmd+wB/pg5vlbP8gyQbdmBrPfQlo= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; HE1PR07MB0811; 7:zafj8QDIxl8UnFsbAgi8/JvAkJdqzm5eSV8bqBydYh5WB8uo9nxOyTJpIbt85PrA+S+PV4C2QBf3ZZbKxsjQyRJ4iTwD32VCEYWro3lNOe9VzRUfAC4aR0UG0jtXPY2XMPnx+F5/IC+JgfRZELH1pCoHzoXljg/26jvPLidddvsjWQqLSXUSJ8aYcAiuSUdfWYM/YwcGscyJNioAT4xEqfWNomRFSVAiibgJpVwCsKzKH673Uyx0XqUmzKNuACirUF4H601U5vNN2drjM0FJjpBXHZIP6tN9krcViqprw2NS67REorsc+XeOWe1lAS/5NV2pc/SteMOHGsNVD0mOmw== X-OriginatorOrg: nokia.onmicrosoft.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Mar 2017 13:59:16.5570 (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=[mailrelay.int.nokia.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR07MB0811 Subject: [lng-odp] [API-NEXT PATCH v2 4/4] api: crypto: enforce deprecated API status 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" Used ODP_DEPRECATE() to control if deprecated API definitions are visible in the API or not. Signed-off-by: Petri Savolainen --- include/odp/api/spec/crypto.h | 29 ++++++++++++++---------- platform/linux-generic/odp_crypto.c | 45 +++++++++++++++++++++++++------------ 2 files changed, 48 insertions(+), 26 deletions(-) -- 2.8.1 Reviewed-by: Dmitry Eremin-Solenikov diff --git a/include/odp/api/spec/crypto.h b/include/odp/api/spec/crypto.h index d30f050..181c0cc 100644 --- a/include/odp/api/spec/crypto.h +++ b/include/odp/api/spec/crypto.h @@ -15,6 +15,8 @@ #define ODP_API_CRYPTO_H_ #include +#include + #ifdef __cplusplus extern "C" { #endif @@ -82,10 +84,10 @@ typedef enum { ODP_CIPHER_ALG_AES_GCM, /** @deprecated Use ODP_CIPHER_ALG_AES_CBC instead */ - ODP_CIPHER_ALG_AES128_CBC, + ODP_DEPRECATE(ODP_CIPHER_ALG_AES128_CBC), /** @deprecated Use ODP_CIPHER_ALG_AES_GCM instead */ - ODP_CIPHER_ALG_AES128_GCM + ODP_DEPRECATE(ODP_CIPHER_ALG_AES128_GCM) } odp_cipher_alg_t; @@ -127,13 +129,14 @@ typedef enum { ODP_AUTH_ALG_AES_GCM, /** @deprecated Use ODP_AUTH_ALG_MD5_HMAC instead */ - ODP_AUTH_ALG_MD5_96, + ODP_DEPRECATE(ODP_AUTH_ALG_MD5_96), /** @deprecated Use ODP_AUTH_ALG_SHA256_HMAC instead */ - ODP_AUTH_ALG_SHA256_128, + ODP_DEPRECATE(ODP_AUTH_ALG_SHA256_128), /** @deprecated Use ODP_AUTH_ALG_AES_GCM instead */ - ODP_AUTH_ALG_AES128_GCM + ODP_DEPRECATE(ODP_AUTH_ALG_AES128_GCM) + } odp_auth_alg_t; /** @@ -158,10 +161,11 @@ typedef union odp_crypto_cipher_algos_t { uint32_t aes_gcm : 1; /** @deprecated Use aes_cbc instead */ - uint32_t aes128_cbc : 1; + uint32_t ODP_DEPRECATE(aes128_cbc) : 1; /** @deprecated Use aes_gcm instead */ - uint32_t aes128_gcm : 1; + uint32_t ODP_DEPRECATE(aes128_gcm) : 1; + } bit; /** All bits of the bit field structure @@ -196,13 +200,14 @@ typedef union odp_crypto_auth_algos_t { uint32_t aes_gcm : 1; /** @deprecated Use md5_hmac instead */ - uint32_t md5_96 : 1; + uint32_t ODP_DEPRECATE(md5_96) : 1; /** @deprecated Use sha256_hmac instead */ - uint32_t sha256_128 : 1; + uint32_t ODP_DEPRECATE(sha256_128) : 1; /** @deprecated Use aes_gcm instead */ - uint32_t aes128_gcm : 1; + uint32_t ODP_DEPRECATE(aes128_gcm) : 1; + } bit; /** All bits of the bit field structure @@ -317,7 +322,7 @@ typedef struct odp_crypto_session_param_t { } odp_crypto_session_param_t; /** @deprecated Use odp_crypto_session_param_t instead */ -typedef odp_crypto_session_param_t odp_crypto_session_params_t; +typedef odp_crypto_session_param_t ODP_DEPRECATE(odp_crypto_session_params_t); /** * Crypto API per packet operation parameters @@ -373,7 +378,7 @@ typedef struct odp_crypto_op_param_t { } odp_crypto_op_param_t; /** @deprecated Use odp_crypto_op_param_t instead */ -typedef odp_crypto_op_param_t odp_crypto_op_params_t; +typedef odp_crypto_op_param_t ODP_DEPRECATE(odp_crypto_op_params_t); /** * Crypto API session creation return code diff --git a/platform/linux-generic/odp_crypto.c b/platform/linux-generic/odp_crypto.c index 2ba504b..228e598 100644 --- a/platform/linux-generic/odp_crypto.c +++ b/platform/linux-generic/odp_crypto.c @@ -644,12 +644,13 @@ int odp_crypto_capability(odp_crypto_capability_t *capa) capa->auths.bit.sha512_hmac = 0; capa->auths.bit.aes_gcm = 1; - /* Deprecated */ +#if ODP_DEPRECATED_API capa->ciphers.bit.aes128_cbc = 1; capa->ciphers.bit.aes128_gcm = 1; capa->auths.bit.md5_96 = 1; capa->auths.bit.sha256_128 = 1; capa->auths.bit.aes128_gcm = 1; +#endif capa->max_sessions = MAX_SESSIONS; @@ -740,6 +741,7 @@ odp_crypto_session_create(odp_crypto_session_param_t *param, { int rc; odp_crypto_generic_session_t *session; + int aes_gcm = 0; /* Default to successful result */ *status = ODP_CRYPTO_SES_CREATE_ERR_NONE; @@ -782,17 +784,21 @@ odp_crypto_session_create(odp_crypto_session_param_t *param, rc = process_des_param(session); break; case ODP_CIPHER_ALG_AES_CBC: - /* deprecated */ +#if ODP_DEPRECATED_API case ODP_CIPHER_ALG_AES128_CBC: +#endif rc = process_aes_param(session); break; - case ODP_CIPHER_ALG_AES_GCM: - /* deprecated */ +#if ODP_DEPRECATED_API case ODP_CIPHER_ALG_AES128_GCM: + if (param->auth_alg == ODP_AUTH_ALG_AES128_GCM) + aes_gcm = 1; + /* Fallthrough */ +#endif + case ODP_CIPHER_ALG_AES_GCM: /* AES-GCM requires to do both auth and * cipher at the same time */ - if (param->auth_alg == ODP_AUTH_ALG_AES_GCM || - param->auth_alg == ODP_AUTH_ALG_AES128_GCM) + if (param->auth_alg == ODP_AUTH_ALG_AES_GCM || aes_gcm) rc = process_aes_gcm_param(session); else rc = -1; @@ -807,6 +813,8 @@ odp_crypto_session_create(odp_crypto_session_param_t *param, return -1; } + aes_gcm = 0; + /* Process based on auth */ switch (param->auth_alg) { case ODP_AUTH_ALG_NULL: @@ -814,22 +822,27 @@ odp_crypto_session_create(odp_crypto_session_param_t *param, rc = 0; break; case ODP_AUTH_ALG_MD5_HMAC: - /* deprecated */ +#if ODP_DEPRECATED_API case ODP_AUTH_ALG_MD5_96: +#endif rc = process_md5_param(session, 96); break; case ODP_AUTH_ALG_SHA256_HMAC: - /* deprecated */ +#if ODP_DEPRECATED_API case ODP_AUTH_ALG_SHA256_128: +#endif rc = process_sha256_param(session, 128); break; - case ODP_AUTH_ALG_AES_GCM: - /* deprecated */ +#if ODP_DEPRECATED_API case ODP_AUTH_ALG_AES128_GCM: + if (param->cipher_alg == ODP_CIPHER_ALG_AES128_GCM) + aes_gcm = 1; + /* Fallthrough */ +#endif + case ODP_AUTH_ALG_AES_GCM: /* AES-GCM requires to do both auth and * cipher at the same time */ - if (param->cipher_alg == ODP_CIPHER_ALG_AES_GCM || - param->cipher_alg == ODP_CIPHER_ALG_AES128_GCM) { + if (param->cipher_alg == ODP_CIPHER_ALG_AES_GCM || aes_gcm) { session->auth.func = null_crypto_routine; rc = 0; } else { @@ -854,10 +867,14 @@ odp_crypto_session_create(odp_crypto_session_param_t *param, int odp_crypto_session_destroy(odp_crypto_session_t session) { odp_crypto_generic_session_t *generic; + int aes_gcm = 0; generic = (odp_crypto_generic_session_t *)(intptr_t)session; - if (generic->p.cipher_alg == ODP_CIPHER_ALG_AES128_GCM || - generic->p.cipher_alg == ODP_CIPHER_ALG_AES_GCM) +#if ODP_DEPRECATED_API + if (generic->p.cipher_alg == ODP_CIPHER_ALG_AES128_GCM) + aes_gcm = 1; +#endif + if (generic->p.cipher_alg == ODP_CIPHER_ALG_AES_GCM || aes_gcm) EVP_CIPHER_CTX_free(generic->cipher.data.aes_gcm.ctx); memset(generic, 0, sizeof(*generic)); free_session(generic);