get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 66103,
    "url": "http://patches.dpdk.org/api/patches/66103/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/1582820317-7333-7-git-send-email-lbartosik@marvell.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": "<1582820317-7333-7-git-send-email-lbartosik@marvell.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1582820317-7333-7-git-send-email-lbartosik@marvell.com",
    "date": "2020-02-27T16:18:28",
    "name": "[v5,06/15] examples/ipsec-secgw: add routines to display config",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "820f81b1e0521ef37a6c014aa13410d1b2800c90",
    "submitter": {
        "id": 1305,
        "url": "http://patches.dpdk.org/api/people/1305/?format=api",
        "name": "Lukas Bartosik [C]",
        "email": "lbartosik@marvell.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/1582820317-7333-7-git-send-email-lbartosik@marvell.com/mbox/",
    "series": [
        {
            "id": 8713,
            "url": "http://patches.dpdk.org/api/series/8713/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=8713",
            "date": "2020-02-27T16:18:22",
            "name": "add eventmode to ipsec-secgw",
            "version": 5,
            "mbox": "http://patches.dpdk.org/series/8713/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/66103/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/66103/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 2A5CDA055F;\n\tThu, 27 Feb 2020 17:19:58 +0100 (CET)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id A06AE1BF76;\n\tThu, 27 Feb 2020 17:19:06 +0100 (CET)",
            "from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com\n [67.231.156.173]) by dpdk.org (Postfix) with ESMTP id CC0971BFCF\n for <dev@dpdk.org>; Thu, 27 Feb 2020 17:19:02 +0100 (CET)",
            "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 01RFsqaR002551; Thu, 27 Feb 2020 08:19:02 -0800",
            "from sc-exch02.marvell.com ([199.233.58.182])\n by mx0b-0016f401.pphosted.com with ESMTP id 2ydchth8fe-1\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT);\n Thu, 27 Feb 2020 08:19:02 -0800",
            "from SC-EXCH03.marvell.com (10.93.176.83) by SC-EXCH02.marvell.com\n (10.93.176.82) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 27 Feb\n 2020 08:19:00 -0800",
            "from maili.marvell.com (10.93.176.43) by SC-EXCH03.marvell.com\n (10.93.176.83) with Microsoft SMTP Server id 15.0.1497.2 via Frontend\n Transport; Thu, 27 Feb 2020 08:19:00 -0800",
            "from luke.marvell.com (unknown [10.95.130.81])\n by maili.marvell.com (Postfix) with ESMTP id 734043F7040;\n Thu, 27 Feb 2020 08:18:57 -0800 (PST)"
        ],
        "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-type; s=pfpt0818; bh=TZFZfaHoMrvL2b6dCVQUjByLbCv0OlyB2z7SmjUt3QE=;\n b=tEza+dS+yF7qnLwwZE3F7Q5Q10TNeAHuqGnQ1giAkGafPbw9huH9OemKLL4Zadm/r1N1\n QNZMH0H4GlGhXTUQ3yLG6g/70XTaSxrVa8nguDTJ/FgjvngPeCsaqhTe18Wai5zSOtwv\n Jm/z8ryh1pay8lmSOSBAgmrHIEFTPdZOUeUimn9TmFj4czj2OU83dF+F+MviUPKdFEAm\n g1N08mw4HOQIq8ELahAxsbctANvt9f+G9NbZ32v+aiBDxJbxpYBAvcCU+UNSD24JmkGJ\n /zEEX+BTEPEpK/J4mEv+o6GNKfpwQXPxNHr/2KRMxsiYU6LNRkNz32Ly2COwBJ40y/tx bg==",
        "From": "Lukasz Bartosik <lbartosik@marvell.com>",
        "To": "Akhil Goyal <akhil.goyal@nxp.com>, Radu Nicolau <radu.nicolau@intel.com>,\n Thomas Monjalon <thomas@monjalon.net>",
        "CC": "Anoob Joseph <anoobj@marvell.com>, Jerin Jacob <jerinj@marvell.com>,\n Narayana Prasad <pathreya@marvell.com>,\n Ankur Dwivedi <adwivedi@marvell.com>,\n Archana Muniganti <marchana@marvell.com>, Tejasree Kondoj\n <ktejasree@marvell.com>, Vamsi Attunuru <vattunuru@marvell.com>,\n \"Konstantin Ananyev\" <konstantin.ananyev@intel.com>, <dev@dpdk.org>",
        "Date": "Thu, 27 Feb 2020 17:18:28 +0100",
        "Message-ID": "<1582820317-7333-7-git-send-email-lbartosik@marvell.com>",
        "X-Mailer": "git-send-email 2.7.4",
        "In-Reply-To": "<1582820317-7333-1-git-send-email-lbartosik@marvell.com>",
        "References": "<1582185727-6749-1-git-send-email-lbartosik@marvell.com>\n <1582820317-7333-1-git-send-email-lbartosik@marvell.com>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain",
        "X-Proofpoint-Virus-Version": "vendor=fsecure engine=2.50.10434:6.0.138, 18.0.572\n definitions=2020-02-27_05:2020-02-26,\n 2020-02-27 signatures=0",
        "Subject": "[dpdk-dev] [PATCH v5 06/15] examples/ipsec-secgw: add routines to\n\tdisplay config",
        "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: Anoob Joseph <anoobj@marvell.com>\n\nAdd routines to display the eventmode configuration and provide\nan overview of the devices used.\n\nSigned-off-by: Anoob Joseph <anoobj@marvell.com>\nSigned-off-by: Lukasz Bartosik <lbartosik@marvell.com>\n---\n examples/ipsec-secgw/event_helper.c | 207 ++++++++++++++++++++++++++++++++++++\n examples/ipsec-secgw/event_helper.h |  14 +++\n 2 files changed, 221 insertions(+)",
    "diff": "diff --git a/examples/ipsec-secgw/event_helper.c b/examples/ipsec-secgw/event_helper.c\nindex fca1e08..d09bf7d 100644\n--- a/examples/ipsec-secgw/event_helper.c\n+++ b/examples/ipsec-secgw/event_helper.c\n@@ -816,6 +816,210 @@ eh_initialize_tx_adapter(struct eventmode_conf *em_conf)\n \treturn 0;\n }\n \n+static void\n+eh_display_operating_mode(struct eventmode_conf *em_conf)\n+{\n+\tchar sched_types[][32] = {\n+\t\t\"RTE_SCHED_TYPE_ORDERED\",\n+\t\t\"RTE_SCHED_TYPE_ATOMIC\",\n+\t\t\"RTE_SCHED_TYPE_PARALLEL\",\n+\t};\n+\tEH_LOG_INFO(\"Operating mode:\");\n+\n+\tEH_LOG_INFO(\"\\tScheduling type: \\t%s\",\n+\t\tsched_types[em_conf->ext_params.sched_type]);\n+\n+\tEH_LOG_INFO(\"\");\n+}\n+\n+static void\n+eh_display_event_dev_conf(struct eventmode_conf *em_conf)\n+{\n+\tchar queue_mode[][32] = {\n+\t\t\"\",\n+\t\t\"ATQ (ALL TYPE QUEUE)\",\n+\t\t\"SINGLE LINK\",\n+\t};\n+\tchar print_buf[256] = { 0 };\n+\tint i;\n+\n+\tEH_LOG_INFO(\"Event Device Configuration:\");\n+\n+\tfor (i = 0; i < em_conf->nb_eventdev; i++) {\n+\t\tsprintf(print_buf,\n+\t\t\t\"\\tDev ID: %-2d \\tQueues: %-2d \\tPorts: %-2d\",\n+\t\t\tem_conf->eventdev_config[i].eventdev_id,\n+\t\t\tem_conf->eventdev_config[i].nb_eventqueue,\n+\t\t\tem_conf->eventdev_config[i].nb_eventport);\n+\t\tsprintf(print_buf + strlen(print_buf),\n+\t\t\t\"\\tQueue mode: %s\",\n+\t\t\tqueue_mode[em_conf->eventdev_config[i].ev_queue_mode]);\n+\t\tEH_LOG_INFO(\"%s\", print_buf);\n+\t}\n+\tEH_LOG_INFO(\"\");\n+}\n+\n+static void\n+eh_display_rx_adapter_conf(struct eventmode_conf *em_conf)\n+{\n+\tint nb_rx_adapter = em_conf->nb_rx_adapter;\n+\tstruct rx_adapter_connection_info *conn;\n+\tstruct rx_adapter_conf *adapter;\n+\tchar print_buf[256] = { 0 };\n+\tint i, j;\n+\n+\tEH_LOG_INFO(\"Rx adapters configured: %d\", nb_rx_adapter);\n+\n+\tfor (i = 0; i < nb_rx_adapter; i++) {\n+\t\tadapter = &(em_conf->rx_adapter[i]);\n+\t\tEH_LOG_INFO(\n+\t\t\t\"\\tRx adaper ID: %-2d\\tConnections: %-2d\\tEvent dev ID: %-2d\"\n+\t\t\t\"\\tRx core: %-2d\",\n+\t\t\tadapter->adapter_id,\n+\t\t\tadapter->nb_connections,\n+\t\t\tadapter->eventdev_id,\n+\t\t\tadapter->rx_core_id);\n+\n+\t\tfor (j = 0; j < adapter->nb_connections; j++) {\n+\t\t\tconn = &(adapter->conn[j]);\n+\n+\t\t\tsprintf(print_buf,\n+\t\t\t\t\"\\t\\tEthdev ID: %-2d\", conn->ethdev_id);\n+\n+\t\t\tif (conn->ethdev_rx_qid == -1)\n+\t\t\t\tsprintf(print_buf + strlen(print_buf),\n+\t\t\t\t\t\"\\tEth rx queue: %-2s\", \"ALL\");\n+\t\t\telse\n+\t\t\t\tsprintf(print_buf + strlen(print_buf),\n+\t\t\t\t\t\"\\tEth rx queue: %-2d\",\n+\t\t\t\t\tconn->ethdev_rx_qid);\n+\n+\t\t\tsprintf(print_buf + strlen(print_buf),\n+\t\t\t\t\"\\tEvent queue: %-2d\", conn->eventq_id);\n+\t\t\tEH_LOG_INFO(\"%s\", print_buf);\n+\t\t}\n+\t}\n+\tEH_LOG_INFO(\"\");\n+}\n+\n+static void\n+eh_display_tx_adapter_conf(struct eventmode_conf *em_conf)\n+{\n+\tint nb_tx_adapter = em_conf->nb_tx_adapter;\n+\tstruct tx_adapter_connection_info *conn;\n+\tstruct tx_adapter_conf *adapter;\n+\tchar print_buf[256] = { 0 };\n+\tint i, j;\n+\n+\tEH_LOG_INFO(\"Tx adapters configured: %d\", nb_tx_adapter);\n+\n+\tfor (i = 0; i < nb_tx_adapter; i++) {\n+\t\tadapter = &(em_conf->tx_adapter[i]);\n+\t\tsprintf(print_buf,\n+\t\t\t\"\\tTx adapter ID: %-2d\\tConnections: %-2d\\tEvent dev ID: %-2d\",\n+\t\t\tadapter->adapter_id,\n+\t\t\tadapter->nb_connections,\n+\t\t\tadapter->eventdev_id);\n+\t\tif (adapter->tx_core_id == (uint32_t)-1)\n+\t\t\tsprintf(print_buf + strlen(print_buf),\n+\t\t\t\t\"\\tTx core: %-2s\", \"[INTERNAL PORT]\");\n+\t\telse if (adapter->tx_core_id == RTE_MAX_LCORE)\n+\t\t\tsprintf(print_buf + strlen(print_buf),\n+\t\t\t\t\"\\tTx core: %-2s\", \"[NONE]\");\n+\t\telse\n+\t\t\tsprintf(print_buf + strlen(print_buf),\n+\t\t\t\t\"\\tTx core: %-2d,\\tInput event queue: %-2d\",\n+\t\t\t\tadapter->tx_core_id, adapter->tx_ev_queue);\n+\n+\t\tEH_LOG_INFO(\"%s\", print_buf);\n+\n+\t\tfor (j = 0; j < adapter->nb_connections; j++) {\n+\t\t\tconn = &(adapter->conn[j]);\n+\n+\t\t\tsprintf(print_buf,\n+\t\t\t\t\"\\t\\tEthdev ID: %-2d\", conn->ethdev_id);\n+\n+\t\t\tif (conn->ethdev_tx_qid == -1)\n+\t\t\t\tsprintf(print_buf + strlen(print_buf),\n+\t\t\t\t\t\"\\tEth tx queue: %-2s\", \"ALL\");\n+\t\t\telse\n+\t\t\t\tsprintf(print_buf + strlen(print_buf),\n+\t\t\t\t\t\"\\tEth tx queue: %-2d\",\n+\t\t\t\t\tconn->ethdev_tx_qid);\n+\t\t\tEH_LOG_INFO(\"%s\", print_buf);\n+\t\t}\n+\t}\n+\tEH_LOG_INFO(\"\");\n+}\n+\n+static void\n+eh_display_link_conf(struct eventmode_conf *em_conf)\n+{\n+\tstruct eh_event_link_info *link;\n+\tchar print_buf[256] = { 0 };\n+\tint i;\n+\n+\tEH_LOG_INFO(\"Links configured: %d\", em_conf->nb_link);\n+\n+\tfor (i = 0; i < em_conf->nb_link; i++) {\n+\t\tlink = &(em_conf->link[i]);\n+\n+\t\tsprintf(print_buf,\n+\t\t\t\"\\tEvent dev ID: %-2d\\tEvent port: %-2d\",\n+\t\t\tlink->eventdev_id,\n+\t\t\tlink->event_port_id);\n+\n+\t\tif (em_conf->ext_params.all_ev_queue_to_ev_port)\n+\t\t\tsprintf(print_buf + strlen(print_buf),\n+\t\t\t\t\"Event queue: %-2s\\t\", \"ALL\");\n+\t\telse\n+\t\t\tsprintf(print_buf + strlen(print_buf),\n+\t\t\t\t\"Event queue: %-2d\\t\", link->eventq_id);\n+\n+\t\tsprintf(print_buf + strlen(print_buf),\n+\t\t\t\"Lcore: %-2d\", link->lcore_id);\n+\t\tEH_LOG_INFO(\"%s\", print_buf);\n+\t}\n+\tEH_LOG_INFO(\"\");\n+}\n+\n+void\n+eh_display_conf(struct eh_conf *conf)\n+{\n+\tstruct eventmode_conf *em_conf;\n+\n+\tif (conf == NULL) {\n+\t\tEH_LOG_ERR(\"Invalid event helper configuration\");\n+\t\treturn;\n+\t}\n+\n+\tif (conf->mode != EH_PKT_TRANSFER_MODE_EVENT)\n+\t\treturn;\n+\n+\tif (conf->mode_params == NULL) {\n+\t\tEH_LOG_ERR(\"Invalid event mode parameters\");\n+\t\treturn;\n+\t}\n+\n+\t/* Get eventmode conf */\n+\tem_conf = (struct eventmode_conf *)(conf->mode_params);\n+\n+\t/* Display user exposed operating modes */\n+\teh_display_operating_mode(em_conf);\n+\n+\t/* Display event device conf */\n+\teh_display_event_dev_conf(em_conf);\n+\n+\t/* Display Rx adapter conf */\n+\teh_display_rx_adapter_conf(em_conf);\n+\n+\t/* Display Tx adapter conf */\n+\teh_display_tx_adapter_conf(em_conf);\n+\n+\t/* Display event-lcore link */\n+\teh_display_link_conf(em_conf);\n+}\n+\n int32_t\n eh_devs_init(struct eh_conf *conf)\n {\n@@ -849,6 +1053,9 @@ eh_devs_init(struct eh_conf *conf)\n \t\treturn ret;\n \t}\n \n+\t/* Display the current configuration */\n+\teh_display_conf(conf);\n+\n \t/* Stop eth devices before setting up adapter */\n \tRTE_ETH_FOREACH_DEV(port_id) {\n \ndiff --git a/examples/ipsec-secgw/event_helper.h b/examples/ipsec-secgw/event_helper.h\nindex 913b172..8eb5e25 100644\n--- a/examples/ipsec-secgw/event_helper.h\n+++ b/examples/ipsec-secgw/event_helper.h\n@@ -13,6 +13,11 @@\n \t\tRTE_FMT(\"%s() line %u: \" RTE_FMT_HEAD(__VA_ARGS__ ,) \"\\n\", \\\n \t\t\t__func__, __LINE__, RTE_FMT_TAIL(__VA_ARGS__ ,)))\n \n+#define EH_LOG_INFO(...) \\\n+\tRTE_LOG(INFO, EH, \\\n+\t\tRTE_FMT(\"%s() line %u: \" RTE_FMT_HEAD(__VA_ARGS__ ,) \"\\n\", \\\n+\t\t\t__func__, __LINE__, RTE_FMT_TAIL(__VA_ARGS__ ,)))\n+\n /* Max event devices supported */\n #define EVENT_MODE_MAX_EVENT_DEVS RTE_EVENT_MAX_DEVS\n \n@@ -214,4 +219,13 @@ eh_devs_uninit(struct eh_conf *conf);\n uint8_t\n eh_get_tx_queue(struct eh_conf *conf, uint8_t eventdev_id);\n \n+/**\n+ * Display event mode configuration\n+ *\n+ * @param conf\n+ *   Event helper configuration\n+ */\n+void\n+eh_display_conf(struct eh_conf *conf);\n+\n #endif /* _EVENT_HELPER_H_ */\n",
    "prefixes": [
        "v5",
        "06/15"
    ]
}