From: Qi Zhang <qi.z.zhang@intel.com>
To: jingjing.wu@intel.com, helin.zhang@intel.com
Cc: dev@dpdk.org, Wenzhuo Lu <wenzhuo.lu@intel.com>
Subject: [dpdk-dev] [PATCH v3 20/29] app/testpmd: use multicast promiscuous mode on i40e
Date: Thu, 15 Dec 2016 16:05:10 -0500 [thread overview]
Message-ID: <1481835919-36488-21-git-send-email-qi.z.zhang@intel.com> (raw)
In-Reply-To: <1481835919-36488-1-git-send-email-qi.z.zhang@intel.com>
From: Wenzhuo Lu <wenzhuo.lu@intel.com>
Add testpmd CLI to set VF multicast promiscuous mode on i40e.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
---
app/test-pmd/cmdline.c | 86 +++++++++++++++++++++++++++++
doc/guides/testpmd_app_ug/testpmd_funcs.rst | 9 +++
2 files changed, 95 insertions(+)
diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index e1c0486..27df75c 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -401,6 +401,9 @@ static void cmd_help_long_parsed(void *parsed_result,
"set vf promisc (port_id) (vf_id) (on|off)\n"
" Set unicast promiscuous mode for a VF from the PF.\n\n"
+ "set vf allmulti (port_id) (vf_id) (on|off)\n"
+ " Set multicast promiscuous mode for a VF from the PF.\n\n"
+
"set flow_ctrl rx (on|off) tx (on|off) (high_water)"
" (low_water) (pause_time) (send_xon) mac_ctrl_frame_fwd"
" (on|off) autoneg (on|off) (port_id)\n"
@@ -11649,6 +11652,88 @@ cmdline_parse_inst_t cmd_set_vf_promisc = {
},
};
+/* VF multicast promiscuous mode configuration */
+
+/* Common result structure for VF multicast promiscuous mode */
+struct cmd_vf_allmulti_result {
+ cmdline_fixed_string_t set;
+ cmdline_fixed_string_t vf;
+ cmdline_fixed_string_t allmulti;
+ uint8_t port_id;
+ uint32_t vf_id;
+ cmdline_fixed_string_t on_off;
+};
+
+/* Common CLI fields for VF multicast promiscuous mode enable disable */
+cmdline_parse_token_string_t cmd_vf_allmulti_set =
+ TOKEN_STRING_INITIALIZER
+ (struct cmd_vf_allmulti_result,
+ set, "set");
+cmdline_parse_token_string_t cmd_vf_allmulti_vf =
+ TOKEN_STRING_INITIALIZER
+ (struct cmd_vf_allmulti_result,
+ vf, "vf");
+cmdline_parse_token_string_t cmd_vf_allmulti_allmulti =
+ TOKEN_STRING_INITIALIZER
+ (struct cmd_vf_allmulti_result,
+ allmulti, "allmulti");
+cmdline_parse_token_num_t cmd_vf_allmulti_port_id =
+ TOKEN_NUM_INITIALIZER
+ (struct cmd_vf_allmulti_result,
+ port_id, UINT8);
+cmdline_parse_token_num_t cmd_vf_allmulti_vf_id =
+ TOKEN_NUM_INITIALIZER
+ (struct cmd_vf_allmulti_result,
+ vf_id, UINT32);
+cmdline_parse_token_string_t cmd_vf_allmulti_on_off =
+ TOKEN_STRING_INITIALIZER
+ (struct cmd_vf_allmulti_result,
+ on_off, "on#off");
+
+static void
+cmd_set_vf_allmulti_parsed(
+ void *parsed_result,
+ __attribute__((unused)) struct cmdline *cl,
+ __attribute__((unused)) void *data)
+{
+ struct cmd_vf_allmulti_result *res = parsed_result;
+ int ret = 0;
+ int is_on = (strcmp(res->on_off, "on") == 0) ? 1 : 0;
+
+ if (port_id_is_invalid(res->port_id, ENABLED_WARN))
+ return;
+
+ ret = rte_pmd_i40e_set_vf_multicast_promisc(res->port_id,
+ res->vf_id, is_on);
+ switch (ret) {
+ case 0:
+ break;
+ case -EINVAL:
+ printf("invalid vf_id %d\n", res->vf_id);
+ break;
+ case -ENODEV:
+ printf("invalid port_id %d\n", res->port_id);
+ break;
+ default:
+ printf("programming error: (%s)\n", strerror(-ret));
+ }
+}
+
+cmdline_parse_inst_t cmd_set_vf_allmulti = {
+ .f = cmd_set_vf_allmulti_parsed,
+ .data = NULL,
+ .help_str = "set vf multicast promiscuous for a VF from PF",
+ .tokens = {
+ (void *)&cmd_vf_allmulti_set,
+ (void *)&cmd_vf_allmulti_vf,
+ (void *)&cmd_vf_allmulti_allmulti,
+ (void *)&cmd_vf_allmulti_port_id,
+ (void *)&cmd_vf_allmulti_vf_id,
+ (void *)&cmd_vf_allmulti_on_off,
+ NULL,
+ },
+};
+
/* ******************************************************************************** */
/* list of instructions */
@@ -11814,6 +11899,7 @@ cmdline_parse_ctx_t main_ctx[] = {
(cmdline_parse_inst_t *)&cmd_vf_rxvlan_filter,
(cmdline_parse_inst_t *)&cmd_vf_rate_limit,
(cmdline_parse_inst_t *)&cmd_set_vf_promisc,
+ (cmdline_parse_inst_t *)&cmd_set_vf_allmulti,
NULL,
};
diff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
index 2b18c66..45c5902 100644
--- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst
+++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
@@ -829,6 +829,15 @@ In promiscuous mode packets are not dropped if they aren't for the specified MAC
testpmd> set vf promisc (port_id) (vf_id) (on|off)
+set allmulticast (for VF)
+~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Set the multicast promiscuous mode for a VF from PF.
+It's supported by Intel i40e NICs now.
+In promiscuous mode packets are not dropped if they aren't for the specified MAC address::
+
+ testpmd> set vf allmulti (port_id) (vf_id) (on|off)
+
set flow_ctrl rx
~~~~~~~~~~~~~~~~
--
2.7.4
next prev parent reply other threads:[~2016-12-16 4:09 UTC|newest]
Thread overview: 125+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-15 21:04 [dpdk-dev] [PATCH v3 00/29] Support VFD and DPDK PF + kernel VF " Qi Zhang
2016-12-15 21:04 ` [dpdk-dev] [PATCH v3 01/29] net/i40e: support link status notification Qi Zhang
2016-12-15 21:04 ` [dpdk-dev] [PATCH v3 02/29] net/i40e: add callback to user on VF to PF mbox msg Qi Zhang
2016-12-15 21:04 ` [dpdk-dev] [PATCH v3 03/29] net/i40e: set VF MAC anti-spoofing from PF Qi Zhang
2016-12-15 21:04 ` [dpdk-dev] [PATCH v3 04/29] net/i40e: set VF VLAN " Qi Zhang
2016-12-15 21:04 ` [dpdk-dev] [PATCH v3 05/29] net/i40e: set Tx loopback " Qi Zhang
2016-12-15 21:04 ` [dpdk-dev] [PATCH v3 06/29] net/i40e: set VF unicast promisc mode " Qi Zhang
2016-12-15 21:04 ` [dpdk-dev] [PATCH v3 07/29] net/i40e: set VF multicast " Qi Zhang
2016-12-15 21:04 ` [dpdk-dev] [PATCH v3 08/29] net/i40e: enable VF MTU change Qi Zhang
2016-12-15 21:04 ` [dpdk-dev] [PATCH v3 09/29] net/i40e: fix VF reset flow Qi Zhang
2016-12-15 21:05 ` [dpdk-dev] [PATCH v3 10/29] net/i40e: set VF MAC from PF support Qi Zhang
2016-12-15 21:05 ` [dpdk-dev] [PATCH v3 11/29] net/i40e: set VF MAC from VF support Qi Zhang
2016-12-15 21:05 ` [dpdk-dev] [PATCH v3 12/29] net/i40e: fix VF MAC address assignment Qi Zhang
2016-12-15 21:05 ` [dpdk-dev] [PATCH v3 13/29] net/i40e: add VF VLAN strip func Qi Zhang
2016-12-15 21:05 ` [dpdk-dev] [PATCH v3 14/29] net/i40e: add set VF VLAN insert function Qi Zhang
2016-12-15 21:05 ` [dpdk-dev] [PATCH v3 15/29] net/i40e: set VF broadcast mode from PF Qi Zhang
2016-12-15 21:05 ` [dpdk-dev] [PATCH v3 16/29] net/i40e: set VF VLAN tag " Qi Zhang
2016-12-15 21:05 ` [dpdk-dev] [PATCH v3 17/29] net/i40e: set VF VLAN filter " Qi Zhang
2016-12-15 21:05 ` [dpdk-dev] [PATCH v3 18/29] app/testpmd: use VFD APIs on i40e Qi Zhang
2016-12-15 21:05 ` [dpdk-dev] [PATCH v3 19/29] app/testpmd: use unicast promiscuous mode " Qi Zhang
2016-12-15 21:05 ` Qi Zhang [this message]
2016-12-15 21:05 ` [dpdk-dev] [PATCH v3 21/29] app/testpmd: add command to test VF broadcast " Qi Zhang
2016-12-15 21:05 ` [dpdk-dev] [PATCH v3 22/29] app/testpmd: add command to test VF VLAN tag " Qi Zhang
2016-12-15 21:05 ` [dpdk-dev] [PATCH v3 23/29] app/testpmd: handle i40e in VF VLAN filter command Qi Zhang
2016-12-15 21:05 ` [dpdk-dev] [PATCH v3 24/29] net/i40e: change version number to support Linux VF Qi Zhang
2016-12-15 21:05 ` [dpdk-dev] [PATCH v3 25/29] net/i40e: return correct VSI id Qi Zhang
2016-12-15 21:05 ` [dpdk-dev] [PATCH v3 26/29] net/i40e: parse more VF parameter and configure Qi Zhang
2016-12-15 21:05 ` [dpdk-dev] [PATCH v3 27/29] net/i40e: support Linux VF to configure IRQ link list Qi Zhang
2016-12-15 21:05 ` [dpdk-dev] [PATCH v3 28/29] net/i40e: enhance in sanity check of MAC Qi Zhang
2016-12-15 21:05 ` [dpdk-dev] [PATCH v3 29/29] net/i40e: set/clear VF stats from PF Qi Zhang
2016-12-16 14:28 ` [dpdk-dev] [PATCH v3 00/29] Support VFD and DPDK PF + kernel VF on i40e Ferruh Yigit
2016-12-16 14:38 ` [dpdk-dev] [PATCH v4 " Ferruh Yigit
2016-12-16 14:38 ` [dpdk-dev] [PATCH v4 01/29] net/i40e: support link status notification Ferruh Yigit
2016-12-16 14:38 ` [dpdk-dev] [PATCH v4 02/29] net/i40e: add callback to user on VF to PF mbox msg Ferruh Yigit
2016-12-16 14:38 ` [dpdk-dev] [PATCH v4 03/29] net/i40e: set VF MAC anti-spoofing from PF Ferruh Yigit
2016-12-16 14:38 ` [dpdk-dev] [PATCH v4 04/29] net/i40e: set VF VLAN " Ferruh Yigit
2016-12-16 14:38 ` [dpdk-dev] [PATCH v4 05/29] net/i40e: set Tx loopback " Ferruh Yigit
2016-12-16 14:38 ` [dpdk-dev] [PATCH v4 06/29] net/i40e: set VF unicast promisc mode " Ferruh Yigit
2016-12-16 14:38 ` [dpdk-dev] [PATCH v4 07/29] net/i40e: set VF multicast " Ferruh Yigit
2016-12-16 14:38 ` [dpdk-dev] [PATCH v4 08/29] net/i40e: enable VF MTU change Ferruh Yigit
2016-12-16 14:38 ` [dpdk-dev] [PATCH v4 09/29] net/i40e: fix VF reset flow Ferruh Yigit
2016-12-16 14:39 ` [dpdk-dev] [PATCH v4 10/29] net/i40e: set VF MAC from PF support Ferruh Yigit
2016-12-16 14:39 ` [dpdk-dev] [PATCH v4 11/29] net/i40e: set VF MAC from VF support Ferruh Yigit
2016-12-16 14:39 ` [dpdk-dev] [PATCH v4 12/29] net/i40e: fix VF MAC address assignment Ferruh Yigit
2016-12-16 14:39 ` [dpdk-dev] [PATCH v4 13/29] net/i40e: add VF VLAN strip func Ferruh Yigit
2016-12-16 14:39 ` [dpdk-dev] [PATCH v4 14/29] net/i40e: add set VF VLAN insert function Ferruh Yigit
2016-12-16 14:39 ` [dpdk-dev] [PATCH v4 15/29] net/i40e: set VF broadcast mode from PF Ferruh Yigit
2016-12-16 14:39 ` [dpdk-dev] [PATCH v4 16/29] net/i40e: set VF VLAN tag " Ferruh Yigit
2016-12-16 14:39 ` [dpdk-dev] [PATCH v4 17/29] net/i40e: set VF VLAN filter " Ferruh Yigit
2016-12-16 14:39 ` [dpdk-dev] [PATCH v4 18/29] app/testpmd: use VFD APIs on i40e Ferruh Yigit
2016-12-16 14:39 ` [dpdk-dev] [PATCH v4 19/29] app/testpmd: use unicast promiscuous mode " Ferruh Yigit
2016-12-16 14:39 ` [dpdk-dev] [PATCH v4 20/29] app/testpmd: use multicast " Ferruh Yigit
2016-12-16 14:39 ` [dpdk-dev] [PATCH v4 21/29] app/testpmd: add command to test VF broadcast " Ferruh Yigit
2016-12-16 14:39 ` [dpdk-dev] [PATCH v4 22/29] app/testpmd: add command to test VF VLAN tag " Ferruh Yigit
2016-12-16 14:39 ` [dpdk-dev] [PATCH v4 23/29] app/testpmd: handle i40e in VF VLAN filter command Ferruh Yigit
2016-12-16 14:39 ` [dpdk-dev] [PATCH v4 24/29] net/i40e: change version number to support Linux VF Ferruh Yigit
2016-12-16 14:39 ` [dpdk-dev] [PATCH v4 25/29] net/i40e: return correct VSI id Ferruh Yigit
2016-12-16 14:39 ` [dpdk-dev] [PATCH v4 26/29] net/i40e: parse more VF parameter and configure Ferruh Yigit
2016-12-16 14:39 ` [dpdk-dev] [PATCH v4 27/29] net/i40e: support Linux VF to configure IRQ link list Ferruh Yigit
2016-12-16 14:39 ` [dpdk-dev] [PATCH v4 28/29] net/i40e: enhance in sanity check of MAC Ferruh Yigit
2016-12-16 14:39 ` [dpdk-dev] [PATCH v4 29/29] net/i40e: set/clear VF stats from PF Ferruh Yigit
2016-12-16 14:45 ` [dpdk-dev] [PATCH v4 00/29] Support VFD and DPDK PF + kernel VF on i40e Vincent Jardin
2016-12-16 19:02 ` [dpdk-dev] [PATCH v5 " Ferruh Yigit
2016-12-16 19:02 ` [dpdk-dev] [PATCH v5 01/29] net/i40e: support link status notification Ferruh Yigit
2016-12-16 19:02 ` [dpdk-dev] [PATCH v5 02/29] net/i40e: add callback to user on VF to PF mbox msg Ferruh Yigit
2016-12-16 19:02 ` [dpdk-dev] [PATCH v5 03/29] net/i40e: set VF MAC anti-spoofing from PF Ferruh Yigit
2016-12-16 19:02 ` [dpdk-dev] [PATCH v5 04/29] net/i40e: set VF VLAN " Ferruh Yigit
2016-12-16 19:02 ` [dpdk-dev] [PATCH v5 05/29] net/i40e: set Tx loopback " Ferruh Yigit
2016-12-16 19:02 ` [dpdk-dev] [PATCH v5 06/29] net/i40e: set VF unicast promisc mode " Ferruh Yigit
2016-12-16 19:02 ` [dpdk-dev] [PATCH v5 07/29] net/i40e: set VF multicast " Ferruh Yigit
2016-12-16 19:02 ` [dpdk-dev] [PATCH v5 08/29] net/i40e: enable VF MTU change Ferruh Yigit
2016-12-16 19:02 ` [dpdk-dev] [PATCH v5 09/29] net/i40e: fix VF reset flow Ferruh Yigit
2016-12-16 19:02 ` [dpdk-dev] [PATCH v5 10/29] net/i40e: set VF MAC from PF support Ferruh Yigit
2016-12-16 19:02 ` [dpdk-dev] [PATCH v5 11/29] net/i40e: set VF MAC from VF support Ferruh Yigit
2016-12-16 19:02 ` [dpdk-dev] [PATCH v5 12/29] net/i40e: fix VF MAC address assignment Ferruh Yigit
2016-12-16 19:02 ` [dpdk-dev] [PATCH v5 13/29] net/i40e: add VF VLAN strip func Ferruh Yigit
2016-12-16 19:02 ` [dpdk-dev] [PATCH v5 14/29] net/i40e: add set VF VLAN insert function Ferruh Yigit
2016-12-16 19:02 ` [dpdk-dev] [PATCH v5 15/29] net/i40e: set VF broadcast mode from PF Ferruh Yigit
2016-12-16 19:02 ` [dpdk-dev] [PATCH v5 16/29] net/i40e: set VF VLAN tag " Ferruh Yigit
2016-12-16 19:02 ` [dpdk-dev] [PATCH v5 17/29] net/i40e: set VF VLAN filter " Ferruh Yigit
2016-12-16 19:02 ` [dpdk-dev] [PATCH v5 18/29] app/testpmd: use VFD APIs on i40e Ferruh Yigit
2016-12-16 20:30 ` Vincent JARDIN
2016-12-19 11:03 ` Ferruh Yigit
2016-12-20 15:19 ` Vincent JARDIN
2016-12-19 17:09 ` Ferruh Yigit
2016-12-20 1:05 ` Lu, Wenzhuo
2016-12-16 19:02 ` [dpdk-dev] [PATCH v5 19/29] app/testpmd: use unicast promiscuous mode " Ferruh Yigit
2016-12-16 20:28 ` Vincent JARDIN
2016-12-19 11:05 ` Ferruh Yigit
2016-12-16 19:02 ` [dpdk-dev] [PATCH v5 20/29] app/testpmd: use multicast " Ferruh Yigit
2016-12-16 19:02 ` [dpdk-dev] [PATCH v5 21/29] app/testpmd: add command to test VF broadcast " Ferruh Yigit
2016-12-16 19:02 ` [dpdk-dev] [PATCH v5 22/29] app/testpmd: add command to test VF VLAN tag " Ferruh Yigit
2016-12-16 19:02 ` [dpdk-dev] [PATCH v5 23/29] app/testpmd: handle i40e in VF VLAN filter command Ferruh Yigit
2016-12-16 20:31 ` Vincent JARDIN
2016-12-19 11:13 ` Ferruh Yigit
2016-12-16 19:02 ` [dpdk-dev] [PATCH v5 24/29] net/i40e: change version number to support Linux VF Ferruh Yigit
2016-12-16 19:02 ` [dpdk-dev] [PATCH v5 25/29] net/i40e: return correct VSI id Ferruh Yigit
2016-12-16 19:02 ` [dpdk-dev] [PATCH v5 26/29] net/i40e: parse more VF parameter and configure Ferruh Yigit
2016-12-16 19:02 ` [dpdk-dev] [PATCH v5 27/29] net/i40e: support Linux VF to configure IRQ link list Ferruh Yigit
2016-12-16 19:02 ` [dpdk-dev] [PATCH v5 28/29] net/i40e: enhance in sanity check of MAC Ferruh Yigit
2016-12-16 19:02 ` [dpdk-dev] [PATCH v5 29/29] net/i40e: set/clear VF stats from PF Ferruh Yigit
2016-12-20 13:24 ` Ferruh Yigit
2016-12-20 13:40 ` Iremonger, Bernard
2016-12-21 0:56 ` Lu, Wenzhuo
2016-12-22 16:38 ` Iremonger, Bernard
2016-12-16 20:36 ` [dpdk-dev] [PATCH v5 00/29] Support VFD and DPDK PF + kernel VF on i40e Vincent JARDIN
2016-12-19 9:01 ` Chen, Jing D
2016-12-19 13:20 ` Thomas Monjalon
2016-12-19 13:39 ` Chen, Jing D
2016-12-19 13:45 ` Vincent JARDIN
2016-12-20 4:48 ` Chen, Jing D
2016-12-20 15:18 ` Vincent JARDIN
2016-12-20 15:31 ` Ferruh Yigit
2016-12-21 0:50 ` Lu, Wenzhuo
2016-12-22 8:10 ` Chen, Jing D
2016-12-22 13:46 ` Vincent JARDIN
2016-12-26 11:59 ` Chen, Jing D
2017-01-04 21:09 ` Scott Daniels
2017-01-10 13:29 ` Vincent JARDIN
2017-01-12 3:47 ` Chen, Jing D
2017-01-13 23:04 ` John Fastabend
2017-01-13 23:49 ` JOSHI, KAUSTUBH (KAUSTUBH)
2017-01-15 23:32 ` Vincent JARDIN
2017-01-16 11:42 ` Ferruh Yigit
2017-01-16 9:32 ` Thomas Monjalon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1481835919-36488-21-git-send-email-qi.z.zhang@intel.com \
--to=qi.z.zhang@intel.com \
--cc=dev@dpdk.org \
--cc=helin.zhang@intel.com \
--cc=jingjing.wu@intel.com \
--cc=wenzhuo.lu@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).