[dpdk-dev] [PATCH v4 5/5] app/test-pmd: add Port Representor commands

Ferruh Yigit ferruh.yigit at intel.com
Tue Jan 9 23:10:22 CET 2018


On 1/8/2018 2:37 PM, Remy Horton wrote:
> Port Representors provide a logical presentation in DPDK of VF (virtual
> function) ports for the purposes of control and monitoring. Each port
> representor device represents a single VF and is associated with it's
> parent physical function (PF) PMD which provides the back-end hooks for
> the representor device ops and defines the control domain to which that
> port belongs. This allows to use existing DPDK APIs to monitor and control
> the port without the need to create and maintain VF specific APIs.
> 
> This patch adds the 'add representor' and 'del representor' commands
> to test-pmd, which respectively allow the adding and removing of
> port representors.
> 
> Signed-off-by: Remy Horton <remy.horton at intel.com>

<...>

> +
> +	rte_log(RTE_LOG_INFO, RTE_LOGTYPE_USER1, "%s(): addr:%s vport:%i\n",
> +		__func__, res->pf, res->vport);

this file tends to use printf for logs.
<...>

> @@ -15576,6 +15662,8 @@ cmdline_parse_ctx_t main_ctx[] = {
>  	(cmdline_parse_inst_t *) &cmd_show_bonding_config,
>  	(cmdline_parse_inst_t *) &cmd_set_bonding_primary,
>  	(cmdline_parse_inst_t *) &cmd_add_bonding_slave,
> +	(cmdline_parse_inst_t *) &cmd_add_representor,
> +	(cmdline_parse_inst_t *) &cmd_del_representor,

Please update cmd_help_long_parsed() to add new commands.

<...>

> +Adding a representor for a VF requires specifying the PF in
> +``Bus_DomBDF`` format alongside the index number of the VF::
> +
> +   testpmd> add representor pci_0000:81:00.0 0

I am for grouping port related commands under "port" command, these are all OK
in their context, but when you look into all testpmd command it turns into mess.

What do you think for:
port representor add <pf_address> <vport_id>
port representor del <pf_address> <vport_id>


More information about the dev mailing list