get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 135701,
    "url": "http://patches.dpdk.org/api/patches/135701/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20240103074721.832061-4-zhichaox.zeng@intel.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": "<20240103074721.832061-4-zhichaox.zeng@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20240103074721.832061-4-zhichaox.zeng@intel.com",
    "date": "2024-01-03T07:47:21",
    "name": "[v6,3/3] net/iavf: add Tx LLDP command",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "7a32f8aba7aea76626c25fe1675cf299a032579f",
    "submitter": {
        "id": 2644,
        "url": "http://patches.dpdk.org/api/people/2644/?format=api",
        "name": "Zhichao Zeng",
        "email": "zhichaox.zeng@intel.com"
    },
    "delegate": {
        "id": 1540,
        "url": "http://patches.dpdk.org/api/users/1540/?format=api",
        "username": "qzhan15",
        "first_name": "Qi",
        "last_name": "Zhang",
        "email": "qi.z.zhang@intel.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20240103074721.832061-4-zhichaox.zeng@intel.com/mbox/",
    "series": [
        {
            "id": 30708,
            "url": "http://patches.dpdk.org/api/series/30708/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=30708",
            "date": "2024-01-03T07:47:18",
            "name": "net/iavf: support Tx LLDP on scalar and AVX512",
            "version": 6,
            "mbox": "http://patches.dpdk.org/series/30708/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/135701/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/135701/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 8F8FC43807;\n\tWed,  3 Jan 2024 08:37:43 +0100 (CET)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 8784240685;\n\tWed,  3 Jan 2024 08:37:37 +0100 (CET)",
            "from mgamail.intel.com (mgamail.intel.com [134.134.136.20])\n by mails.dpdk.org (Postfix) with ESMTP id 833B140689\n for <dev@dpdk.org>; Wed,  3 Jan 2024 08:37:35 +0100 (CET)",
            "from orsmga002.jf.intel.com ([10.7.209.21])\n by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 02 Jan 2024 23:37:35 -0800",
            "from unknown (HELO zhichao-dpdk..) ([10.239.252.103])\n by orsmga002-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 02 Jan 2024 23:37:31 -0800"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple;\n d=intel.com; i=@intel.com; q=dns/txt; s=Intel;\n t=1704267455; x=1735803455;\n h=from:to:cc:subject:date:message-id:in-reply-to:\n references:mime-version:content-transfer-encoding;\n bh=VTui1t5brGXeeuunmjmEpmKHoGrMplQ8wSzJUy++324=;\n b=RR602aafNfxOLNQ6twCRXUWLHFNTnpf3OCneRVWM0llofzeCPQ1Vc6S4\n +/JZAf8thoiV7lL2TEY9bfJdbz4EN9ba0jG/SGgVPmdIUgmMwWBPJH9WA\n PAipBRx6kx+ircs2ZOsVwc/kJ+gMJTEJuGrNw+YxnWIekU6mMHcbHxXv0\n nKpFkXIv8sLSNcD4Rqzv/tcNjYN3h0MgQRIU9kO3U9d9Zgs8I8oo6bbGG\n 8eGEZ/6SBYJzWptwNdPuK00yTvwLSZqAzQwm8cRzxCxBSsVpJ0TZ/9zXK\n xInyo6iP03yPUSZM0TiLKfudxUbtlK0CTfpaO98YqxiKWb64/Ady9d+VV w==;",
        "X-IronPort-AV": [
            "E=McAfee;i=\"6600,9927,10941\"; a=\"387428608\"",
            "E=Sophos;i=\"6.04,327,1695711600\"; d=\"scan'208\";a=\"387428608\"",
            "E=McAfee;i=\"6600,9927,10941\"; a=\"779913082\"",
            "E=Sophos;i=\"6.04,327,1695711600\"; d=\"scan'208\";a=\"779913082\""
        ],
        "X-ExtLoop1": "1",
        "From": "Zhichao Zeng <zhichaox.zeng@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "qi.z.zhang@intel.com, Zhichao Zeng <zhichaox.zeng@intel.com>,\n Simei Su <simei.su@intel.com>, Wenjun Wu <wenjun1.wu@intel.com>,\n Qiming Yang <qiming.yang@intel.com>, Yuying Zhang <Yuying.Zhang@intel.com>,\n Beilei Xing <beilei.xing@intel.com>, Jingjing Wu <jingjing.wu@intel.com>",
        "Subject": "[PATCH v6 3/3] net/iavf: add Tx LLDP command",
        "Date": "Wed,  3 Jan 2024 15:47:21 +0800",
        "Message-Id": "<20240103074721.832061-4-zhichaox.zeng@intel.com>",
        "X-Mailer": "git-send-email 2.34.1",
        "In-Reply-To": "<20240103074721.832061-1-zhichaox.zeng@intel.com>",
        "References": "<20231228032211.1127554-1-zhichaox.zeng@intel.com>\n <20240103074721.832061-1-zhichaox.zeng@intel.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "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 patch adds an IAVF testpmd command \"set tx lldp on\" which\nwill register an mbuf dynfield IAVF_TX_LLDP_DYNFIELD to indicate\nthe need to test transmit LLDP packet.\n\nIt needs to stop and restart Tx port to select correct Tx path.\n\nSigned-off-by: Zhichao Zeng <zhichaox.zeng@intel.com>\n---\n doc/guides/nics/intel_vf.rst    | 17 +++++++\n drivers/net/iavf/iavf_testpmd.c | 81 +++++++++++++++++++++++++++++++++\n drivers/net/iavf/meson.build    |  3 ++\n 3 files changed, 101 insertions(+)\n create mode 100644 drivers/net/iavf/iavf_testpmd.c",
    "diff": "diff --git a/doc/guides/nics/intel_vf.rst b/doc/guides/nics/intel_vf.rst\nindex ad08198f0f..ce96c2e1f8 100644\n--- a/doc/guides/nics/intel_vf.rst\n+++ b/doc/guides/nics/intel_vf.rst\n@@ -627,6 +627,23 @@ Inline IPsec Support\n     documentation.\n \n \n+Diagnostic Utilities\n+--------------------\n+\n+Register mbuf dynfield to test Tx LLDP\n+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n+\n+Register an mbuf dynfield IAVF_TX_LLDP_DYNFIELD on dev_start to indicate\n+the need to send LLDP packet, this dynfield needs to be set to 1 when\n+preparing packet.\n+\n+For dpdk-testpmd application, it needs to stop and restart Tx port\n+to take effect.\n+\n+Usage::\n+\n+    testpmd>set tx lldp on\n+\n Limitations or Knowing issues\n -----------------------------\n \ndiff --git a/drivers/net/iavf/iavf_testpmd.c b/drivers/net/iavf/iavf_testpmd.c\nnew file mode 100644\nindex 0000000000..07aac07fc3\n--- /dev/null\n+++ b/drivers/net/iavf/iavf_testpmd.c\n@@ -0,0 +1,81 @@\n+/* SPDX-License-Identifier: BSD-3-Clause\n+ * Copyright(c) 2010-2016 Intel Corporation.\n+ */\n+\n+#include <stdlib.h>\n+\n+#include <rte_pmd_iavf.h>\n+\n+#include <cmdline_parse_num.h>\n+#include <cmdline_parse_string.h>\n+\n+#include \"iavf.h\"\n+#include \"testpmd.h\"\n+#include \"iavf_rxtx.h\"\n+\n+struct cmd_enable_tx_lldp_result {\n+\tcmdline_fixed_string_t set;\n+\tcmdline_fixed_string_t tx;\n+\tcmdline_fixed_string_t lldp;\n+\tcmdline_fixed_string_t what;\n+};\n+\n+static cmdline_parse_token_string_t cmd_enable_tx_lldp_set =\n+\tTOKEN_STRING_INITIALIZER(struct cmd_enable_tx_lldp_result,\n+\t\tset, \"set\");\n+static cmdline_parse_token_string_t cmd_enable_tx_lldp_tx =\n+\tTOKEN_STRING_INITIALIZER(struct cmd_enable_tx_lldp_result,\n+\t\ttx, \"tx\");\n+static cmdline_parse_token_string_t cmd_enable_tx_lldp_lldp =\n+\tTOKEN_STRING_INITIALIZER(struct cmd_enable_tx_lldp_result,\n+\t\tlldp, \"lldp\");\n+static cmdline_parse_token_string_t cmd_enable_tx_lldp_what =\n+\tTOKEN_STRING_INITIALIZER(struct cmd_enable_tx_lldp_result,\n+\t\twhat, \"on#off\");\n+\n+static void\n+cmd_enable_tx_lldp_parsed(void *parsed_result,\n+\t__rte_unused struct cmdline *cl, __rte_unused void *data)\n+{\n+\tstruct cmd_enable_tx_lldp_result *res = parsed_result;\n+\tconst struct rte_mbuf_dynfield iavf_tx_lldp_dynfield = {\n+\t\t.name = IAVF_TX_LLDP_DYNFIELD,\n+\t\t.size = sizeof(uint8_t),\n+\t\t.align = __alignof__(uint8_t),\n+\t\t.flags = 0\n+\t};\n+\tint offset;\n+\n+\tif (strncmp(res->what, \"on\", 2) == 0) {\n+\t\toffset = rte_mbuf_dynfield_register(&iavf_tx_lldp_dynfield);\n+\t\tprintf(\"rte_pmd_iavf_tx_lldp_dynfield_offset: %d\", offset);\n+\t\tif (offset < 0)\n+\t\t\tfprintf(stderr,\n+\t\t\t\t\"rte mbuf dynfield register failed, offset: %d\", offset);\n+\t}\n+}\n+\n+static cmdline_parse_inst_t cmd_enable_tx_lldp = {\n+\t.f = cmd_enable_tx_lldp_parsed,\n+\t.data = NULL,\n+\t.help_str = \"set iavf tx lldp on|off\",\n+\t.tokens = {\n+\t\t(void *)&cmd_enable_tx_lldp_set,\n+\t\t(void *)&cmd_enable_tx_lldp_tx,\n+\t\t(void *)&cmd_enable_tx_lldp_lldp,\n+\t\t(void *)&cmd_enable_tx_lldp_what,\n+\t\tNULL,\n+\t},\n+};\n+\n+static struct testpmd_driver_commands iavf_cmds = {\n+\t.commands = {\n+\t{\n+\t\t&cmd_enable_tx_lldp,\n+\t\t\"set tx lldp (on|off)\\n\"\n+\t\t\"    Set iavf Tx lldp packet(currently only supported on)\\n\\n\",\n+\t},\n+\t{ NULL, NULL },\n+\t},\n+};\n+TESTPMD_ADD_DRIVER_COMMANDS(iavf_cmds)\ndiff --git a/drivers/net/iavf/meson.build b/drivers/net/iavf/meson.build\nindex a6ce2725c3..83aebd5596 100644\n--- a/drivers/net/iavf/meson.build\n+++ b/drivers/net/iavf/meson.build\n@@ -8,6 +8,9 @@ endif\n cflags += ['-Wno-strict-aliasing']\n \n includes += include_directories('../../common/iavf')\n+\n+testpmd_sources = files('iavf_testpmd.c')\n+\n deps += ['common_iavf', 'security', 'cryptodev']\n \n sources = files(\n",
    "prefixes": [
        "v6",
        "3/3"
    ]
}