get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/75547/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 75547,
    "url": "http://patches.dpdk.org/api/patches/75547/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20200814095942.1726-1-adamx.dybkowski@intel.com/",
    "project": {
        "id": 1,
        "url": "http://patches.dpdk.org/api/projects/1/?format=api",
        "name": "DPDK",
        "link_name": "dpdk",
        "list_id": "dev.dpdk.org",
        "list_email": "dev@dpdk.org",
        "web_url": "http://core.dpdk.org",
        "scm_url": "git://dpdk.org/dpdk",
        "webscm_url": "http://git.dpdk.org/dpdk",
        "list_archive_url": "https://inbox.dpdk.org/dev",
        "list_archive_url_format": "https://inbox.dpdk.org/dev/{}",
        "commit_url_format": ""
    },
    "msgid": "<20200814095942.1726-1-adamx.dybkowski@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20200814095942.1726-1-adamx.dybkowski@intel.com",
    "date": "2020-08-14T09:59:42",
    "name": "cryptodev: revert ABI compatibility for ChaCha20-Poly1305",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "56e8678f0055cde9143aa54137cbdc5279b495ff",
    "submitter": {
        "id": 1322,
        "url": "http://patches.dpdk.org/api/people/1322/?format=api",
        "name": "Dybkowski, AdamX",
        "email": "adamx.dybkowski@intel.com"
    },
    "delegate": {
        "id": 6690,
        "url": "http://patches.dpdk.org/api/users/6690/?format=api",
        "username": "akhil",
        "first_name": "akhil",
        "last_name": "goyal",
        "email": "gakhil@marvell.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20200814095942.1726-1-adamx.dybkowski@intel.com/mbox/",
    "series": [
        {
            "id": 11651,
            "url": "http://patches.dpdk.org/api/series/11651/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=11651",
            "date": "2020-08-14T09:59:42",
            "name": "cryptodev: revert ABI compatibility for ChaCha20-Poly1305",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/11651/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/75547/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/75547/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@inbox.dpdk.org",
        "Delivered-To": "patchwork@inbox.dpdk.org",
        "Received": [
            "from dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 08C03A04B0;\n\tFri, 14 Aug 2020 11:59:48 +0200 (CEST)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 42BD81C0CE;\n\tFri, 14 Aug 2020 11:59:48 +0200 (CEST)",
            "from mga04.intel.com (mga04.intel.com [192.55.52.120])\n by dpdk.org (Postfix) with ESMTP id 3F8E51C0CD\n for <dev@dpdk.org>; Fri, 14 Aug 2020 11:59:46 +0200 (CEST)",
            "from orsmga001.jf.intel.com ([10.7.209.18])\n by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 14 Aug 2020 02:59:45 -0700",
            "from adamdybx-mobl.ger.corp.intel.com ([10.104.125.53])\n by orsmga001.jf.intel.com with ESMTP; 14 Aug 2020 02:59:43 -0700"
        ],
        "IronPort-SDR": [
            "\n 4fqOrcmIktu0QrjQbp8PqeQCgDNn7BhiCJP2YMokgCI0m8xVBjMfdPz9IdXGHWkvgBGsX5wRDv\n BMGpaNYmgF3w==",
            "\n 4P6DXe7t/gNXKUAUn3r8KLGIxMNOt4bD/3BJ2F3Ji8NCBPKPNxRNENeW0NlWR2AyuNBDzm9H7c\n XYQMf29RwMoA=="
        ],
        "X-IronPort-AV": [
            "E=McAfee;i=\"6000,8403,9712\"; a=\"151795516\"",
            "E=Sophos;i=\"5.76,311,1592895600\"; d=\"scan'208\";a=\"151795516\"",
            "E=Sophos;i=\"5.76,311,1592895600\"; d=\"scan'208\";a=\"369865528\""
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "From": "Adam Dybkowski <adamx.dybkowski@intel.com>",
        "To": "dev@dpdk.org,\n\tfiona.trahe@intel.com,\n\takhil.goyal@nxp.com",
        "Cc": "Adam Dybkowski <adamx.dybkowski@intel.com>,\n Arek Kusztal <arkadiuszx.kusztal@intel.com>",
        "Date": "Fri, 14 Aug 2020 11:59:42 +0200",
        "Message-Id": "<20200814095942.1726-1-adamx.dybkowski@intel.com>",
        "X-Mailer": "git-send-email 2.25.1",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[dpdk-dev] [PATCH] cryptodev: revert ABI compatibility for\n\tChaCha20-Poly1305",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "This reverts commit a0f0de06d457753c94688d551a6e8659b4d4e041 as the\nrte_cryptodev_info_get function versioning was a temporary solution\nto maintain ABI compatibility for ChaCha20-Poly1305 and is not\nneeded in 20.11.\n\nFixes: a0f0de06d457 (\"cryptodev: fix ABI compatibility for ChaCha20-Poly1305\")\n\nSigned-off-by: Adam Dybkowski <adamx.dybkowski@intel.com>\nReviewed-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>\n---\n lib/librte_cryptodev/meson.build              |   1 -\n lib/librte_cryptodev/rte_cryptodev.c          | 147 +-----------------\n lib/librte_cryptodev/rte_cryptodev.h          |  34 +---\n .../rte_cryptodev_version.map                 |   6 -\n 4 files changed, 6 insertions(+), 182 deletions(-)",
    "diff": "diff --git a/lib/librte_cryptodev/meson.build b/lib/librte_cryptodev/meson.build\nindex df1144058..c4c6b3b6a 100644\n--- a/lib/librte_cryptodev/meson.build\n+++ b/lib/librte_cryptodev/meson.build\n@@ -1,7 +1,6 @@\n # SPDX-License-Identifier: BSD-3-Clause\n # Copyright(c) 2017-2019 Intel Corporation\n \n-use_function_versioning = true\n sources = files('rte_cryptodev.c', 'rte_cryptodev_pmd.c', 'cryptodev_trace_points.c')\n headers = files('rte_cryptodev.h',\n \t'rte_cryptodev_pmd.h',\ndiff --git a/lib/librte_cryptodev/rte_cryptodev.c b/lib/librte_cryptodev/rte_cryptodev.c\nindex 1dd795bcb..6c9a19f25 100644\n--- a/lib/librte_cryptodev/rte_cryptodev.c\n+++ b/lib/librte_cryptodev/rte_cryptodev.c\n@@ -36,8 +36,6 @@\n #include <rte_errno.h>\n #include <rte_spinlock.h>\n #include <rte_string_fns.h>\n-#include <rte_compat.h>\n-#include <rte_function_versioning.h>\n \n #include \"rte_crypto.h\"\n #include \"rte_cryptodev.h\"\n@@ -59,14 +57,6 @@ static struct rte_cryptodev_global cryptodev_globals = {\n /* spinlock for crypto device callbacks */\n static rte_spinlock_t rte_cryptodev_cb_lock = RTE_SPINLOCK_INITIALIZER;\n \n-static const struct rte_cryptodev_capabilities\n-\t\tcryptodev_undefined_capabilities[] = {\n-\t\tRTE_CRYPTODEV_END_OF_CAPABILITIES_LIST()\n-};\n-\n-static struct rte_cryptodev_capabilities\n-\t\t*capability_copy[RTE_CRYPTO_MAX_DEVS];\n-static uint8_t is_capability_checked[RTE_CRYPTO_MAX_DEVS];\n \n /**\n  * The user application callback description.\n@@ -291,43 +281,8 @@ rte_crypto_auth_operation_strings[] = {\n \t\t[RTE_CRYPTO_AUTH_OP_GENERATE]\t= \"generate\"\n };\n \n-const struct rte_cryptodev_symmetric_capability __vsym *\n-rte_cryptodev_sym_capability_get_v20(uint8_t dev_id,\n-\t\tconst struct rte_cryptodev_sym_capability_idx *idx)\n-{\n-\tconst struct rte_cryptodev_capabilities *capability;\n-\tstruct rte_cryptodev_info dev_info;\n-\tint i = 0;\n-\n-\trte_cryptodev_info_get_v20(dev_id, &dev_info);\n-\n-\twhile ((capability = &dev_info.capabilities[i++])->op !=\n-\t\t\tRTE_CRYPTO_OP_TYPE_UNDEFINED) {\n-\t\tif (capability->op != RTE_CRYPTO_OP_TYPE_SYMMETRIC)\n-\t\t\tcontinue;\n-\n-\t\tif (capability->sym.xform_type != idx->type)\n-\t\t\tcontinue;\n-\n-\t\tif (idx->type == RTE_CRYPTO_SYM_XFORM_AUTH &&\n-\t\t\tcapability->sym.auth.algo == idx->algo.auth)\n-\t\t\treturn &capability->sym;\n-\n-\t\tif (idx->type == RTE_CRYPTO_SYM_XFORM_CIPHER &&\n-\t\t\tcapability->sym.cipher.algo == idx->algo.cipher)\n-\t\t\treturn &capability->sym;\n-\n-\t\tif (idx->type == RTE_CRYPTO_SYM_XFORM_AEAD &&\n-\t\t\t\tcapability->sym.aead.algo == idx->algo.aead)\n-\t\t\treturn &capability->sym;\n-\t}\n-\n-\treturn NULL;\n-}\n-VERSION_SYMBOL(rte_cryptodev_sym_capability_get, _v20, 20.0);\n-\n-const struct rte_cryptodev_symmetric_capability __vsym *\n-rte_cryptodev_sym_capability_get_v21(uint8_t dev_id,\n+const struct rte_cryptodev_symmetric_capability *\n+rte_cryptodev_sym_capability_get(uint8_t dev_id,\n \t\tconst struct rte_cryptodev_sym_capability_idx *idx)\n {\n \tconst struct rte_cryptodev_capabilities *capability;\n@@ -358,12 +313,8 @@ rte_cryptodev_sym_capability_get_v21(uint8_t dev_id,\n \t}\n \n \treturn NULL;\n+\n }\n-MAP_STATIC_SYMBOL(const struct rte_cryptodev_symmetric_capability *\n-\t\trte_cryptodev_sym_capability_get(uint8_t dev_id,\n-\t\tconst struct rte_cryptodev_sym_capability_idx *idx),\n-\t\trte_cryptodev_sym_capability_get_v21);\n-BIND_DEFAULT_SYMBOL(rte_cryptodev_sym_capability_get, _v21, 21);\n \n static int\n param_range_check(uint16_t size, const struct rte_crypto_param_range *range)\n@@ -1085,12 +1036,6 @@ rte_cryptodev_close(uint8_t dev_id)\n \tretval = (*dev->dev_ops->dev_close)(dev);\n \trte_cryptodev_trace_close(dev_id, retval);\n \n-\tif (capability_copy[dev_id]) {\n-\t\tfree(capability_copy[dev_id]);\n-\t\tcapability_copy[dev_id] = NULL;\n-\t}\n-\tis_capability_checked[dev_id] = 0;\n-\n \tif (retval < 0)\n \t\treturn retval;\n \n@@ -1233,61 +1178,9 @@ rte_cryptodev_stats_reset(uint8_t dev_id)\n \t(*dev->dev_ops->stats_reset)(dev);\n }\n \n-static void\n-get_v20_capabilities(uint8_t dev_id, struct rte_cryptodev_info *dev_info)\n-{\n-\tconst struct rte_cryptodev_capabilities *capability;\n-\tuint8_t found_invalid_capa = 0;\n-\tuint8_t counter = 0;\n-\n-\tfor (capability = dev_info->capabilities;\n-\t\t\tcapability->op != RTE_CRYPTO_OP_TYPE_UNDEFINED;\n-\t\t\t++capability, ++counter) {\n-\t\tif (capability->op == RTE_CRYPTO_OP_TYPE_SYMMETRIC &&\n-\t\t\t\tcapability->sym.xform_type ==\n-\t\t\t\t\tRTE_CRYPTO_SYM_XFORM_AEAD\n-\t\t\t\t&& capability->sym.aead.algo >=\n-\t\t\t\tRTE_CRYPTO_AEAD_CHACHA20_POLY1305) {\n-\t\t\tfound_invalid_capa = 1;\n-\t\t\tcounter--;\n-\t\t}\n-\t}\n-\tis_capability_checked[dev_id] = 1;\n-\tif (!found_invalid_capa)\n-\t\treturn;\n-\tcapability_copy[dev_id] = malloc(counter *\n-\t\tsizeof(struct rte_cryptodev_capabilities));\n-\tif (capability_copy[dev_id] == NULL) {\n-\t\t /*\n-\t\t  * error case - no memory to store the trimmed\n-\t\t  * list, so have to return an empty list\n-\t\t  */\n-\t\tdev_info->capabilities =\n-\t\t\tcryptodev_undefined_capabilities;\n-\t\tis_capability_checked[dev_id] = 0;\n-\t} else {\n-\t\tcounter = 0;\n-\t\tfor (capability = dev_info->capabilities;\n-\t\t\t\tcapability->op !=\n-\t\t\t\tRTE_CRYPTO_OP_TYPE_UNDEFINED;\n-\t\t\t\tcapability++) {\n-\t\t\tif (!(capability->op ==\n-\t\t\t\tRTE_CRYPTO_OP_TYPE_SYMMETRIC\n-\t\t\t\t&& capability->sym.xform_type ==\n-\t\t\t\tRTE_CRYPTO_SYM_XFORM_AEAD\n-\t\t\t\t&& capability->sym.aead.algo >=\n-\t\t\t\tRTE_CRYPTO_AEAD_CHACHA20_POLY1305)) {\n-\t\t\t\tcapability_copy[dev_id][counter++] =\n-\t\t\t\t\t\t*capability;\n-\t\t\t}\n-\t\t}\n-\t\tdev_info->capabilities =\n-\t\t\t\tcapability_copy[dev_id];\n-\t}\n-}\n \n-void __vsym\n-rte_cryptodev_info_get_v20(uint8_t dev_id, struct rte_cryptodev_info *dev_info)\n+void\n+rte_cryptodev_info_get(uint8_t dev_id, struct rte_cryptodev_info *dev_info)\n {\n \tstruct rte_cryptodev *dev;\n \n@@ -1303,40 +1196,10 @@ rte_cryptodev_info_get_v20(uint8_t dev_id, struct rte_cryptodev_info *dev_info)\n \tRTE_FUNC_PTR_OR_RET(*dev->dev_ops->dev_infos_get);\n \t(*dev->dev_ops->dev_infos_get)(dev, dev_info);\n \n-\tif (capability_copy[dev_id] == NULL) {\n-\t\tif (!is_capability_checked[dev_id])\n-\t\t\tget_v20_capabilities(dev_id, dev_info);\n-\t} else\n-\t\tdev_info->capabilities = capability_copy[dev_id];\n-\n \tdev_info->driver_name = dev->device->driver->name;\n \tdev_info->device = dev->device;\n }\n-VERSION_SYMBOL(rte_cryptodev_info_get, _v20, 20.0);\n \n-void __vsym\n-rte_cryptodev_info_get_v21(uint8_t dev_id, struct rte_cryptodev_info *dev_info)\n-{\n-\tstruct rte_cryptodev *dev;\n-\n-\tif (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {\n-\t\tCDEV_LOG_ERR(\"Invalid dev_id=%d\", dev_id);\n-\t\treturn;\n-\t}\n-\n-\tdev = &rte_crypto_devices[dev_id];\n-\n-\tmemset(dev_info, 0, sizeof(struct rte_cryptodev_info));\n-\n-\tRTE_FUNC_PTR_OR_RET(*dev->dev_ops->dev_infos_get);\n-\t(*dev->dev_ops->dev_infos_get)(dev, dev_info);\n-\n-\tdev_info->driver_name = dev->device->driver->name;\n-\tdev_info->device = dev->device;\n-}\n-MAP_STATIC_SYMBOL(void rte_cryptodev_info_get(uint8_t dev_id,\n-\tstruct rte_cryptodev_info *dev_info), rte_cryptodev_info_get_v21);\n-BIND_DEFAULT_SYMBOL(rte_cryptodev_info_get, _v21, 21);\n \n int\n rte_cryptodev_callback_register(uint8_t dev_id,\ndiff --git a/lib/librte_cryptodev/rte_cryptodev.h b/lib/librte_cryptodev/rte_cryptodev.h\nindex 7b3ebc20f..26abd0c52 100644\n--- a/lib/librte_cryptodev/rte_cryptodev.h\n+++ b/lib/librte_cryptodev/rte_cryptodev.h\n@@ -219,14 +219,6 @@ struct rte_cryptodev_asym_capability_idx {\n  *   - Return NULL if the capability not exist.\n  */\n const struct rte_cryptodev_symmetric_capability *\n-rte_cryptodev_sym_capability_get_v20(uint8_t dev_id,\n-\t\tconst struct rte_cryptodev_sym_capability_idx *idx);\n-\n-const struct rte_cryptodev_symmetric_capability *\n-rte_cryptodev_sym_capability_get_v21(uint8_t dev_id,\n-\t\tconst struct rte_cryptodev_sym_capability_idx *idx);\n-\n-const struct rte_cryptodev_symmetric_capability *\n rte_cryptodev_sym_capability_get(uint8_t dev_id,\n \t\tconst struct rte_cryptodev_sym_capability_idx *idx);\n \n@@ -789,33 +781,9 @@ rte_cryptodev_stats_reset(uint8_t dev_id);\n  * the last valid element has it's op field set to\n  * RTE_CRYPTO_OP_TYPE_UNDEFINED.\n  */\n-\n-void\n+extern void\n rte_cryptodev_info_get(uint8_t dev_id, struct rte_cryptodev_info *dev_info);\n \n-/* An extra element RTE_CRYPTO_AEAD_CHACHA20_POLY1305 is added\n- * to enum rte_crypto_aead_algorithm, also changing the value of\n- *  RTE_CRYPTO_AEAD_LIST_END. To maintain ABI compatibility with applications\n- * which linked against earlier versions, preventing them, for example, from\n- * picking up the new value and using it to index into an array sized too small\n- * for it, it is necessary to have two versions of rte_cryptodev_info_get()\n- * The latest version just returns directly the capabilities retrieved from\n- * the device. The compatible version inspects the capabilities retrieved\n- * from the device, but only returns them directly if the new value\n- * is not included. If the new value is included, it allocates space\n- * for a copy of the device capabilities, trims the new value from this\n- * and returns this copy. It only needs to do this once per device.\n- * For the corner case of a corner case when the alloc may fail,\n- * an empty capability list is returned, as there is no mechanism to return\n- * an error and adding such a mechanism would itself be an ABI breakage.\n- * The compatible version can be removed after the next major ABI release.\n- */\n-\n-void\n-rte_cryptodev_info_get_v20(uint8_t dev_id, struct rte_cryptodev_info *dev_info);\n-\n-void\n-rte_cryptodev_info_get_v21(uint8_t dev_id, struct rte_cryptodev_info *dev_info);\n \n /**\n  * Register a callback function for specific device id.\ndiff --git a/lib/librte_cryptodev/rte_cryptodev_version.map b/lib/librte_cryptodev/rte_cryptodev_version.map\nindex 02f6dcf72..7727286ac 100644\n--- a/lib/librte_cryptodev/rte_cryptodev_version.map\n+++ b/lib/librte_cryptodev/rte_cryptodev_version.map\n@@ -58,12 +58,6 @@ DPDK_21 {\n \tlocal: *;\n };\n \n-DPDK_20.0 {\n-\tglobal:\n-\trte_cryptodev_info_get;\n-\trte_cryptodev_sym_capability_get;\n-};\n-\n EXPERIMENTAL {\n \tglobal:\n \n",
    "prefixes": []
}