get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 126389,
    "url": "http://patches.dpdk.org/api/patches/126389/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20230421131221.1732314-2-ciara.power@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": "<20230421131221.1732314-2-ciara.power@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20230421131221.1732314-2-ciara.power@intel.com",
    "date": "2023-04-21T13:12:13",
    "name": "[1/8] crypto/ipsec_mb: use GMAC dedicated algorithms",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "22fd7ebc4653786f39a3bd9fc2f89d46d56de15d",
    "submitter": {
        "id": 978,
        "url": "http://patches.dpdk.org/api/people/978/?format=api",
        "name": "Power, Ciara",
        "email": "ciara.power@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/20230421131221.1732314-2-ciara.power@intel.com/mbox/",
    "series": [
        {
            "id": 27817,
            "url": "http://patches.dpdk.org/api/series/27817/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=27817",
            "date": "2023-04-21T13:12:12",
            "name": "add AESNI_MB optimisations",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/27817/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/126389/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/126389/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 mails.dpdk.org (mails.dpdk.org [217.70.189.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 8AF6D429AD;\n\tFri, 21 Apr 2023 15:12:36 +0200 (CEST)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id E41B142B71;\n\tFri, 21 Apr 2023 15:12:33 +0200 (CEST)",
            "from mga06.intel.com (mga06b.intel.com [134.134.136.31])\n by mails.dpdk.org (Postfix) with ESMTP id 1DE40410F3\n for <dev@dpdk.org>; Fri, 21 Apr 2023 15:12:29 +0200 (CEST)",
            "from orsmga001.jf.intel.com ([10.7.209.18])\n by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 21 Apr 2023 06:12:29 -0700",
            "from silpixa00400355.ir.intel.com (HELO\n silpixa00400355.ger.corp.intel.com) ([10.237.222.80])\n by orsmga001.jf.intel.com with ESMTP; 21 Apr 2023 06:12:28 -0700"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple;\n d=intel.com; i=@intel.com; q=dns/txt; s=Intel;\n t=1682082750; x=1713618750;\n h=from:to:cc:subject:date:message-id:in-reply-to:\n references:mime-version:content-transfer-encoding;\n bh=hNU8gxx4eseAH7M1/hsKxagrAYuaDyQa/zvh2Fkuui8=;\n b=gt+1D9W27rVXrdS6SjSGeTlw9ajJhPBEw9iFJuueaMOigFXK7R2pH+V1\n qGRGL0iNwfEsUUeOKBU0477TKRWSA6lbJoK/jcyrMh9osC3W2EVNi0ihh\n 6yTFac36jUP4V2wC4st4KrQwxxB6mGs9EXIZc/iL5iHEJprI+IZcG60/I\n SYHToaz9PIbwoxXRCvrKoZZpQjDsvorCwusiLkqDQryPOHWeW7SewtFUk\n 4+zapWP1AF5Z2RnjehRTzHpbdUavHP5QOSUl5dVDHmzXCiqzCcuEMZaWd\n Ckep/tkEaLU8cP2Vh9xXKbM3t7jW/ZQel0Pi4Lmg8gkvySe1fV0JaksjF w==;",
        "X-IronPort-AV": [
            "E=McAfee;i=\"6600,9927,10686\"; a=\"408927699\"",
            "E=Sophos;i=\"5.99,214,1677571200\"; d=\"scan'208\";a=\"408927699\"",
            "E=McAfee;i=\"6600,9927,10686\"; a=\"724817336\"",
            "E=Sophos;i=\"5.99,214,1677571200\"; d=\"scan'208\";a=\"724817336\""
        ],
        "X-ExtLoop1": "1",
        "From": "Ciara Power <ciara.power@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "kai.ji@intel.com, Pablo de Lara <pablo.de.lara.guarch@intel.com>,\n Ciara Power <ciara.power@intel.com>",
        "Subject": "[PATCH 1/8] crypto/ipsec_mb: use GMAC dedicated algorithms",
        "Date": "Fri, 21 Apr 2023 13:12:13 +0000",
        "Message-Id": "<20230421131221.1732314-2-ciara.power@intel.com>",
        "X-Mailer": "git-send-email 2.25.1",
        "In-Reply-To": "<20230421131221.1732314-1-ciara.power@intel.com>",
        "References": "<20230421131221.1732314-1-ciara.power@intel.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.29",
        "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"
    },
    "content": "From: Pablo de Lara <pablo.de.lara.guarch@intel.com>\n\nAES-GMAC can be done with auth-only enums\nIMB_AES_GMAC_128/192/256, which allows another cipher\nalgorithm to be used, instead of being part of AES-GCM.\n\nSigned-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>\nSigned-off-by: Ciara Power <ciara.power@intel.com>\n---\n drivers/crypto/ipsec_mb/pmd_aesni_mb.c | 104 +++++++++++--------------\n 1 file changed, 47 insertions(+), 57 deletions(-)",
    "diff": "diff --git a/drivers/crypto/ipsec_mb/pmd_aesni_mb.c b/drivers/crypto/ipsec_mb/pmd_aesni_mb.c\nindex ac20d01937..c53548aa3b 100644\n--- a/drivers/crypto/ipsec_mb/pmd_aesni_mb.c\n+++ b/drivers/crypto/ipsec_mb/pmd_aesni_mb.c\n@@ -57,8 +57,7 @@ is_aead_algo(IMB_HASH_ALG hash_alg, IMB_CIPHER_MODE cipher_mode)\n {\n \treturn (hash_alg == IMB_AUTH_CHACHA20_POLY1305 ||\n \t\thash_alg == IMB_AUTH_AES_CCM ||\n-\t\t(hash_alg == IMB_AUTH_AES_GMAC &&\n-\t\tcipher_mode == IMB_CIPHER_GCM));\n+\t\tcipher_mode == IMB_CIPHER_GCM);\n }\n \n /** Set session authentication parameters */\n@@ -155,7 +154,6 @@ aesni_mb_set_session_auth_parameters(const IMB_MGR *mb_mgr,\n \t\t} else\n \t\t\tsess->cipher.direction = IMB_DIR_DECRYPT;\n \n-\t\tsess->auth.algo = IMB_AUTH_AES_GMAC;\n \t\tif (sess->auth.req_digest_len >\n \t\t\tget_digest_byte_length(IMB_AUTH_AES_GMAC)) {\n \t\t\tIPSEC_MB_LOG(ERR, \"Invalid digest size\\n\");\n@@ -167,16 +165,19 @@ aesni_mb_set_session_auth_parameters(const IMB_MGR *mb_mgr,\n \n \t\tswitch (xform->auth.key.length) {\n \t\tcase IMB_KEY_128_BYTES:\n+\t\t\tsess->auth.algo = IMB_AUTH_AES_GMAC_128;\n \t\t\tIMB_AES128_GCM_PRE(mb_mgr, xform->auth.key.data,\n \t\t\t\t&sess->cipher.gcm_key);\n \t\t\tsess->cipher.key_length_in_bytes = IMB_KEY_128_BYTES;\n \t\t\tbreak;\n \t\tcase IMB_KEY_192_BYTES:\n+\t\t\tsess->auth.algo = IMB_AUTH_AES_GMAC_192;\n \t\t\tIMB_AES192_GCM_PRE(mb_mgr, xform->auth.key.data,\n \t\t\t\t&sess->cipher.gcm_key);\n \t\t\tsess->cipher.key_length_in_bytes = IMB_KEY_192_BYTES;\n \t\t\tbreak;\n \t\tcase IMB_KEY_256_BYTES:\n+\t\t\tsess->auth.algo = IMB_AUTH_AES_GMAC_256;\n \t\t\tIMB_AES256_GCM_PRE(mb_mgr, xform->auth.key.data,\n \t\t\t\t&sess->cipher.gcm_key);\n \t\t\tsess->cipher.key_length_in_bytes = IMB_KEY_256_BYTES;\n@@ -1039,19 +1040,20 @@ set_cpu_mb_job_params(IMB_JOB *job, struct aesni_mb_session *session,\n \t\tbreak;\n \n \tcase IMB_AUTH_AES_GMAC:\n-\t\tif (session->cipher.mode == IMB_CIPHER_GCM) {\n-\t\t\tjob->u.GCM.aad = aad->va;\n-\t\t\tjob->u.GCM.aad_len_in_bytes = session->aead.aad_len;\n-\t\t} else {\n-\t\t\t/* For GMAC */\n-\t\t\tjob->u.GCM.aad = buf;\n-\t\t\tjob->u.GCM.aad_len_in_bytes = len;\n-\t\t\tjob->cipher_mode = IMB_CIPHER_GCM;\n-\t\t}\n+\t\tjob->u.GCM.aad = aad->va;\n+\t\tjob->u.GCM.aad_len_in_bytes = session->aead.aad_len;\n \t\tjob->enc_keys = &session->cipher.gcm_key;\n \t\tjob->dec_keys = &session->cipher.gcm_key;\n \t\tbreak;\n \n+\tcase IMB_AUTH_AES_GMAC_128:\n+\tcase IMB_AUTH_AES_GMAC_192:\n+\tcase IMB_AUTH_AES_GMAC_256:\n+\t\tjob->u.GMAC._key = &session->cipher.gcm_key;\n+\t\tjob->u.GMAC._iv = iv->va;\n+\t\tjob->u.GMAC.iv_len_in_bytes = session->iv.length;\n+\t\tbreak;\n+\n \tcase IMB_AUTH_CHACHA20_POLY1305:\n \t\tjob->u.CHACHA20_POLY1305.aad = aad->va;\n \t\tjob->u.CHACHA20_POLY1305.aad_len_in_bytes =\n@@ -1091,16 +1093,10 @@ set_cpu_mb_job_params(IMB_JOB *job, struct aesni_mb_session *session,\n \tjob->dst = (uint8_t *)buf + sofs.ofs.cipher.head;\n \tjob->cipher_start_src_offset_in_bytes = sofs.ofs.cipher.head;\n \tjob->hash_start_src_offset_in_bytes = sofs.ofs.auth.head;\n-\tif (job->hash_alg == IMB_AUTH_AES_GMAC &&\n-\t\t\tsession->cipher.mode != IMB_CIPHER_GCM) {\n-\t\tjob->msg_len_to_hash_in_bytes = 0;\n-\t\tjob->msg_len_to_cipher_in_bytes = 0;\n-\t} else {\n-\t\tjob->msg_len_to_hash_in_bytes = len - sofs.ofs.auth.head -\n-\t\t\tsofs.ofs.auth.tail;\n-\t\tjob->msg_len_to_cipher_in_bytes = len - sofs.ofs.cipher.head -\n-\t\t\tsofs.ofs.cipher.tail;\n-\t}\n+\tjob->msg_len_to_hash_in_bytes = len - sofs.ofs.auth.head -\n+\t\tsofs.ofs.auth.tail;\n+\tjob->msg_len_to_cipher_in_bytes = len - sofs.ofs.cipher.head -\n+\t\tsofs.ofs.cipher.tail;\n \n \tjob->user_data = udata;\n }\n@@ -1184,8 +1180,6 @@ sgl_linear_cipher_auth_len(IMB_JOB *job, uint64_t *auth_len)\n \t\t\tjob->hash_alg == IMB_AUTH_ZUC_EIA3_BITLEN)\n \t\t*auth_len = (job->msg_len_to_hash_in_bits >> 3) +\n \t\t\t\tjob->hash_start_src_offset_in_bytes;\n-\telse if (job->hash_alg == IMB_AUTH_AES_GMAC)\n-\t\t*auth_len = job->u.GCM.aad_len_in_bytes;\n \telse\n \t\t*auth_len = job->msg_len_to_hash_in_bytes +\n \t\t\t\tjob->hash_start_src_offset_in_bytes;\n@@ -1352,24 +1346,24 @@ set_mb_job_params(IMB_JOB *job, struct ipsec_mb_qp *qp,\n \t\tbreak;\n \n \tcase IMB_AUTH_AES_GMAC:\n-\t\tif (session->cipher.mode == IMB_CIPHER_GCM) {\n-\t\t\tjob->u.GCM.aad = op->sym->aead.aad.data;\n-\t\t\tjob->u.GCM.aad_len_in_bytes = session->aead.aad_len;\n-\t\t\tif (sgl) {\n-\t\t\t\tjob->u.GCM.ctx = &qp_data->gcm_sgl_ctx;\n-\t\t\t\tjob->cipher_mode = IMB_CIPHER_GCM_SGL;\n-\t\t\t\tjob->hash_alg = IMB_AUTH_GCM_SGL;\n-\t\t\t}\n-\t\t} else {\n-\t\t\t/* For GMAC */\n-\t\t\tjob->u.GCM.aad = rte_pktmbuf_mtod_offset(m_src,\n-\t\t\t\t\tuint8_t *, op->sym->auth.data.offset);\n-\t\t\tjob->u.GCM.aad_len_in_bytes = op->sym->auth.data.length;\n-\t\t\tjob->cipher_mode = IMB_CIPHER_GCM;\n+\t\tjob->u.GCM.aad = op->sym->aead.aad.data;\n+\t\tjob->u.GCM.aad_len_in_bytes = session->aead.aad_len;\n+\t\tif (sgl) {\n+\t\t\tjob->u.GCM.ctx = &qp_data->gcm_sgl_ctx;\n+\t\t\tjob->cipher_mode = IMB_CIPHER_GCM_SGL;\n+\t\t\tjob->hash_alg = IMB_AUTH_GCM_SGL;\n \t\t}\n \t\tjob->enc_keys = &session->cipher.gcm_key;\n \t\tjob->dec_keys = &session->cipher.gcm_key;\n \t\tbreak;\n+\tcase IMB_AUTH_AES_GMAC_128:\n+\tcase IMB_AUTH_AES_GMAC_192:\n+\tcase IMB_AUTH_AES_GMAC_256:\n+\t\tjob->u.GMAC._key = &session->cipher.gcm_key;\n+\t\tjob->u.GMAC._iv = rte_crypto_op_ctod_offset(op, uint8_t *,\n+\t\t\t\t\t\tsession->auth_iv.offset);\n+\t\tjob->u.GMAC.iv_len_in_bytes = session->auth_iv.length;\n+\t\tbreak;\n \tcase IMB_AUTH_ZUC_EIA3_BITLEN:\n \tcase IMB_AUTH_ZUC256_EIA3_BITLEN:\n \t\tjob->u.ZUC_EIA3._key = session->auth.zuc_auth_key;\n@@ -1472,19 +1466,21 @@ set_mb_job_params(IMB_JOB *job, struct ipsec_mb_qp *qp,\n \t\tbreak;\n \n \tcase IMB_AUTH_AES_GMAC:\n-\t\tif (session->cipher.mode == IMB_CIPHER_GCM) {\n-\t\t\tjob->hash_start_src_offset_in_bytes =\n-\t\t\t\t\top->sym->aead.data.offset;\n-\t\t\tjob->msg_len_to_hash_in_bytes =\n-\t\t\t\t\top->sym->aead.data.length;\n-\t\t} else { /* AES-GMAC only, only AAD used */\n-\t\t\tjob->msg_len_to_hash_in_bytes = 0;\n-\t\t\tjob->hash_start_src_offset_in_bytes = 0;\n-\t\t}\n-\n+\t\tjob->hash_start_src_offset_in_bytes =\n+\t\t\t\top->sym->aead.data.offset;\n+\t\tjob->msg_len_to_hash_in_bytes =\n+\t\t\t\top->sym->aead.data.length;\n \t\tjob->iv = rte_crypto_op_ctod_offset(op, uint8_t *,\n \t\t\t\tsession->iv.offset);\n \t\tbreak;\n+\tcase IMB_AUTH_AES_GMAC_128:\n+\tcase IMB_AUTH_AES_GMAC_192:\n+\tcase IMB_AUTH_AES_GMAC_256:\n+\t\tjob->hash_start_src_offset_in_bytes =\n+\t\t\t\top->sym->auth.data.offset;\n+\t\tjob->msg_len_to_hash_in_bytes =\n+\t\t\t\top->sym->auth.data.length;\n+\t\tbreak;\n \n \tcase IMB_AUTH_GCM_SGL:\n \tcase IMB_AUTH_CHACHA20_POLY1305_SGL:\n@@ -1567,15 +1563,9 @@ set_mb_job_params(IMB_JOB *job, struct ipsec_mb_qp *qp,\n \t\t\t\t\top->sym->cipher.data.length;\n \t\tbreak;\n \tcase IMB_CIPHER_GCM:\n-\t\tif (session->cipher.mode == IMB_CIPHER_NULL) {\n-\t\t\t/* AES-GMAC only (only AAD used) */\n-\t\t\tjob->msg_len_to_cipher_in_bytes = 0;\n-\t\t\tjob->cipher_start_src_offset_in_bytes = 0;\n-\t\t} else {\n-\t\t\tjob->cipher_start_src_offset_in_bytes =\n-\t\t\t\t\top->sym->aead.data.offset;\n-\t\t\tjob->msg_len_to_cipher_in_bytes = op->sym->aead.data.length;\n-\t\t}\n+\t\tjob->cipher_start_src_offset_in_bytes =\n+\t\t\t\top->sym->aead.data.offset;\n+\t\tjob->msg_len_to_cipher_in_bytes = op->sym->aead.data.length;\n \t\tbreak;\n \tcase IMB_CIPHER_CCM:\n \tcase IMB_CIPHER_CHACHA20_POLY1305:\n",
    "prefixes": [
        "1/8"
    ]
}