Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/19299/?format=api
http://patches.dpdk.org/api/patches/19299/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/1484290401-1404-21-git-send-email-wenzhuo.lu@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": "<1484290401-1404-21-git-send-email-wenzhuo.lu@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/1484290401-1404-21-git-send-email-wenzhuo.lu@intel.com", "date": "2017-01-13T06:53:15", "name": "[dpdk-dev,v9,20/26] app/testpmd: use multicast promiscuous mode on i40e", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "41d21f9eb106e21be6bf02c0f1bbeb328fdd1755", "submitter": { "id": 258, "url": "http://patches.dpdk.org/api/people/258/?format=api", "name": "Wenzhuo Lu", "email": "wenzhuo.lu@intel.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/1484290401-1404-21-git-send-email-wenzhuo.lu@intel.com/mbox/", "series": [], "comments": "http://patches.dpdk.org/api/patches/19299/comments/", "check": "fail", "checks": "http://patches.dpdk.org/api/patches/19299/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<dev-bounces@dpdk.org>", "X-Original-To": "patchwork@dpdk.org", "Delivered-To": "patchwork@dpdk.org", "Received": [ "from [92.243.14.124] (localhost [IPv6:::1])\n\tby dpdk.org (Postfix) with ESMTP id 6D6A6F967;\n\tFri, 13 Jan 2017 07:54:56 +0100 (CET)", "from mga05.intel.com (mga05.intel.com [192.55.52.43])\n\tby dpdk.org (Postfix) with ESMTP id 75E42F8AA\n\tfor <dev@dpdk.org>; Fri, 13 Jan 2017 07:53:48 +0100 (CET)", "from fmsmga005.fm.intel.com ([10.253.24.32])\n\tby fmsmga105.fm.intel.com with ESMTP; 12 Jan 2017 22:53:48 -0800", "from dpdk26.sh.intel.com ([10.239.128.228])\n\tby fmsmga005.fm.intel.com with ESMTP; 12 Jan 2017 22:53:47 -0800" ], "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.33,220,1477983600\"; d=\"scan'208\";a=\"52749816\"", "From": "Wenzhuo Lu <wenzhuo.lu@intel.com>", "To": "dev@dpdk.org", "Cc": "Wenzhuo Lu <wenzhuo.lu@intel.com>", "Date": "Fri, 13 Jan 2017 14:53:15 +0800", "Message-Id": "<1484290401-1404-21-git-send-email-wenzhuo.lu@intel.com>", "X-Mailer": "git-send-email 1.9.3", "In-Reply-To": "<1484290401-1404-1-git-send-email-wenzhuo.lu@intel.com>", "References": "<1480637533-37425-1-git-send-email-wenzhuo.lu@intel.com>\n\t<1484290401-1404-1-git-send-email-wenzhuo.lu@intel.com>", "Subject": "[dpdk-dev] [PATCH v9 20/26] app/testpmd: use multicast promiscuous\n\tmode on i40e", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.15", "Precedence": "list", "List-Id": "DPDK patches and discussions <dev.dpdk.org>", "List-Unsubscribe": "<http://dpdk.org/ml/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>", "List-Archive": "<http://dpdk.org/ml/archives/dev/>", "List-Post": "<mailto:dev@dpdk.org>", "List-Help": "<mailto:dev-request@dpdk.org?subject=help>", "List-Subscribe": "<http://dpdk.org/ml/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "content": "Add testpmd CLI to set VF multicast promiscuous mode on i40e.\n\nSigned-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>\n---\n app/test-pmd/cmdline.c | 97 +++++++++++++++++++++++++++++\n doc/guides/testpmd_app_ug/testpmd_funcs.rst | 9 +++\n 2 files changed, 106 insertions(+)", "diff": "diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c\nindex cc177a6..c5f5134 100644\n--- a/app/test-pmd/cmdline.c\n+++ b/app/test-pmd/cmdline.c\n@@ -403,6 +403,9 @@ static void cmd_help_long_parsed(void *parsed_result,\n \t\t\t\"set vf promisc (port_id) (vf_id) (on|off)\\n\"\n \t\t\t\" Set unicast promiscuous mode for a VF from the PF.\\n\\n\"\n \n+\t\t\t\"set vf allmulti (port_id) (vf_id) (on|off)\\n\"\n+\t\t\t\" Set multicast promiscuous mode for a VF from the PF.\\n\\n\"\n+\n \t\t\t\"set flow_ctrl rx (on|off) tx (on|off) (high_water)\"\n \t\t\t\" (low_water) (pause_time) (send_xon) mac_ctrl_frame_fwd\"\n \t\t\t\" (on|off) autoneg (on|off) (port_id)\\n\"\n@@ -11655,6 +11658,99 @@ struct cmd_vf_promisc_result {\n \t},\n };\n \n+/* VF multicast promiscuous mode configuration */\n+\n+/* Common result structure for VF multicast promiscuous mode */\n+struct cmd_vf_allmulti_result {\n+\tcmdline_fixed_string_t set;\n+\tcmdline_fixed_string_t vf;\n+\tcmdline_fixed_string_t allmulti;\n+\tuint8_t port_id;\n+\tuint32_t vf_id;\n+\tcmdline_fixed_string_t on_off;\n+};\n+\n+/* Common CLI fields for VF multicast promiscuous mode enable disable */\n+cmdline_parse_token_string_t cmd_vf_allmulti_set =\n+\tTOKEN_STRING_INITIALIZER\n+\t\t(struct cmd_vf_allmulti_result,\n+\t\t set, \"set\");\n+cmdline_parse_token_string_t cmd_vf_allmulti_vf =\n+\tTOKEN_STRING_INITIALIZER\n+\t\t(struct cmd_vf_allmulti_result,\n+\t\t vf, \"vf\");\n+cmdline_parse_token_string_t cmd_vf_allmulti_allmulti =\n+\tTOKEN_STRING_INITIALIZER\n+\t\t(struct cmd_vf_allmulti_result,\n+\t\t allmulti, \"allmulti\");\n+cmdline_parse_token_num_t cmd_vf_allmulti_port_id =\n+\tTOKEN_NUM_INITIALIZER\n+\t\t(struct cmd_vf_allmulti_result,\n+\t\t port_id, UINT8);\n+cmdline_parse_token_num_t cmd_vf_allmulti_vf_id =\n+\tTOKEN_NUM_INITIALIZER\n+\t\t(struct cmd_vf_allmulti_result,\n+\t\t vf_id, UINT32);\n+cmdline_parse_token_string_t cmd_vf_allmulti_on_off =\n+\tTOKEN_STRING_INITIALIZER\n+\t\t(struct cmd_vf_allmulti_result,\n+\t\t on_off, \"on#off\");\n+\n+static void\n+cmd_set_vf_allmulti_parsed(\n+\tvoid *parsed_result,\n+\t__attribute__((unused)) struct cmdline *cl,\n+\t__attribute__((unused)) void *data)\n+{\n+\tstruct cmd_vf_allmulti_result *res = parsed_result;\n+\tint ret = -ENOTSUP;\n+\n+\t__rte_unused int is_on = (strcmp(res->on_off, \"on\") == 0) ? 1 : 0;\n+\tstruct rte_eth_dev_info dev_info;\n+\n+\tif (port_id_is_invalid(res->port_id, ENABLED_WARN))\n+\t\treturn;\n+\n+\trte_eth_dev_info_get(res->port_id, &dev_info);\n+\n+#ifdef RTE_LIBRTE_I40E_PMD\n+\tif (strstr(dev_info.driver_name, \"i40e\") != NULL)\n+\t\tret = rte_pmd_i40e_set_vf_multicast_promisc(res->port_id,\n+\t\t\t\t\t\t\t res->vf_id, is_on);\n+#endif\n+\n+\tswitch (ret) {\n+\tcase 0:\n+\t\tbreak;\n+\tcase -EINVAL:\n+\t\tprintf(\"invalid vf_id %d\\n\", res->vf_id);\n+\t\tbreak;\n+\tcase -ENODEV:\n+\t\tprintf(\"invalid port_id %d\\n\", res->port_id);\n+\t\tbreak;\n+\tcase -ENOTSUP:\n+\t\tprintf(\"function not implemented\\n\");\n+\t\tbreak;\n+\tdefault:\n+\t\tprintf(\"programming error: (%s)\\n\", strerror(-ret));\n+\t}\n+}\n+\n+cmdline_parse_inst_t cmd_set_vf_allmulti = {\n+\t.f = cmd_set_vf_allmulti_parsed,\n+\t.data = NULL,\n+\t.help_str = \"set vf multicast promiscuous for a VF from PF\",\n+\t.tokens = {\n+\t\t(void *)&cmd_vf_allmulti_set,\n+\t\t(void *)&cmd_vf_allmulti_vf,\n+\t\t(void *)&cmd_vf_allmulti_allmulti,\n+\t\t(void *)&cmd_vf_allmulti_port_id,\n+\t\t(void *)&cmd_vf_allmulti_vf_id,\n+\t\t(void *)&cmd_vf_allmulti_on_off,\n+\t\tNULL,\n+\t},\n+};\n+\n /* ******************************************************************************** */\n \n /* list of instructions */\n@@ -11822,6 +11918,7 @@ struct cmd_vf_promisc_result {\n #endif\n \t(cmdline_parse_inst_t *)&cmd_set_vf_mac_addr,\n \t(cmdline_parse_inst_t *)&cmd_set_vf_promisc,\n+\t(cmdline_parse_inst_t *)&cmd_set_vf_allmulti,\n \tNULL,\n };\n \ndiff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst b/doc/guides/testpmd_app_ug/testpmd_funcs.rst\nindex 2b18c66..45c5902 100644\n--- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst\n+++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst\n@@ -829,6 +829,15 @@ In promiscuous mode packets are not dropped if they aren't for the specified MAC\n \n testpmd> set vf promisc (port_id) (vf_id) (on|off)\n \n+set allmulticast (for VF)\n+~~~~~~~~~~~~~~~~~~~~~~~~~\n+\n+Set the multicast promiscuous mode for a VF from PF.\n+It's supported by Intel i40e NICs now.\n+In promiscuous mode packets are not dropped if they aren't for the specified MAC address::\n+\n+ testpmd> set vf allmulti (port_id) (vf_id) (on|off)\n+\n set flow_ctrl rx\n ~~~~~~~~~~~~~~~~\n \n", "prefixes": [ "dpdk-dev", "v9", "20/26" ] }{ "id": 19299, "url": "