get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 129763,
    "url": "http://patches.dpdk.org/api/patches/129763/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20230801024304.2187484-1-huangdengdui@huawei.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": "<20230801024304.2187484-1-huangdengdui@huawei.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20230801024304.2187484-1-huangdengdui@huawei.com",
    "date": "2023-08-01T02:43:04",
    "name": "app/testpmd: add flush multicast MAC address command",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "d31bb06cc934b83ecba617b06c19fa4a89978b9f",
    "submitter": {
        "id": 3066,
        "url": "http://patches.dpdk.org/api/people/3066/?format=api",
        "name": "huangdengdui",
        "email": "huangdengdui@huawei.com"
    },
    "delegate": {
        "id": 319,
        "url": "http://patches.dpdk.org/api/users/319/?format=api",
        "username": "fyigit",
        "first_name": "Ferruh",
        "last_name": "Yigit",
        "email": "ferruh.yigit@amd.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20230801024304.2187484-1-huangdengdui@huawei.com/mbox/",
    "series": [
        {
            "id": 29052,
            "url": "http://patches.dpdk.org/api/series/29052/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=29052",
            "date": "2023-08-01T02:43:04",
            "name": "app/testpmd: add flush multicast MAC address command",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/29052/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/129763/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/129763/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 1FDD142FAD;\n\tTue,  1 Aug 2023 04:43:11 +0200 (CEST)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id AC2FD40A7D;\n\tTue,  1 Aug 2023 04:43:10 +0200 (CEST)",
            "from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188])\n by mails.dpdk.org (Postfix) with ESMTP id A47D7400D5\n for <dev@dpdk.org>; Tue,  1 Aug 2023 04:43:08 +0200 (CEST)",
            "from dggpeml500011.china.huawei.com (unknown [172.30.72.57])\n by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4RFK9t5NLmzVjxT;\n Tue,  1 Aug 2023 10:41:22 +0800 (CST)",
            "from localhost.huawei.com (10.50.163.32) by\n dggpeml500011.china.huawei.com (7.185.36.84) with Microsoft SMTP Server\n (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id\n 15.1.2507.27; Tue, 1 Aug 2023 10:43:05 +0800"
        ],
        "From": "Dengdui Huang <huangdengdui@huawei.com>",
        "To": "<dev@dpdk.org>",
        "CC": "<ferruh.yigit@amd.com>, <aman.deep.singh@intel.com>,\n <yuying.zhang@intel.com>, <anatoly.burakov@intel.com>,\n <liuyonglong@huawei.com>",
        "Subject": "[PATCH] app/testpmd: add flush multicast MAC address command",
        "Date": "Tue, 1 Aug 2023 10:43:04 +0800",
        "Message-ID": "<20230801024304.2187484-1-huangdengdui@huawei.com>",
        "X-Mailer": "git-send-email 2.33.0",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Content-Type": "text/plain",
        "X-Originating-IP": "[10.50.163.32]",
        "X-ClientProxiedBy": "dggems703-chm.china.huawei.com (10.3.19.180) To\n dggpeml500011.china.huawei.com (7.185.36.84)",
        "X-CFilter-Loop": "Reflected",
        "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": "Add command to flush multicast MAC address\nUsage:\n    mcast_addr flush <port_id> :\n    flush multicast MAC address on port_id\n\nSigned-off-by: Dengdui Huang <huangdengdui@huawei.com>\n---\n app/test-pmd/cmdline.c                      | 43 +++++++++++++++++++++\n app/test-pmd/config.c                       | 18 +++++++++\n app/test-pmd/testpmd.h                      |  1 +\n doc/guides/testpmd_app_ug/testpmd_funcs.rst |  8 ++++\n 4 files changed, 70 insertions(+)",
    "diff": "diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c\nindex 0d0723f659..2d9d925776 100644\n--- a/app/test-pmd/cmdline.c\n+++ b/app/test-pmd/cmdline.c\n@@ -494,6 +494,9 @@ static void cmd_help_long_parsed(void *parsed_result,\n \t\t\t\"mac_addr remove (port_id) (XX:XX:XX:XX:XX:XX)\\n\"\n \t\t\t\"    Remove a MAC address from port_id.\\n\\n\"\n \n+\t\t\t\"mcast_addr flush (port_id)\\n\"\n+\t\t\t\"    To flush the set of multicast addresses.\\n\\n\"\n+\n \t\t\t\"mac_addr set (port_id) (XX:XX:XX:XX:XX:XX)\\n\"\n \t\t\t\"    Set the default MAC address for port_id.\\n\\n\"\n \n@@ -8561,6 +8564,45 @@ static cmdline_parse_inst_t cmd_mcast_addr = {\n \t},\n };\n \n+/* *** FLUSH MULTICAST MAC ADDRESS ON PORT *** */\n+struct cmd_mcast_addr_flush_result {\n+\tcmdline_fixed_string_t mcast_addr_cmd;\n+\tcmdline_fixed_string_t what;\n+\tuint16_t port_num;\n+};\n+\n+static void cmd_mcast_addr_flush_parsed(void *parsed_result,\n+\t\t__rte_unused struct cmdline *cl,\n+\t\t__rte_unused void *data)\n+{\n+\tstruct cmd_mcast_addr_flush_result *res = parsed_result;\n+\n+\tmcast_addr_flush(res->port_num);\n+}\n+\n+static cmdline_parse_token_string_t cmd_mcast_addr_flush_cmd =\n+\tTOKEN_STRING_INITIALIZER(struct cmd_mcast_addr_result,\n+\t\t\t\t mcast_addr_cmd, \"mcast_addr\");\n+static cmdline_parse_token_string_t cmd_mcast_addr_flush_what =\n+\tTOKEN_STRING_INITIALIZER(struct cmd_mcast_addr_result, what,\n+\t\t\t\t \"flush\");\n+static cmdline_parse_token_num_t cmd_mcast_addr_flush_portnum =\n+\tTOKEN_NUM_INITIALIZER(struct cmd_mcast_addr_result, port_num,\n+\t\t\t\t RTE_UINT16);\n+\n+static cmdline_parse_inst_t cmd_mcast_addr_flush = {\n+\t.f = cmd_mcast_addr_flush_parsed,\n+\t.data = (void *)0,\n+\t.help_str = \"mcast_addr flush <port_id> : \"\n+\t\t\"flush multicast MAC address on port_id\",\n+\t.tokens = {\n+\t\t(void *)&cmd_mcast_addr_flush_cmd,\n+\t\t(void *)&cmd_mcast_addr_flush_what,\n+\t\t(void *)&cmd_mcast_addr_flush_portnum,\n+\t\tNULL,\n+\t},\n+};\n+\n /* vf vlan anti spoof configuration */\n \n /* Common result structure for vf vlan anti spoof */\n@@ -12929,6 +12971,7 @@ static cmdline_parse_ctx_t builtin_ctx[] = {\n \t(cmdline_parse_inst_t *)&cmd_set_port_meter_stats_mask,\n \t(cmdline_parse_inst_t *)&cmd_show_port_meter_stats,\n \t(cmdline_parse_inst_t *)&cmd_mcast_addr,\n+\t(cmdline_parse_inst_t *)&cmd_mcast_addr_flush,\n \t(cmdline_parse_inst_t *)&cmd_set_vf_vlan_anti_spoof,\n \t(cmdline_parse_inst_t *)&cmd_set_vf_mac_anti_spoof,\n \t(cmdline_parse_inst_t *)&cmd_set_vf_vlan_stripq,\ndiff --git a/app/test-pmd/config.c b/app/test-pmd/config.c\nindex 11f3a22048..d66d1db37c 100644\n--- a/app/test-pmd/config.c\n+++ b/app/test-pmd/config.c\n@@ -6802,6 +6802,24 @@ mcast_addr_remove(portid_t port_id, struct rte_ether_addr *mc_addr)\n \t\tmcast_addr_pool_append(port, mc_addr);\n }\n \n+void\n+mcast_addr_flush(portid_t port_id)\n+{\n+\tint ret;\n+\n+\tif (port_id_is_invalid(port_id, ENABLED_WARN))\n+\t\treturn;\n+\n+\tret = rte_eth_dev_set_mc_addr_list(port_id, NULL, 0);\n+\tif (ret != 0) {\n+\t\tfprintf(stderr,\n+\t\t\t\"Failed to flush the set of filtered addresses on port %u\\n\",\n+\t\t\tport_id);\n+\t\treturn;\n+\t}\n+\tmcast_addr_pool_destroy(port_id);\n+}\n+\n void\n port_dcb_info_display(portid_t port_id)\n {\ndiff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h\nindex f1df6a8faf..65d3634f6a 100644\n--- a/app/test-pmd/testpmd.h\n+++ b/app/test-pmd/testpmd.h\n@@ -1176,6 +1176,7 @@ void show_mcast_macs(portid_t port_id);\n /* Functions to manage the set of filtered Multicast MAC addresses */\n void mcast_addr_add(portid_t port_id, struct rte_ether_addr *mc_addr);\n void mcast_addr_remove(portid_t port_id, struct rte_ether_addr *mc_addr);\n+void mcast_addr_flush(portid_t port_id);\n void port_dcb_info_display(portid_t port_id);\n \n uint8_t *open_file(const char *file_path, uint32_t *size);\ndiff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst b/doc/guides/testpmd_app_ug/testpmd_funcs.rst\nindex a182479ab2..c3ab1507c4 100644\n--- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst\n+++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst\n@@ -1320,6 +1320,14 @@ filtered by port::\n \n    testpmd> mcast_addr remove (port_id) (mcast_addr)\n \n+mcast_addr flush\n+~~~~~~~~~~~~~~~~\n+\n+To flush the set of multicast addresses\n+filtered by port::\n+\n+   testpmd> mcast_addr flush (port_id)\n+\n mac_addr add (for VF)\n ~~~~~~~~~~~~~~~~~~~~~\n \n",
    "prefixes": []
}