[dpdk-dev] [PATCH v2 21/32] app/testpmd: use unicast promiscuous mode on i40e

Ferruh Yigit ferruh.yigit at intel.com
Wed Dec 7 15:59:59 CET 2016


On 12/7/2016 3:32 AM, Wenzhuo Lu wrote:
> Add testpmd CLI to set VF unicast promiscuous mode on i40e.
> 
> Signed-off-by: Wenzhuo Lu <wenzhuo.lu at intel.com>
> ---
>  app/test-pmd/cmdline.c                      | 92 +++++++++++++++++++++++++++++
>  doc/guides/testpmd_app_ug/testpmd_funcs.rst |  8 +++
>  2 files changed, 100 insertions(+)
> 
> diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
> index 12126ce..d39712e 100644
> --- a/app/test-pmd/cmdline.c
> +++ b/app/test-pmd/cmdline.c
> @@ -404,6 +404,11 @@ static void cmd_help_long_parsed(void *parsed_result,
>  			"set allmulti (port_id|all) (on|off)\n"
>  			"    Set the allmulti mode on port_id, or all.\n\n"
>  
> +#ifdef RTE_LIBRTE_I40E_PMD
> +			"set vf unicast-promisc (port_id) (vf_id) (on|off)\n"

Previous usages are all "promisc" instead of "unicals-promisc". Is this
to promisc mode for multicast packets? If so testpmd calls them
"allmulti" I guess, so they won't cause trouble.

Can we keep using command: "promisc"?

<...>

> +
> +cmdline_parse_inst_t cmd_set_vf_unicast_promisc = {
> +	.f = cmd_set_vf_unicast_promisc_parsed,
> +	.data = NULL,
> +	.help_str = "set vf unicast promiscuous port_id vf_id on|off",

Can you please differentiate the keyword and variable by wrapping
variables with <>? Like:
"set vf unicast-promiscuous <port_id> <vf_id> on|off"

<...>

>  
> diff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
> index f1c269a..e17e3d5 100644
> --- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst
> +++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
> @@ -820,6 +820,14 @@ Set the allmulti mode for a port or for all ports::
>  
>  Same as the ifconfig (8) option. Controls how multicast packets are handled.
>  
> +set unicast promisc (for VF)
> +~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Should we mention this is PMD specific feature and only enabled with
some PMDs?

> +
> +Set the unicast promiscuous mode for a VF from PF.
> +In promiscuous mode packets are not dropped if they aren't for the specified MAC address::
> +
> +   testpmd> set vf unicast-promisc (port_id) (vf_id) (on|off)
> +
>  set flow_ctrl rx
>  ~~~~~~~~~~~~~~~~
>  
> 



More information about the dev mailing list