get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 44755,
    "url": "https://patches.dpdk.org/api/patches/44755/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20180916031823.17560-1-dmitry.ereminsolenikov@linaro.org/",
    "project": {
        "id": 1,
        "url": "https://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": "<20180916031823.17560-1-dmitry.ereminsolenikov@linaro.org>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20180916031823.17560-1-dmitry.ereminsolenikov@linaro.org",
    "date": "2018-09-16T03:18:23",
    "name": "[v2] crypto/openssl: support truncated HMAC operations",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "f09a0142489f2243bcdfa53d1bee6dae3820fb6d",
    "submitter": {
        "id": 1076,
        "url": "https://patches.dpdk.org/api/people/1076/?format=api",
        "name": "Dmitry Eremin-Solenikov",
        "email": "dmitry.ereminsolenikov@linaro.org"
    },
    "delegate": {
        "id": 6690,
        "url": "https://patches.dpdk.org/api/users/6690/?format=api",
        "username": "akhil",
        "first_name": "akhil",
        "last_name": "goyal",
        "email": "gakhil@marvell.com"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/20180916031823.17560-1-dmitry.ereminsolenikov@linaro.org/mbox/",
    "series": [
        {
            "id": 1333,
            "url": "https://patches.dpdk.org/api/series/1333/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=1333",
            "date": "2018-09-16T03:18:23",
            "name": "[v2] crypto/openssl: support truncated HMAC operations",
            "version": 2,
            "mbox": "https://patches.dpdk.org/series/1333/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/44755/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/44755/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@dpdk.org",
        "Delivered-To": "patchwork@dpdk.org",
        "Received": [
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 7FD4C2BD8;\n\tSun, 16 Sep 2018 05:18:27 +0200 (CEST)",
            "from mail-lj1-f196.google.com (mail-lj1-f196.google.com\n\t[209.85.208.196]) by dpdk.org (Postfix) with ESMTP id AC13C2B84\n\tfor <dev@dpdk.org>; Sun, 16 Sep 2018 05:18:26 +0200 (CEST)",
            "by mail-lj1-f196.google.com with SMTP id v9-v6so10409303ljk.4\n\tfor <dev@dpdk.org>; Sat, 15 Sep 2018 20:18:26 -0700 (PDT)",
            "from rhovanion.lumag.spb.ru ([188.162.65.197])\n\tby smtp.gmail.com with ESMTPSA id\n\t135-v6sm2063490ljj.35.2018.09.15.20.18.24 for <dev@dpdk.org>\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tSat, 15 Sep 2018 20:18:24 -0700 (PDT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google;\n\th=from:to:subject:date:message-id;\n\tbh=2Kk+Jvfz1ZJxM5CTSQc/tuOkgyBoNd5m/ArBi5fF1ko=;\n\tb=L2ftE/+odtgWJ95SseLF8zhM/Wv+q1HcHJuthTNkWjNd5nOFhvSa710tf0nPSb6xIP\n\tovwezhEFm3iMW/uYYDBRcr661bdma9Q15oP8jX3/PFg90mR1AUTiMnNoG5Rd9RBlorEV\n\t95XZ4xE8Tq8AkDSiJpz1naBgsBgMsUjcGjI04=",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:subject:date:message-id;\n\tbh=2Kk+Jvfz1ZJxM5CTSQc/tuOkgyBoNd5m/ArBi5fF1ko=;\n\tb=AC9LpMREXr1RNddOPRmm/gZLqm039/pvbCvk37SdRBX8YYl20xSJXLZ2N/vNJtkJzN\n\tcLmtjfAR5Wn75U9N+hvhfTEKjNeHmGa3lrYjM4QT90qwsxfaRWPQlf0dcQ121/xmOjut\n\tPsDAEKn7qDevrRzaa0cR5ysxdauxfTe7cDf1UqgERDNgKPwg3Qi6Cc3VzPbX62OIM9rr\n\tdNE1+monrmvcOw/tjG/G7+g/oBru+8xkPT+/LWpvSaPqaRqPnymnWKmXpkRXa2eufy8X\n\t+S2jdlScUA4oZMA0ig/CVHGzdR8Jkws+sz9rswCy267o/si5iXHErItd4kwwzw/cDZ2i\n\tnHzQ==",
        "X-Gm-Message-State": "APzg51B1+X3hX0jG5yQlUMiizlw/ldZ7rBwTigGzbd85ZEt2UVwwwCy5\n\tN9F7kMPKQnvXdheUCQSvT9ys5LRKsv0rsA==",
        "X-Google-Smtp-Source": "ANB0VdYaCJ7EuB7FTcUMWCHW2Z8OQ4ka3I3WGasFCXVeGfaBOJWc8RnsFV7SNNv4eb7PEK9yrix0Pw==",
        "X-Received": "by 2002:a2e:860d:: with SMTP id\n\ta13-v6mr12176720lji.43.1537067905689; \n\tSat, 15 Sep 2018 20:18:25 -0700 (PDT)",
        "From": "Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org>",
        "To": "dev@dpdk.org",
        "Date": "Sun, 16 Sep 2018 06:18:23 +0300",
        "Message-Id": "<20180916031823.17560-1-dmitry.ereminsolenikov@linaro.org>",
        "X-Mailer": "git-send-email 2.18.0",
        "Subject": "[dpdk-dev] [PATCH v2] crypto/openssl: support truncated HMAC\n\toperations",
        "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\t<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\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "IPsec requires truncated HMAC operations support. Extend OpenSSL crypto\nPMD to support truncated HMAC operations necessary for IPsec.\n\nSigned-off-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org>\n---\nChanges since V1:\n - support all digest sizes from half of corresponding digest size up to\n   full length.\n\n---\n drivers/crypto/openssl/rte_openssl_pmd.c     | 19 ++++++++--------\n drivers/crypto/openssl/rte_openssl_pmd_ops.c | 24 ++++++++++----------\n 2 files changed, 22 insertions(+), 21 deletions(-)",
    "diff": "diff --git a/drivers/crypto/openssl/rte_openssl_pmd.c b/drivers/crypto/openssl/rte_openssl_pmd.c\nindex 7d263aba3bbd..c635f1e2493c 100644\n--- a/drivers/crypto/openssl/rte_openssl_pmd.c\n+++ b/drivers/crypto/openssl/rte_openssl_pmd.c\n@@ -1509,15 +1509,7 @@ process_openssl_auth_op(struct openssl_qp *qp, struct rte_crypto_op *op,\n \n \tsrclen = op->sym->auth.data.length;\n \n-\tif (sess->auth.operation == RTE_CRYPTO_AUTH_OP_VERIFY)\n-\t\tdst = qp->temp_digest;\n-\telse {\n-\t\tdst = op->sym->auth.digest.data;\n-\t\tif (dst == NULL)\n-\t\t\tdst = rte_pktmbuf_mtod_offset(mbuf_dst, uint8_t *,\n-\t\t\t\t\top->sym->auth.data.offset +\n-\t\t\t\t\top->sym->auth.data.length);\n-\t}\n+\tdst = qp->temp_digest;\n \n \tswitch (sess->auth.mode) {\n \tcase OPENSSL_AUTH_AS_AUTH:\n@@ -1540,6 +1532,15 @@ process_openssl_auth_op(struct openssl_qp *qp, struct rte_crypto_op *op,\n \t\t\t\tsess->auth.digest_length) != 0) {\n \t\t\top->status = RTE_CRYPTO_OP_STATUS_AUTH_FAILED;\n \t\t}\n+\t} else {\n+\t\tuint8_t *auth_dst;\n+\n+\t\tauth_dst = op->sym->auth.digest.data;\n+\t\tif (auth_dst == NULL)\n+\t\t\tauth_dst = rte_pktmbuf_mtod_offset(mbuf_dst, uint8_t *,\n+\t\t\t\t\top->sym->auth.data.offset +\n+\t\t\t\t\top->sym->auth.data.length);\n+\t\tmemcpy(auth_dst, dst, sess->auth.digest_length);\n \t}\n \n \tif (status != 0)\ndiff --git a/drivers/crypto/openssl/rte_openssl_pmd_ops.c b/drivers/crypto/openssl/rte_openssl_pmd_ops.c\nindex de2284390b12..6d3e21de404d 100644\n--- a/drivers/crypto/openssl/rte_openssl_pmd_ops.c\n+++ b/drivers/crypto/openssl/rte_openssl_pmd_ops.c\n@@ -26,9 +26,9 @@ static const struct rte_cryptodev_capabilities openssl_pmd_capabilities[] = {\n \t\t\t\t\t.increment = 1\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.min = 8,\n \t\t\t\t\t.max = 16,\n-\t\t\t\t\t.increment = 0\n+\t\t\t\t\t.increment = 1\n \t\t\t\t},\n \t\t\t\t.iv_size = { 0 }\n \t\t\t}, }\n@@ -68,9 +68,9 @@ static const struct rte_cryptodev_capabilities openssl_pmd_capabilities[] = {\n \t\t\t\t\t.increment = 1\n \t\t\t\t},\n \t\t\t\t.digest_size = {\n-\t\t\t\t\t.min = 20,\n+\t\t\t\t\t.min = 10,\n \t\t\t\t\t.max = 20,\n-\t\t\t\t\t.increment = 0\n+\t\t\t\t\t.increment = 1\n \t\t\t\t},\n \t\t\t\t.iv_size = { 0 }\n \t\t\t}, }\n@@ -110,9 +110,9 @@ static const struct rte_cryptodev_capabilities openssl_pmd_capabilities[] = {\n \t\t\t\t\t.increment = 1\n \t\t\t\t},\n \t\t\t\t.digest_size = {\n-\t\t\t\t\t.min = 28,\n+\t\t\t\t\t.min = 14,\n \t\t\t\t\t.max = 28,\n-\t\t\t\t\t.increment = 0\n+\t\t\t\t\t.increment = 1\n \t\t\t\t},\n \t\t\t\t.iv_size = { 0 }\n \t\t\t}, }\n@@ -152,9 +152,9 @@ static const struct rte_cryptodev_capabilities openssl_pmd_capabilities[] = {\n \t\t\t\t\t.increment = 1\n \t\t\t\t},\n \t\t\t\t.digest_size = {\n-\t\t\t\t\t.min = 32,\n+\t\t\t\t\t.min = 16,\n \t\t\t\t\t.max = 32,\n-\t\t\t\t\t.increment = 0\n+\t\t\t\t\t.increment = 1\n \t\t\t\t},\n \t\t\t\t.iv_size = { 0 }\n \t\t\t}, }\n@@ -194,9 +194,9 @@ static const struct rte_cryptodev_capabilities openssl_pmd_capabilities[] = {\n \t\t\t\t\t.increment = 1\n \t\t\t\t},\n \t\t\t\t.digest_size = {\n-\t\t\t\t\t.min = 48,\n+\t\t\t\t\t.min = 24,\n \t\t\t\t\t.max = 48,\n-\t\t\t\t\t.increment = 0\n+\t\t\t\t\t.increment = 1\n \t\t\t\t},\n \t\t\t\t.iv_size = { 0 }\n \t\t\t}, }\n@@ -236,9 +236,9 @@ static const struct rte_cryptodev_capabilities openssl_pmd_capabilities[] = {\n \t\t\t\t\t.increment = 1\n \t\t\t\t},\n \t\t\t\t.digest_size = {\n-\t\t\t\t\t.min = 64,\n+\t\t\t\t\t.min = 32,\n \t\t\t\t\t.max = 64,\n-\t\t\t\t\t.increment = 0\n+\t\t\t\t\t.increment = 1\n \t\t\t\t},\n \t\t\t\t.iv_size = { 0 }\n \t\t\t}, }\n",
    "prefixes": [
        "v2"
    ]
}