get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 74961,
    "url": "http://patches.dpdk.org/api/patches/74961/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20200728191330.20864-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": "<20200728191330.20864-8-stephen@networkplumber.org>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20200728191330.20864-8-stephen@networkplumber.org",
    "date": "2020-07-28T19:13:29",
    "name": "[v5,7/8] 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/20200728191330.20864-8-stephen@networkplumber.org/mbox/",
    "series": [
        {
            "id": 11371,
            "url": "http://patches.dpdk.org/api/series/11371/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=11371",
            "date": "2020-07-28T19:13:22",
            "name": "app/proc-info enhancements",
            "version": 5,
            "mbox": "http://patches.dpdk.org/series/11371/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/74961/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/74961/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 2080FA052B;\n\tTue, 28 Jul 2020 21:14:48 +0200 (CEST)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id B53C71C0C6;\n\tTue, 28 Jul 2020 21:14:01 +0200 (CEST)",
            "from mail-pj1-f68.google.com (mail-pj1-f68.google.com\n [209.85.216.68]) by dpdk.org (Postfix) with ESMTP id E700E1C043\n for <dev@dpdk.org>; Tue, 28 Jul 2020 21:13:52 +0200 (CEST)",
            "by mail-pj1-f68.google.com with SMTP id gc9so405990pjb.2\n for <dev@dpdk.org>; Tue, 28 Jul 2020 12:13:52 -0700 (PDT)",
            "from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127])\n by smtp.gmail.com with ESMTPSA id x66sm19045748pgb.12.2020.07.28.12.13.50\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Tue, 28 Jul 2020 12:13:50 -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=eZjTWwbqvqVSSxQh00ui5CqRv4SW9nnllNk3zygOnFI=;\n b=d1wxHGzlPRDfepVwK+wyIrpWHEKiL8BiqhAI9SdedxYzo+xYFkwle8PcKDWCMHVZQF\n XbBcUhHASmtU2NOzaMhB5XdoIISUMZjcMSXsFWMg7Fy5OVnVSBAGBL1aEjacFGJorTo5\n MBUfj8KL+x0uxtsaMp8cisb6tGWnlAWc+IkLI7TTITzcDyLXp8UI6wrI9WRPlAFpWs5k\n ufr+r5mvG/iLEaY4RuhAC66AUaERJIT6dlQWEgJdB4v99RtaojHB5KxVIfzTQJ8Zrzqo\n k6/HJtLSetmY+RzNJmKdpqY5jdAgso7RCbO9Q/OrOtlOZA/66f7aYuKwxbKwuDMgchKG\n lqMg==",
        "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=eZjTWwbqvqVSSxQh00ui5CqRv4SW9nnllNk3zygOnFI=;\n b=Hl8+dI2jkr9gnYdNBJt+xGBu4SLWfkkwxCNo3OLvtpxvhnaE9fzWLo0xQ2GH+glDgN\n BOtTn7rdF+lGE4wtu5uGU8GQvLYD+XUtNxGMgXrofFiAlvLph7OC9FPz52Dx9IocxQeF\n KGEGAE279Fklw76Jg95JamoJmPO5gdtef250P7wlOBpLBGM6XP3tLPhTLR9BQ6Ri2jSr\n f0zzUgrEdRdc/ZAQDEajh80NsPhD3esd/q2CFRa8/LCgEMNKKbMITU119/Po1RJAnfCR\n q4jqpZRZzsfAnOZHlDRRVyEqUDV2b7VKafQFFGyRe2x81TfhSrsSvGOjVPIbU070/QLp\n UkZQ==",
        "X-Gm-Message-State": "AOAM533q1cCCo0ikcuKiR2mOMXi4xjSkSP4OjH+PhhlQ0mUFPvMZoj4D\n HJmseihieJ0BIhblX80GiWtWSE6CrrEURw==",
        "X-Google-Smtp-Source": "\n ABdhPJz8ErYrCf1ii/Bg0QIeyFXCXupmvGocuPji8wkG66+7SjtEh7kc22sQWe5N5ujsCmz21PM0UA==",
        "X-Received": "by 2002:a17:902:7689:: with SMTP id\n m9mr24101276pll.240.1595963631642;\n Tue, 28 Jul 2020 12:13:51 -0700 (PDT)",
        "From": "Stephen Hemminger <stephen@networkplumber.org>",
        "To": "dev@dpdk.org",
        "Cc": "Hemant Agrawal <hemant.agrawal@nxp.com>,\n Stephen Hemminger <stephen@networkplumber.org>",
        "Date": "Tue, 28 Jul 2020 12:13:29 -0700",
        "Message-Id": "<20200728191330.20864-8-stephen@networkplumber.org>",
        "X-Mailer": "git-send-email 2.27.0",
        "In-Reply-To": "<20200728191330.20864-1-stephen@networkplumber.org>",
        "References": "<20200506193741.24117-1-stephen@networkplumber.org>\n <20200728191330.20864-1-stephen@networkplumber.org>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[dpdk-dev] [PATCH v5 7/8] 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 4e2e647498ff..282af670d20a 100644\n--- a/app/proc-info/main.c\n+++ b/app/proc-info/main.c\n@@ -673,6 +673,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@@ -841,26 +867,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@@ -1166,7 +1174,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@@ -1200,14 +1208,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@@ -1215,14 +1223,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": [
        "v5",
        "7/8"
    ]
}