get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 74142,
    "url": "http://patches.dpdk.org/api/patches/74142/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20200715212228.28010-8-stephen@networkplumber.org/",
    "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": "<20200715212228.28010-8-stephen@networkplumber.org>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20200715212228.28010-8-stephen@networkplumber.org",
    "date": "2020-07-15T21:22:28",
    "name": "[v3,7/7] app/proc-info: add crypto security context info",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "e3c44da20fdb98fcb1b4d1c59feef761f099368a",
    "submitter": {
        "id": 27,
        "url": "http://patches.dpdk.org/api/people/27/?format=api",
        "name": "Stephen Hemminger",
        "email": "stephen@networkplumber.org"
    },
    "delegate": {
        "id": 1,
        "url": "http://patches.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20200715212228.28010-8-stephen@networkplumber.org/mbox/",
    "series": [
        {
            "id": 11062,
            "url": "http://patches.dpdk.org/api/series/11062/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=11062",
            "date": "2020-07-15T21:22:21",
            "name": "app/proc-info enhancments",
            "version": 3,
            "mbox": "http://patches.dpdk.org/series/11062/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/74142/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/74142/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 1783AA0548;\n\tWed, 15 Jul 2020 23:23:43 +0200 (CEST)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id BD8831BEDC;\n\tWed, 15 Jul 2020 23:22:51 +0200 (CEST)",
            "from mail-pl1-f195.google.com (mail-pl1-f195.google.com\n [209.85.214.195]) by dpdk.org (Postfix) with ESMTP id B95B91BEB1\n for <dev@dpdk.org>; Wed, 15 Jul 2020 23:22:47 +0200 (CEST)",
            "by mail-pl1-f195.google.com with SMTP id k4so2910906pld.12\n for <dev@dpdk.org>; Wed, 15 Jul 2020 14:22:47 -0700 (PDT)",
            "from hermes.corp.microsoft.com (204-195-22-127.wavecable.com.\n [204.195.22.127])\n by smtp.gmail.com with ESMTPSA id s89sm2932600pjj.28.2020.07.15.14.22.45\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Wed, 15 Jul 2020 14:22:46 -0700 (PDT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=networkplumber-org.20150623.gappssmtp.com; s=20150623;\n h=from:to:cc:subject:date:message-id:in-reply-to:references\n :mime-version:content-transfer-encoding;\n bh=7qMco6owzSRRppoegkjBk6gyJ3foTnwTLT70++HgyZ0=;\n b=1pIqgUzU8w87HsWoGQ+Vp7AnFy/PQ9mxJubXqG3NcoibPqLOe5WEJe8cyJI/OJ/iye\n hO6N90XjyzOerjFLSyR9h816Mlw67m5/PFYAZntmS1vma6u+Q4cMSpJhEK47QpQXe6A9\n bLfixftqMNKCvkeqaFteRWjRmCRrv+FsdF0m9eJ53VQ13I0mbhuOO9qIx0y9O/EwYUN4\n jK0D6e3PEsOfVRl3adqDOs5tLSKDT+FR22TjeKJQ7UoTiF9zKsLbP3OZLGUk+e1Qi2B9\n ZNuEuBVI7K6ewaE9QWqXBVWn08ov1ESCsEcgKzqaZzkhL+G0f+E0rmisZaNIevud0Qeo\n HoBg==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20161025;\n h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n :references:mime-version:content-transfer-encoding;\n bh=7qMco6owzSRRppoegkjBk6gyJ3foTnwTLT70++HgyZ0=;\n b=RetN67W1d6U0ksl1GiTqAwz+wVm1xSTl06jdtCsfN5R1bAZ9htDD4cEjPj7MDI/Lcu\n cjVgf7zRHPAR2yz3I7rtbhoe3zDQ5bWfPp4L70csWkOOHfx3hMydUaUlas3XGvitPro2\n 50Lp7Bet/aYqT2SkOLLz36ZHjT6USQNRL9vyyyevkC4z66LPgdbitDToFw9vp2zADaTr\n LntlTYe3qtwQxeGTiX8rhMy5ZlDIm99gE7fRMZPDishGyea/hA/ELcCwTfMRiLt4Qa8R\n 1okFoftRYi2Z5bgZ8Y0lsZasMoDWXzrXaLldCUP2ERvvElv/woDI5SWZV1gAxB9fx6Wo\n i+YQ==",
        "X-Gm-Message-State": "AOAM531VREVIi1YNtbiJbNN2C+TgzXLGgatRFb+/yXWcypBaLJMU8OBh\n N4YjMfTnfCbyMcug8xocw/p7SQ==",
        "X-Google-Smtp-Source": "\n ABdhPJzBTfxVQx6Jo54IbVBr7gmvPJz5kz0iwsWdZ/+JccZ+M9JJcmvaAGwRVRT2xXZuRfKBcDRbIA==",
        "X-Received": "by 2002:a17:90a:368c:: with SMTP id\n t12mr1654868pjb.90.1594848166984;\n Wed, 15 Jul 2020 14:22:46 -0700 (PDT)",
        "From": "Stephen Hemminger <stephen@networkplumber.org>",
        "To": "maryam.tahhan@intel.com, reshma.pattan@intel.com, hemant.agrawal@nxp.com",
        "Cc": "dev@dpdk.org,\n\tStephen Hemminger <stephen@networkplumber.org>",
        "Date": "Wed, 15 Jul 2020 14:22:28 -0700",
        "Message-Id": "<20200715212228.28010-8-stephen@networkplumber.org>",
        "X-Mailer": "git-send-email 2.27.0",
        "In-Reply-To": "<20200715212228.28010-1-stephen@networkplumber.org>",
        "References": "<20200506193741.24117-1-stephen@networkplumber.org>\n <20200715212228.28010-1-stephen@networkplumber.org>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[dpdk-dev] [PATCH v3 7/7] app/proc-info: add crypto security\n\tcontext info",
        "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": "From: Hemant Agrawal <hemant.agrawal@nxp.com>\n\nIf crypto context is not present, no point in displaying it.\n\nThis patch adds the crypto based security context info.\nAlso improve the flag printing to SECURITY OFFLOAD from\nINLINE.\n\nUse common code for displaying crypto context information\nwhen doing show_ports and show_crypto.\n\nSigned-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>\nSigned-off-by: Stephen Hemminger <stephen@networkplumber.org>\n---\n app/proc-info/main.c | 80 +++++++++++++++++++++++++-------------------\n 1 file changed, 46 insertions(+), 34 deletions(-)",
    "diff": "diff --git a/app/proc-info/main.c b/app/proc-info/main.c\nindex 14c04f8367f1..91205a51ad6b 100644\n--- a/app/proc-info/main.c\n+++ b/app/proc-info/main.c\n@@ -674,6 +674,32 @@ eth_tx_queue_available(uint16_t port_id, uint16_t queue_id, uint16_t n)\n \treturn count;\n }\n \n+static void\n+show_security_context(uint16_t portid)\n+{\n+\tvoid *p_ctx = rte_eth_dev_get_sec_ctx(portid);\n+\tconst struct rte_security_capability *s_cap;\n+\n+\tif (p_ctx == NULL)\n+\t\treturn;\n+\n+\tprintf(\"  - crypto context\\n\");\n+\tprintf(\"\\t  -- security context - %p\\n\", p_ctx);\n+\tprintf(\"\\t  -- size %u\\n\",\n+\t       rte_security_session_get_size(p_ctx));\n+\n+\ts_cap = rte_security_capabilities_get(p_ctx);\n+\tif (s_cap) {\n+\t\tprintf(\"\\t  -- action (0x%x), protocol (0x%x),\"\n+\t\t       \" offload flags (0x%x)\\n\",\n+\t\t       s_cap->action,\n+\t\t       s_cap->protocol,\n+\t\t       s_cap->ol_flags);\n+\t\tprintf(\"\\t  -- capabilities - oper type %x\\n\",\n+\t\t       s_cap->crypto_capabilities->op);\n+\t}\n+}\n+\n static void\n show_port(void)\n {\n@@ -853,26 +879,8 @@ show_port(void)\n \t\t\t}\n \t\t}\n \n-\t\tprintf(\"  - cyrpto context\\n\");\n #ifdef RTE_LIBRTE_SECURITY\n-\t\tvoid *p_ctx = rte_eth_dev_get_sec_ctx(i);\n-\t\tprintf(\"\\t  -- security context - %p\\n\", p_ctx);\n-\n-\t\tif (p_ctx) {\n-\t\t\tprintf(\"\\t  -- size %u\\n\",\n-\t\t\t\t\trte_security_session_get_size(p_ctx));\n-\t\t\tconst struct rte_security_capability *s_cap =\n-\t\t\t\trte_security_capabilities_get(p_ctx);\n-\t\t\tif (s_cap) {\n-\t\t\t\tprintf(\"\\t  -- action (0x%x), protocol (0x%x),\"\n-\t\t\t\t\t\t\" offload flags (0x%x)\\n\",\n-\t\t\t\t\t\ts_cap->action,\n-\t\t\t\t\t\ts_cap->protocol,\n-\t\t\t\t\t\ts_cap->ol_flags);\n-\t\t\t\tprintf(\"\\t  -- capabilities - oper type %x\\n\",\n-\t\t\t\t\t\ts_cap->crypto_capabilities->op);\n-\t\t\t}\n-\t\t}\n+\t\tshow_security_context(i);\n #endif\n \t}\n }\n@@ -1178,7 +1186,7 @@ display_crypto_feature_info(uint64_t x)\n \tprintf(\"\\t\\t  + AESNI: CPU (%c), HW (%c)\\n\",\n \t\t(x & RTE_CRYPTODEV_FF_CPU_AESNI) ? 'y' : 'n',\n \t\t(x & RTE_CRYPTODEV_FF_HW_ACCELERATED) ? 'y' : 'n');\n-\tprintf(\"\\t\\t  + INLINE (%c)\\n\",\n+\tprintf(\"\\t\\t  + SECURITY OFFLOAD (%c)\\n\",\n \t\t(x & RTE_CRYPTODEV_FF_SECURITY) ? 'y' : 'n');\n \tprintf(\"\\t\\t  + ARM: NEON (%c), CE (%c)\\n\",\n \t\t(x & RTE_CRYPTODEV_FF_CPU_NEON) ? 'y' : 'n',\n@@ -1212,14 +1220,14 @@ show_crypto(void)\n \n \t\tprintf(\"  - device (%u)\\n\", i);\n \t\tprintf(\"\\t  -- name (%s)\\n\"\n-\t\t\t\"\\t  -- driver (%s)\\n\"\n-\t\t\t\"\\t  -- id (%u) on socket (%d)\\n\"\n-\t\t\t\"\\t  -- queue pairs (%d)\\n\",\n-\t\t\trte_cryptodev_name_get(i),\n-\t\t\tdev_info.driver_name,\n-\t\t\tdev_info.driver_id,\n-\t\t\tdev_info.device->numa_node,\n-\t\t\trte_cryptodev_queue_pair_count(i));\n+\t\t       \"\\t  -- driver (%s)\\n\"\n+\t\t       \"\\t  -- id (%u) on socket (%d)\\n\"\n+\t\t       \"\\t  -- queue pairs (%d)\\n\",\n+\t\t       rte_cryptodev_name_get(i),\n+\t\t       dev_info.driver_name,\n+\t\t       dev_info.driver_id,\n+\t\t       dev_info.device->numa_node,\n+\t\t       rte_cryptodev_queue_pair_count(i));\n \n \t\tdisplay_crypto_feature_info(dev_info.feature_flags);\n \n@@ -1227,14 +1235,18 @@ show_crypto(void)\n \t\tif (rte_cryptodev_stats_get(i, &stats) == 0) {\n \t\t\tprintf(\"\\t  -- stats\\n\");\n \t\t\tprintf(\"\\t\\t  + enqueue count (%\"PRIu64\")\"\n-\t\t\t\t\" error (%\"PRIu64\")\\n\",\n-\t\t\t\tstats.enqueued_count,\n-\t\t\t\tstats.enqueue_err_count);\n+\t\t\t       \" error (%\"PRIu64\")\\n\",\n+\t\t\t       stats.enqueued_count,\n+\t\t\t       stats.enqueue_err_count);\n \t\t\tprintf(\"\\t\\t  + dequeue count (%\"PRIu64\")\"\n-\t\t\t\t\" error (%\"PRIu64\")\\n\",\n-\t\t\t\tstats.dequeued_count,\n-\t\t\t\tstats.dequeue_err_count);\n+\t\t\t       \" error (%\"PRIu64\")\\n\",\n+\t\t\t       stats.dequeued_count,\n+\t\t\t       stats.dequeue_err_count);\n \t\t}\n+\n+#ifdef RTE_LIBRTE_SECURITY\n+\t\tshow_security_context(i);\n+#endif\n \t}\n }\n \n",
    "prefixes": [
        "v3",
        "7/7"
    ]
}