Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/123575/?format=api
https://patches.dpdk.org/api/patches/123575/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/20230209102434.2460394-1-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-1-amitprakashs@marvell.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20230209102434.2460394-1-amitprakashs@marvell.com", "date": "2023-02-09T10:24:32", "name": "[v7,1/3] pcapng: comment option support for epb", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "cbc010d646e5c8c1032ee6a2b05c59f756c76777", "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-1-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/123575/comments/", "check": "success", "checks": "https://patches.dpdk.org/api/patches/123575/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 3EBB841C4D;\n\tThu, 9 Feb 2023 11:24:44 +0100 (CET)", "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 259474067B;\n\tThu, 9 Feb 2023 11:24:44 +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 ACFBB400D5\n for <dev@dpdk.org>; Thu, 9 Feb 2023 11:24:42 +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 3199IWh8000545; Thu, 9 Feb 2023 02:24:41 -0800", "from dc5-exch02.marvell.com ([199.233.59.182])\n by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3nkdys0veb-1\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT);\n Thu, 09 Feb 2023 02:24:41 -0800", "from DC5-EXCH02.marvell.com (10.69.176.39) 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:40 -0800", "from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com\n (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.42 via Frontend\n Transport; Thu, 9 Feb 2023 02:24:39 -0800", "from localhost.localdomain (unknown [10.28.36.157])\n by maili.marvell.com (Postfix) with ESMTP id 015205B692A;\n Thu, 9 Feb 2023 02:24:37 -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=gEnic19oUohU93hgGoc1T9fLHnhNiV9Qi7uQhgQjmok=;\n b=edYoATXg9XkO+qyHe3+UUCDgFOFmVplYJ9AY8fxzi4ti4q9fNUDDdG0LaDk7KpL8HqzV\n zpJCbNaTG7OER1c21PA6P3TttE0zdLmZ1ngYXkN66fkr2q7fXt2TbNYRBlkSknixDda0\n X81OgNwwXlb1+DRMcKYdHyz/lXVjBvQz/F7T3bSFVw1U3bPGQH72kLymujLqtIKINN5n\n BxKYRjb4en9BY5SL61oM1I7+gfc77aUU5XPogYWvUKXoSO2TV2byo48Ld9WkZUQQ0TjI\n QAjLkpr5efRgjR2Wv29Xt5EyPRtVNhofJ+KW/8657hCYydgI08oaI6n4tkPmc8mogSal rg==", "From": "Amit Prakash Shukla <amitprakashs@marvell.com>", "To": "Reshma Pattan <reshma.pattan@intel.com>, Stephen Hemminger\n <stephen@networkplumber.org>", "CC": "<dev@dpdk.org>, <jerinj@marvell.com>, <david.marchand@redhat.com>, \"Amit\n Prakash Shukla\" <amitprakashs@marvell.com>", "Subject": "[PATCH v7 1/3] pcapng: comment option support for epb", "Date": "Thu, 9 Feb 2023 15:54:32 +0530", "Message-ID": "<20230209102434.2460394-1-amitprakashs@marvell.com>", "X-Mailer": "git-send-email 2.25.1", "In-Reply-To": "<20230209095614.2459659-1-amitprakashs@marvell.com>", "References": "<20230209095614.2459659-1-amitprakashs@marvell.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Content-Type": "text/plain", "X-Proofpoint-ORIG-GUID": "3xmm9vWWvADTNjX2mp95Rrhr0oCLxgkJ", "X-Proofpoint-GUID": "3xmm9vWWvADTNjX2mp95Rrhr0oCLxgkJ", "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": "This change enhances rte_pcapng_copy to have comment in enhanced\npacket block.\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 app/test/test_pcapng.c | 4 ++--\n doc/guides/rel_notes/release_23_03.rst | 2 ++\n lib/pcapng/rte_pcapng.c | 10 +++++++++-\n lib/pcapng/rte_pcapng.h | 4 +++-\n lib/pdump/rte_pdump.c | 2 +-\n 5 files changed, 17 insertions(+), 5 deletions(-)", "diff": "diff --git a/app/test/test_pcapng.c b/app/test/test_pcapng.c\nindex edba46d1fe..b8429a02f1 100644\n--- a/app/test/test_pcapng.c\n+++ b/app/test/test_pcapng.c\n@@ -146,7 +146,7 @@ test_write_packets(void)\n \t\tstruct rte_mbuf *mc;\n \n \t\tmc = rte_pcapng_copy(port_id, 0, orig, mp, pkt_len,\n-\t\t\t\trte_get_tsc_cycles(), 0);\n+\t\t\t\trte_get_tsc_cycles(), 0, NULL);\n \t\tif (mc == NULL) {\n \t\t\tfprintf(stderr, \"Cannot copy packet\\n\");\n \t\t\treturn -1;\n@@ -262,7 +262,7 @@ test_write_over_limit_iov_max(void)\n \t\tstruct rte_mbuf *mc;\n \n \t\tmc = rte_pcapng_copy(port_id, 0, orig, mp, pkt_len,\n-\t\t\t\trte_get_tsc_cycles(), 0);\n+\t\t\t\trte_get_tsc_cycles(), 0, NULL);\n \t\tif (mc == NULL) {\n \t\t\tfprintf(stderr, \"Cannot copy packet\\n\");\n \t\t\treturn -1;\ndiff --git a/doc/guides/rel_notes/release_23_03.rst b/doc/guides/rel_notes/release_23_03.rst\nindex 1fa101c420..bb435dde32 100644\n--- a/doc/guides/rel_notes/release_23_03.rst\n+++ b/doc/guides/rel_notes/release_23_03.rst\n@@ -116,6 +116,8 @@ API Changes\n Also, make sure to start the actual text at the margin.\n =======================================================\n \n+* Experimental function ``rte_pcapng_copy`` was updated to support comment\n+ section in enhanced packet block in pcapng library.\n \n ABI Changes\n -----------\ndiff --git a/lib/pcapng/rte_pcapng.c b/lib/pcapng/rte_pcapng.c\nindex ea004939e6..65c8c77fa4 100644\n--- a/lib/pcapng/rte_pcapng.c\n+++ b/lib/pcapng/rte_pcapng.c\n@@ -466,7 +466,8 @@ rte_pcapng_copy(uint16_t port_id, uint32_t queue,\n \t\tconst struct rte_mbuf *md,\n \t\tstruct rte_mempool *mp,\n \t\tuint32_t length, uint64_t cycles,\n-\t\tenum rte_pcapng_direction direction)\n+\t\tenum rte_pcapng_direction direction,\n+\t\tconst char *comment)\n {\n \tstruct pcapng_enhance_packet_block *epb;\n \tuint32_t orig_len, data_len, padding, flags;\n@@ -527,6 +528,9 @@ rte_pcapng_copy(uint16_t port_id, uint32_t queue,\n \tif (rss_hash)\n \t\toptlen += pcapng_optlen(sizeof(uint8_t) + sizeof(uint32_t));\n \n+\tif (comment)\n+\t\toptlen += pcapng_optlen(strlen(comment));\n+\n \t/* reserve trailing options and block length */\n \topt = (struct pcapng_option *)\n \t\trte_pktmbuf_append(mc, optlen + sizeof(uint32_t));\n@@ -564,6 +568,10 @@ rte_pcapng_copy(uint16_t port_id, uint32_t queue,\n \t\t\t\t\t&hash_opt, sizeof(hash_opt));\n \t}\n \n+\tif (comment)\n+\t\topt = pcapng_add_option(opt, PCAPNG_OPT_COMMENT, comment,\n+\t\t\t\t\tstrlen(comment));\n+\n \t/* Note: END_OPT necessary here. Wireshark doesn't do it. */\n \n \t/* Add PCAPNG packet header */\ndiff --git a/lib/pcapng/rte_pcapng.h b/lib/pcapng/rte_pcapng.h\nindex 86b7996e29..4afdec22ef 100644\n--- a/lib/pcapng/rte_pcapng.h\n+++ b/lib/pcapng/rte_pcapng.h\n@@ -125,6 +125,8 @@ enum rte_pcapng_direction {\n * The timestamp in TSC cycles.\n * @param direction\n * The direction of the packer: receive, transmit or unknown.\n+ * @param comment\n+ * Packet comment.\n *\n * @return\n * - The pointer to the new mbuf formatted for pcapng_write\n@@ -136,7 +138,7 @@ struct rte_mbuf *\n rte_pcapng_copy(uint16_t port_id, uint32_t queue,\n \t\tconst struct rte_mbuf *m, struct rte_mempool *mp,\n \t\tuint32_t length, uint64_t timestamp,\n-\t\tenum rte_pcapng_direction direction);\n+\t\tenum rte_pcapng_direction direction, const char *comment);\n \n \n /**\ndiff --git a/lib/pdump/rte_pdump.c b/lib/pdump/rte_pdump.c\nindex a81544cb57..9bc4bab4f2 100644\n--- a/lib/pdump/rte_pdump.c\n+++ b/lib/pdump/rte_pdump.c\n@@ -122,7 +122,7 @@ pdump_copy(uint16_t port_id, uint16_t queue,\n \t\tif (cbs->ver == V2)\n \t\t\tp = rte_pcapng_copy(port_id, queue,\n \t\t\t\t\t pkts[i], mp, cbs->snaplen,\n-\t\t\t\t\t ts, direction);\n+\t\t\t\t\t ts, direction, NULL);\n \t\telse\n \t\t\tp = rte_pktmbuf_copy(pkts[i], mp, 0, cbs->snaplen);\n \n", "prefixes": [ "v7", "1/3" ] }{ "id": 123575, "url": "