get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 72028,
    "url": "http://patchwork.dpdk.org/api/patches/72028/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20200623121228.10355-5-ktejasree@marvell.com/",
    "project": {
        "id": 1,
        "url": "http://patchwork.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": "<20200623121228.10355-5-ktejasree@marvell.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20200623121228.10355-5-ktejasree@marvell.com",
    "date": "2020-06-23T12:12:24",
    "name": "[4/8] crypto/octeontx2: add cryptodev sec capabilities",
    "commit_ref": null,
    "pull_url": null,
    "state": "changes-requested",
    "archived": true,
    "hash": "581af9e5ab54d670371acf60722bef1f1400a253",
    "submitter": {
        "id": 1789,
        "url": "http://patchwork.dpdk.org/api/people/1789/?format=api",
        "name": "Tejasree Kondoj",
        "email": "ktejasree@marvell.com"
    },
    "delegate": {
        "id": 6690,
        "url": "http://patchwork.dpdk.org/api/users/6690/?format=api",
        "username": "akhil",
        "first_name": "akhil",
        "last_name": "goyal",
        "email": "gakhil@marvell.com"
    },
    "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/20200623121228.10355-5-ktejasree@marvell.com/mbox/",
    "series": [
        {
            "id": 10567,
            "url": "http://patchwork.dpdk.org/api/series/10567/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=10567",
            "date": "2020-06-23T12:12:20",
            "name": "add OCTEON TX2 lookaside IPsec support",
            "version": 1,
            "mbox": "http://patchwork.dpdk.org/series/10567/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/72028/comments/",
    "check": "fail",
    "checks": "http://patchwork.dpdk.org/api/patches/72028/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 22CC4A0350;\n\tTue, 23 Jun 2020 13:19:34 +0200 (CEST)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id B0AB61D652;\n\tTue, 23 Jun 2020 13:19:20 +0200 (CEST)",
            "from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com\n [67.231.156.173]) by dpdk.org (Postfix) with ESMTP id CC8E91D634\n for <dev@dpdk.org>; Tue, 23 Jun 2020 13:19:19 +0200 (CEST)",
            "from pps.filterd (m0045851.ppops.net [127.0.0.1])\n by mx0b-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id\n 05NBJDEc001826; Tue, 23 Jun 2020 04:19:19 -0700",
            "from sc-exch02.marvell.com ([199.233.58.182])\n by mx0b-0016f401.pphosted.com with ESMTP id 31shynw011-1\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT);\n Tue, 23 Jun 2020 04:19:19 -0700",
            "from DC5-EXCH01.marvell.com (10.69.176.38) by SC-EXCH02.marvell.com\n (10.93.176.82) with Microsoft SMTP Server (TLS) id 15.0.1497.2;\n Tue, 23 Jun 2020 04:19:16 -0700",
            "from maili.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com\n (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.2 via Frontend\n Transport; Tue, 23 Jun 2020 04:19:16 -0700",
            "from hyd1554T5810.caveonetworks.com.com (unknown [10.29.57.11])\n by maili.marvell.com (Postfix) with ESMTP id 8C0473F7041;\n Tue, 23 Jun 2020 04:19:14 -0700 (PDT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com;\n h=from : to : cc :\n subject : date : message-id : in-reply-to : references : mime-version :\n content-transfer-encoding : content-type; s=pfpt0818;\n bh=ybTIhEOHfXiAqFm+u0hSzta1NPNa/Rfv3sksYSWtHtA=;\n b=ZzZBiHQrIYsL0J4lfaWfGAXF/muRQT3J2TWKuMIGMHUE+iHRE65UWsAzIwMbOkcjpqjj\n JF0zHImK/mJ7nSq4BtuPsZP1zJwFfcDwqk4A1+gMqlqWHLZ+06jrzjmYekDMEfMAk8eE\n QTdaOJ+4d684+iiibEQFvp+u0o0XzsEVhiQbxXPVccs59F4TRT9Zes2i9S6ncgsstvL1\n /dLuivTkuw9K0fCw2WJmJJKAnrvAG04KLTSjKQSa5plsh8oZuZo4myyT3YSOkts3UJaw\n fU+5xNE7MT9Ydm6f8SQ8OEGCj0nb1q9Pj5hCYxhfe7RfD7pXfCGk//8u1B0ZM03gInZh oQ==",
        "From": "Tejasree Kondoj <ktejasree@marvell.com>",
        "To": "Akhil Goyal <akhil.goyal@nxp.com>, Radu Nicolau <radu.nicolau@intel.com>",
        "CC": "Tejasree Kondoj <ktejasree@marvell.com>, Narayana Prasad\n <pathreya@marvell.com>, Anoob Joseph <anoobj@marvell.com>, Vamsi Attunuru\n <vattunuru@marvell.com>, <dev@dpdk.org>",
        "Date": "Tue, 23 Jun 2020 17:42:24 +0530",
        "Message-ID": "<20200623121228.10355-5-ktejasree@marvell.com>",
        "X-Mailer": "git-send-email 2.27.0",
        "In-Reply-To": "<20200623121228.10355-1-ktejasree@marvell.com>",
        "References": "<20200623121228.10355-1-ktejasree@marvell.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Content-Type": "text/plain",
        "X-Proofpoint-Virus-Version": "vendor=fsecure engine=2.50.10434:6.0.216, 18.0.687\n definitions=2020-06-23_06:2020-06-23,\n 2020-06-23 signatures=0",
        "Subject": "[dpdk-dev] [PATCH 4/8] crypto/octeontx2: add cryptodev sec\n\tcapabilities",
        "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": "Signed-off-by: Vamsi Attunuru <vattunuru@marvell.com>\nSigned-off-by: Tejasree Kondoj <ktejasree@marvell.com>\n---\n .../octeontx2/otx2_cryptodev_capabilities.c   | 108 ++++++++++++++++++\n .../octeontx2/otx2_cryptodev_capabilities.h   |   3 +\n drivers/crypto/octeontx2/otx2_cryptodev_sec.c |   4 +-\n 3 files changed, 114 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/drivers/crypto/octeontx2/otx2_cryptodev_capabilities.c b/drivers/crypto/octeontx2/otx2_cryptodev_capabilities.c\nindex f6f4dee6cf..88bf1faef7 100644\n--- a/drivers/crypto/octeontx2/otx2_cryptodev_capabilities.c\n+++ b/drivers/crypto/octeontx2/otx2_cryptodev_capabilities.c\n@@ -3,7 +3,9 @@\n  */\n \n #include <rte_cryptodev.h>\n+#include <rte_security.h>\n \n+#include \"otx2_cryptodev.h\"\n #include \"otx2_cryptodev_capabilities.h\"\n #include \"otx2_mbox.h\"\n \n@@ -26,9 +28,18 @@\n \t\tcpt_caps_add(caps_##name, RTE_DIM(caps_##name));\t\\\n } while (0)\n \n+#define SEC_CAPS_ADD(hw_caps, name) do {\t\t\t\t\\\n+\tenum otx2_cpt_egrp egrp;\t\t\t\t\t\\\n+\tCPT_EGRP_GET(hw_caps, name, &egrp);\t\t\t\t\\\n+\tif (egrp < OTX2_CPT_EGRP_MAX)\t\t\t\t\t\\\n+\t\tsec_caps_add(sec_caps_##name, RTE_DIM(sec_caps_##name));\\\n+} while (0)\n+\n #define OTX2_CPT_MAX_CAPS 34\n+#define OTX2_SEC_MAX_CAPS 4\n \n static struct rte_cryptodev_capabilities otx2_cpt_caps[OTX2_CPT_MAX_CAPS];\n+static struct rte_cryptodev_capabilities otx2_cpt_sec_caps[OTX2_SEC_MAX_CAPS];\n \n static const struct rte_cryptodev_capabilities caps_mul[] = {\n \t{\t/* RSA */\n@@ -725,6 +736,70 @@ static const struct rte_cryptodev_capabilities caps_end[] = {\n \tRTE_CRYPTODEV_END_OF_CAPABILITIES_LIST()\n };\n \n+static const struct rte_cryptodev_capabilities sec_caps_aes[] = {\n+\t{\t/* AES GCM */\n+\t\t.op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,\n+\t\t{.sym = {\n+\t\t\t.xform_type = RTE_CRYPTO_SYM_XFORM_AEAD,\n+\t\t\t{.aead = {\n+\t\t\t\t.algo = RTE_CRYPTO_AEAD_AES_GCM,\n+\t\t\t\t.block_size = 16,\n+\t\t\t\t.key_size = {\n+\t\t\t\t\t.min = 16,\n+\t\t\t\t\t.max = 32,\n+\t\t\t\t\t.increment = 8\n+\t\t\t\t},\n+\t\t\t\t.digest_size = {\n+\t\t\t\t\t.min = 16,\n+\t\t\t\t\t.max = 16,\n+\t\t\t\t\t.increment = 0\n+\t\t\t\t},\n+\t\t\t\t.aad_size = {\n+\t\t\t\t\t.min = 8,\n+\t\t\t\t\t.max = 12,\n+\t\t\t\t\t.increment = 4\n+\t\t\t\t},\n+\t\t\t\t.iv_size = {\n+\t\t\t\t\t.min = 12,\n+\t\t\t\t\t.max = 12,\n+\t\t\t\t\t.increment = 0\n+\t\t\t\t}\n+\t\t\t}, }\n+\t\t}, }\n+\t},\n+};\n+\n+static const struct rte_security_capability\n+otx2_crypto_sec_capabilities[] = {\n+\t{\t/* IPsec Lookaside Protocol ESP Tunnel Ingress */\n+\t\t.action = RTE_SECURITY_ACTION_TYPE_LOOKASIDE_PROTOCOL,\n+\t\t.protocol = RTE_SECURITY_PROTOCOL_IPSEC,\n+\t\t.ipsec = {\n+\t\t\t.proto = RTE_SECURITY_IPSEC_SA_PROTO_ESP,\n+\t\t\t.mode = RTE_SECURITY_IPSEC_SA_MODE_TUNNEL,\n+\t\t\t.direction = RTE_SECURITY_IPSEC_SA_DIR_INGRESS,\n+\t\t\t.options = { 0 }\n+\t\t},\n+\t\t.crypto_capabilities = otx2_cpt_sec_caps,\n+\t\t.ol_flags = RTE_SECURITY_TX_OLOAD_NEED_MDATA\n+\t},\n+\t{\t/* IPsec Lookaside Protocol ESP Tunnel Egress */\n+\t\t.action = RTE_SECURITY_ACTION_TYPE_LOOKASIDE_PROTOCOL,\n+\t\t.protocol = RTE_SECURITY_PROTOCOL_IPSEC,\n+\t\t.ipsec = {\n+\t\t\t.proto = RTE_SECURITY_IPSEC_SA_PROTO_ESP,\n+\t\t\t.mode = RTE_SECURITY_IPSEC_SA_MODE_TUNNEL,\n+\t\t\t.direction = RTE_SECURITY_IPSEC_SA_DIR_EGRESS,\n+\t\t\t.options = { 0 }\n+\t\t},\n+\t\t.crypto_capabilities = otx2_cpt_sec_caps,\n+\t\t.ol_flags = RTE_SECURITY_TX_OLOAD_NEED_MDATA\n+\t},\n+\t{\n+\t\t.action = RTE_SECURITY_ACTION_TYPE_NONE\n+\t}\n+};\n+\n static void\n cpt_caps_add(const struct rte_cryptodev_capabilities *caps, int nb_caps)\n {\n@@ -754,3 +829,36 @@ otx2_cpt_capabilities_get(union cpt_eng_caps *hw_caps)\n \n \treturn otx2_cpt_caps;\n }\n+\n+static void\n+sec_caps_add(const struct rte_cryptodev_capabilities *caps, int nb_caps)\n+{\n+\tstatic int cur_pos;\n+\n+\tif (cur_pos + nb_caps > OTX2_SEC_MAX_CAPS)\n+\t\treturn;\n+\n+\tmemcpy(&otx2_cpt_sec_caps[cur_pos], caps, nb_caps * sizeof(caps[0]));\n+\tcur_pos += nb_caps;\n+}\n+\n+static const struct rte_cryptodev_capabilities *\n+otx2_cpt_sec_caps_get(union cpt_eng_caps *hw_caps)\n+{\n+\tSEC_CAPS_ADD(hw_caps, aes);\n+\n+\tsec_caps_add(caps_end, RTE_DIM(caps_end));\n+\n+\treturn otx2_cpt_sec_caps;\n+}\n+\n+const struct rte_security_capability *\n+otx2_crypto_sec_capabilities_get(void *device)\n+{\n+\tstruct rte_cryptodev *dev = (struct rte_cryptodev *)device;\n+\tstruct otx2_cpt_vf *vf = dev->data->dev_private;\n+\n+\totx2_cpt_sec_caps_get(vf->hw_caps);\n+\n+\treturn otx2_crypto_sec_capabilities;\n+}\ndiff --git a/drivers/crypto/octeontx2/otx2_cryptodev_capabilities.h b/drivers/crypto/octeontx2/otx2_cryptodev_capabilities.h\nindex e07a2a8c92..b1ae0d2e54 100644\n--- a/drivers/crypto/octeontx2/otx2_cryptodev_capabilities.h\n+++ b/drivers/crypto/octeontx2/otx2_cryptodev_capabilities.h\n@@ -23,4 +23,7 @@ enum otx2_cpt_egrp {\n const struct rte_cryptodev_capabilities *\n otx2_cpt_capabilities_get(union cpt_eng_caps *hw_caps);\n \n+const struct rte_security_capability *\n+otx2_crypto_sec_capabilities_get(void *device);\n+\n #endif /* _OTX2_CRYPTODEV_CAPABILITIES_H_ */\ndiff --git a/drivers/crypto/octeontx2/otx2_cryptodev_sec.c b/drivers/crypto/octeontx2/otx2_cryptodev_sec.c\nindex d937e6f37a..906a87b9e5 100644\n--- a/drivers/crypto/octeontx2/otx2_cryptodev_sec.c\n+++ b/drivers/crypto/octeontx2/otx2_cryptodev_sec.c\n@@ -7,6 +7,8 @@\n #include <rte_security.h>\n #include <rte_security_driver.h>\n \n+#include \"otx2_cryptodev.h\"\n+#include \"otx2_cryptodev_capabilities.h\"\n #include \"otx2_cryptodev_sec.h\"\n \n static struct rte_security_ops otx2_crypto_sec_ops = {\n@@ -15,7 +17,7 @@ static struct rte_security_ops otx2_crypto_sec_ops = {\n \t.session_get_size\t= NULL,\n \t.set_pkt_metadata\t= NULL,\n \t.get_userdata\t\t= NULL,\n-\t.capabilities_get\t= NULL\n+\t.capabilities_get\t= otx2_crypto_sec_capabilities_get\n };\n \n int\n",
    "prefixes": [
        "4/8"
    ]
}