On 4/3/2018 9:57 AM, Wei Dai wrote:
> Existed testpmd commands can't support per queue offload configuration.
> And there are different commands to enable or disable different offloading.
> This patch set add following commands to support new Tx/Rx offloading API 
> test.
> 
> To get Rx offload capability of a port, please run:
> testpmd > rx_offload get capability <port_id>
> 
> To get current Rx offload per queue and per port configuration of a port, run:
> tesstpmd > rx_offload get configuration <port_id>
> 
> To enable or disable a Rx per port offloading, please run:
> testpmd > rx_offload enable|disable per_port vlan_strip|ipv4_cksum|... 
> <port_id>
> This command will set|clear the associated bit in 
> dev->dev_conf.rxmode.offloads
> for rte_eth_dev_configure and tx_conf->offloads of all Rx queues for
> rte_eth_rx_queue_setup( ).
> 
> To enable or disable a Tx per port offloading, please run:
> testpmd > rx_offload enable|disable per_queue vlan_strip|ipv4_cksum|... 
> <port_id> <queue_id>


Hi Wei,

When each feature adds its own command testpmd becomes harder to use and
commands get harder to remember.

I am against adding a new set of "[rt]x_offload" high level commands. This a
feature of ports and should be a sub-command of port commands.

>From scope of this patch it is hard to see the problem, but that becomes more
clear as you look into whole testpmd command line.

There is already a command
"port config <port_id> ...",
"show port <...> <port_id>"

so we can re-use them like:
"show port rx_offload_cap <port_id>"

There is already "show port cap <port_id>" to get configured offloads!

"port config <port_id> rx_offload vlan_strip|ipv4_cksum|... on|off"
"port config <port_id> queue <queue_id> rx_offload vlan_strip|ipv4_cksum|... 
on|off"


or something similar but main idea is lets not create a new command, what do you
think?

> 
> Same commands like "tx_offload ..." are also added to support new Tx offload 
> API test.
> 
> Signed-off-by: Wei Dai <wei....@intel.com>
> Acked-by: Jingjing Wu <jingjing...@intel.com>
> 
> ---
> v7:
>    update testpmd document
> v6:
>    reconfig port and queues if offloading is enabled or disabled
> v5:
>    don't depend on enum types defined in rte_ethdev.
> v4:
>    improve testpmd command per port offload to set or clear the port 
> configuration
>    and the queue configuration of all queues.
> v3:
>    add enum rte_eth_rx_offload_type and enum rte_eth_tx_offload_type
>    free memory of port->rx_offloads and port->tx_offloads when testpmd is 
> existed
> v2:
>    use rte_eth_dev_rx_offload_name() and rte_eth_dev_tx_offload_name().
>    remove static const strings of Rx/Tx offload names.
> 
> 
> Wei Dai (2):
>   app/testpmd: add commands to test new Rx offload API
>   app/testpmd: add commands to test new Tx offload API
> 
>  app/test-pmd/cmdline.c                      | 759 
> ++++++++++++++++++++++++++++
>  app/test-pmd/testpmd.c                      |  34 +-
>  app/test-pmd/testpmd.h                      |   2 +
>  doc/guides/testpmd_app_ug/testpmd_funcs.rst |  87 ++++
>  4 files changed, 878 insertions(+), 4 deletions(-)
> 

Reply via email to