get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 123577,
    "url": "https://patches.dpdk.org/api/patches/123577/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20230209102434.2460394-3-amitprakashs@marvell.com/",
    "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": "<20230209102434.2460394-3-amitprakashs@marvell.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20230209102434.2460394-3-amitprakashs@marvell.com",
    "date": "2023-02-09T10:24:34",
    "name": "[v7,3/3] examples/l3fwd-graph: changes to configure pcap capture",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "47ab91172e251e0c6eb0fcee02fb5a291f873c53",
    "submitter": {
        "id": 2699,
        "url": "https://patches.dpdk.org/api/people/2699/?format=api",
        "name": "Amit Prakash Shukla",
        "email": "amitprakashs@marvell.com"
    },
    "delegate": {
        "id": 24651,
        "url": "https://patches.dpdk.org/api/users/24651/?format=api",
        "username": "dmarchand",
        "first_name": "David",
        "last_name": "Marchand",
        "email": "david.marchand@redhat.com"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/20230209102434.2460394-3-amitprakashs@marvell.com/mbox/",
    "series": [
        {
            "id": 26918,
            "url": "https://patches.dpdk.org/api/series/26918/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=26918",
            "date": "2023-02-09T10:24:32",
            "name": "[v7,1/3] pcapng: comment option support for epb",
            "version": 7,
            "mbox": "https://patches.dpdk.org/series/26918/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/123577/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/123577/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 6C52E41C4D;\n\tThu,  9 Feb 2023 11:24:54 +0100 (CET)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id F106942B8C;\n\tThu,  9 Feb 2023 11:24:51 +0100 (CET)",
            "from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com\n [67.231.148.174])\n by mails.dpdk.org (Postfix) with ESMTP id 77C7842B71\n for <dev@dpdk.org>; Thu,  9 Feb 2023 11:24:50 +0100 (CET)",
            "from pps.filterd (m0045849.ppops.net [127.0.0.1])\n by mx0a-0016f401.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id\n 3199fW3x020816; Thu, 9 Feb 2023 02:24:49 -0800",
            "from dc5-exch02.marvell.com ([199.233.59.182])\n by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3nkdys0ved-1\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT);\n Thu, 09 Feb 2023 02:24:49 -0800",
            "from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH02.marvell.com\n (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.42;\n Thu, 9 Feb 2023 02:24:47 -0800",
            "from maili.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com\n (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.42 via Frontend\n Transport; Thu, 9 Feb 2023 02:24:47 -0800",
            "from localhost.localdomain (unknown [10.28.36.157])\n by maili.marvell.com (Postfix) with ESMTP id BA6A75B692A;\n Thu,  9 Feb 2023 02:24:45 -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-transfer-encoding : content-type; s=pfpt0220;\n bh=aRe7LxCFMrYk0Qbd9yrtjLiF6QQQfcDKmpqoo0I2yv4=;\n b=fGz0fWHGXxKqjFxv62vfikQ7l9Culfcct4LfroCN1qvm6Bn8OJhZjNyublvHzR1H0BxN\n lKkpjJdjV5MljTAiuYmrMbrT+rZn6SQmu2SWiNQD7lU+By08HEIaqvJk0nbxq6CDUlFx\n UFO/g8KwalFN1WXWGTtwglaKJsHK5LM7Pp6uCtuhmUfk7YJ4o+cO8zJ/ZnmvvYjQ/57X\n k3z+T2OLazjc/xEBvDTX1p2Hbi4Gr1twjnbVA0EqE6nfSY/WPXGUxOTTBijh9s1O9Q7U\n axZBsWy9uWfIdwDiVLZu2gOXjPWnT+4jjnMjHZ8TeYYaKQU63H4LeOmoqeuE7NoPR3mq ng==",
        "From": "Amit Prakash Shukla <amitprakashs@marvell.com>",
        "To": "Jerin Jacob <jerinj@marvell.com>, Kiran Kumar K <kirankumark@marvell.com>,\n Nithin Dabilpuram <ndabilpuram@marvell.com>",
        "CC": "<dev@dpdk.org>, <david.marchand@redhat.com>, Amit Prakash Shukla\n <amitprakashs@marvell.com>",
        "Subject": "[PATCH v7 3/3] examples/l3fwd-graph: changes to configure pcap\n capture",
        "Date": "Thu, 9 Feb 2023 15:54:34 +0530",
        "Message-ID": "<20230209102434.2460394-3-amitprakashs@marvell.com>",
        "X-Mailer": "git-send-email 2.25.1",
        "In-Reply-To": "<20230209102434.2460394-1-amitprakashs@marvell.com>",
        "References": "<20230209095614.2459659-1-amitprakashs@marvell.com>\n <20230209102434.2460394-1-amitprakashs@marvell.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Content-Type": "text/plain",
        "X-Proofpoint-ORIG-GUID": "xE9n0QoDcmQMi54E8kzIGBwrDRqY2Ie3",
        "X-Proofpoint-GUID": "xE9n0QoDcmQMi54E8kzIGBwrDRqY2Ie3",
        "X-Proofpoint-Virus-Version": "vendor=baseguard\n engine=ICAP:2.0.219,Aquarius:18.0.930,Hydra:6.0.562,FMLib:17.11.122.1\n definitions=2023-02-09_08,2023-02-08_02,2022-06-22_01",
        "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": "Added support to configure pcap capture.\n\nSigned-off-by: Amit Prakash Shukla <amitprakashs@marvell.com>\n---\nv2:\n - Fixed code style issue\n - Fixed CI compilation issue on github-robot\n\nv3:\n - Code review suggestion from Stephen\n - Fixed potential memory leak\n \nv4:\n - Code review suggestion from Jerin\n\nv5:\n - Code review suggestion from Jerin\n\nv6:\n - Squashing test graph param initialize fix\n \nv7:\n - Resending the patch\n\n doc/guides/sample_app_ug/l3_forward_graph.rst | 23 +++++++\n examples/l3fwd-graph/main.c                   | 62 ++++++++++++++++++-\n 2 files changed, 83 insertions(+), 2 deletions(-)",
    "diff": "diff --git a/doc/guides/sample_app_ug/l3_forward_graph.rst b/doc/guides/sample_app_ug/l3_forward_graph.rst\nindex 0a3e0d44ec..585ac8c898 100644\n--- a/doc/guides/sample_app_ug/l3_forward_graph.rst\n+++ b/doc/guides/sample_app_ug/l3_forward_graph.rst\n@@ -51,6 +51,9 @@ The application has a number of command line options similar to l3fwd::\n                                    [--max-pkt-len PKTLEN]\n                                    [--no-numa]\n                                    [--per-port-pool]\n+                                   [--pcap-enable]\n+                                   [--pcap-num-cap]\n+                                   [--pcap-file-name]\n \n Where,\n \n@@ -69,6 +72,12 @@ Where,\n \n * ``--per-port-pool:`` Optional, set to use independent buffer pools per port. Without this option, single buffer pool is used for all ports.\n \n+* ``--pcap-enable:`` Optional, Enables packet capture in pcap format on each node with mbuf and node metadata.\n+\n+* ``--pcap-num-cap:`` Optional, Number of packets to be captured per core.\n+\n+* ``--pcap-file-name:`` Optional, Pcap filename to capture packets in.\n+\n For example, consider a dual processor socket platform with 8 physical cores, where cores 0-7 and 16-23 appear on socket 0,\n while cores 8-15 and 24-31 appear on socket 1.\n \n@@ -99,6 +108,20 @@ In this command:\n |          |           |           |                                     |\n +----------+-----------+-----------+-------------------------------------+\n \n+To enable pcap trace on each graph, use following command:\n+\n+.. code-block:: console\n+\n+    ./<build_dir>/examples/dpdk-l3fwd-graph -l 1,2 -n 4 -- -p 0x3 --config=\"(0,0,1),(1,0,2)\" --pcap-enable --pcap-num-cap=<number of packets> --pcap-file-name \"</path/to/file>\"\n+\n+In this command:\n+\n+*   The --pcap-enable option enables pcap trace on graph nodes.\n+\n+*   The --pcap-num-cap option enables user to configure number packets to be captured per graph. Default 1024 packets per graph are captured.\n+\n+*   The --pcap-file-name option enables user to give filename in which packets are to be captured.\n+\n Refer to the *DPDK Getting Started Guide* for general information on running applications and\n the Environment Abstraction Layer (EAL) options.\n \ndiff --git a/examples/l3fwd-graph/main.c b/examples/l3fwd-graph/main.c\nindex 6dcb6ee92b..5feeab4f0f 100644\n--- a/examples/l3fwd-graph/main.c\n+++ b/examples/l3fwd-graph/main.c\n@@ -76,6 +76,12 @@ xmm_t val_eth[RTE_MAX_ETHPORTS];\n /* Mask of enabled ports */\n static uint32_t enabled_port_mask;\n \n+/* Pcap trace */\n+static char pcap_filename[RTE_GRAPH_PCAP_FILE_SZ];\n+static uint64_t packet_to_capture;\n+static int pcap_trace_enable;\n+\n+\n struct lcore_rx_queue {\n \tuint16_t port_id;\n \tuint8_t queue_id;\n@@ -261,7 +267,8 @@ print_usage(const char *prgname)\n \t\t\" [--eth-dest=X,MM:MM:MM:MM:MM:MM]\"\n \t\t\" [--max-pkt-len PKTLEN]\"\n \t\t\" [--no-numa]\"\n-\t\t\" [--per-port-pool]\\n\\n\"\n+\t\t\" [--per-port-pool]\"\n+\t\t\" [--num-pkt-cap]\\n\\n\"\n \n \t\t\"  -p PORTMASK: Hexadecimal bitmask of ports to configure\\n\"\n \t\t\"  -P : Enable promiscuous mode\\n\"\n@@ -270,10 +277,30 @@ print_usage(const char *prgname)\n \t\t\"port X\\n\"\n \t\t\"  --max-pkt-len PKTLEN: maximum packet length in decimal (64-9600)\\n\"\n \t\t\"  --no-numa: Disable numa awareness\\n\"\n-\t\t\"  --per-port-pool: Use separate buffer pool per port\\n\\n\",\n+\t\t\"  --per-port-pool: Use separate buffer pool per port\\n\"\n+\t\t\"  --pcap-enable: Enables pcap capture\\n\"\n+\t\t\"  --pcap-num-cap NUMPKT: Number of packets to capture\\n\"\n+\t\t\"  --pcap-file-name NAME: Pcap file name\\n\\n\",\n \t\tprgname);\n }\n \n+static uint64_t\n+parse_num_pkt_cap(const char *num_pkt_cap)\n+{\n+\tuint64_t num_pkt;\n+\tchar *end = NULL;\n+\n+\t/* Parse decimal string */\n+\tnum_pkt = strtoull(num_pkt_cap, &end, 10);\n+\tif ((num_pkt_cap[0] == '\\0') || (end == NULL) || (*end != '\\0'))\n+\t\treturn 0;\n+\n+\tif (num_pkt == 0)\n+\t\treturn 0;\n+\n+\treturn num_pkt;\n+}\n+\n static int\n parse_max_pkt_len(const char *pktlen)\n {\n@@ -404,6 +431,9 @@ static const char short_options[] = \"p:\" /* portmask */\n #define CMD_LINE_OPT_NO_NUMA\t   \"no-numa\"\n #define CMD_LINE_OPT_MAX_PKT_LEN   \"max-pkt-len\"\n #define CMD_LINE_OPT_PER_PORT_POOL \"per-port-pool\"\n+#define CMD_LINE_OPT_PCAP_ENABLE   \"pcap-enable\"\n+#define CMD_LINE_OPT_NUM_PKT_CAP   \"pcap-num-cap\"\n+#define CMD_LINE_OPT_PCAP_FILENAME \"pcap-file-name\"\n enum {\n \t/* Long options mapped to a short option */\n \n@@ -416,6 +446,9 @@ enum {\n \tCMD_LINE_OPT_NO_NUMA_NUM,\n \tCMD_LINE_OPT_MAX_PKT_LEN_NUM,\n \tCMD_LINE_OPT_PARSE_PER_PORT_POOL,\n+\tCMD_LINE_OPT_PARSE_PCAP_ENABLE,\n+\tCMD_LINE_OPT_PARSE_NUM_PKT_CAP,\n+\tCMD_LINE_OPT_PCAP_FILENAME_CAP,\n };\n \n static const struct option lgopts[] = {\n@@ -424,6 +457,9 @@ static const struct option lgopts[] = {\n \t{CMD_LINE_OPT_NO_NUMA, 0, 0, CMD_LINE_OPT_NO_NUMA_NUM},\n \t{CMD_LINE_OPT_MAX_PKT_LEN, 1, 0, CMD_LINE_OPT_MAX_PKT_LEN_NUM},\n \t{CMD_LINE_OPT_PER_PORT_POOL, 0, 0, CMD_LINE_OPT_PARSE_PER_PORT_POOL},\n+\t{CMD_LINE_OPT_PCAP_ENABLE, 0, 0, CMD_LINE_OPT_PARSE_PCAP_ENABLE},\n+\t{CMD_LINE_OPT_NUM_PKT_CAP, 1, 0, CMD_LINE_OPT_PARSE_NUM_PKT_CAP},\n+\t{CMD_LINE_OPT_PCAP_FILENAME, 1, 0, CMD_LINE_OPT_PCAP_FILENAME_CAP},\n \t{NULL, 0, 0, 0},\n };\n \n@@ -498,6 +534,23 @@ parse_args(int argc, char **argv)\n \t\t\tper_port_pool = 1;\n \t\t\tbreak;\n \n+\t\tcase CMD_LINE_OPT_PARSE_PCAP_ENABLE:\n+\t\t\tprintf(\"Packet capture enabled\\n\");\n+\t\t\tpcap_trace_enable = 1;\n+\t\t\tbreak;\n+\n+\t\tcase CMD_LINE_OPT_PARSE_NUM_PKT_CAP:\n+\t\t\tpacket_to_capture = parse_num_pkt_cap(optarg);\n+\t\t\tprintf(\"Number of packets to capture: %\"PRIu64\"\\n\",\n+\t\t\t       packet_to_capture);\n+\t\t\tbreak;\n+\n+\t\tcase CMD_LINE_OPT_PCAP_FILENAME_CAP:\n+\t\t\trte_strlcpy(pcap_filename, optarg,\n+\t\t\t\t    sizeof(pcap_filename));\n+\t\t\tprintf(\"Pcap file name: %s\\n\", pcap_filename);\n+\t\t\tbreak;\n+\n \t\tdefault:\n \t\t\tprint_usage(prgname);\n \t\t\treturn -1;\n@@ -1027,6 +1080,11 @@ main(int argc, char **argv)\n \tmemset(&graph_conf, 0, sizeof(graph_conf));\n \tgraph_conf.node_patterns = node_patterns;\n \n+\t/* Pcap config */\n+\tgraph_conf.pcap_enable = pcap_trace_enable;\n+\tgraph_conf.num_pkt_to_capture = packet_to_capture;\n+\tgraph_conf.pcap_filename = pcap_filename;\n+\n \tfor (lcore_id = 0; lcore_id < RTE_MAX_LCORE; lcore_id++) {\n \t\trte_graph_t graph_id;\n \t\trte_edge_t i;\n",
    "prefixes": [
        "v7",
        "3/3"
    ]
}