[PATCH v7] app/testpmd: add Host Shaper command

Matan Azrad matan at nvidia.com
Wed Jun 15 09:51:37 CEST 2022



From: Spike Du
> Add command line options to support host shaper configure.
> - Command syntax:
>   mlx5 set port <port_id> host_shaper avail_thresh_triggered <0|1> rate
> <rate_num>
> 
> - Example commands:
> To enable avail_thresh_triggered on port 1 and disable current host
> shaper:
> testpmd> mlx5 set port 1 host_shaper avail_thresh_triggered 1 rate 0
> 
> To disable avail_thresh_triggered and current host shaper on port 1:
> testpmd> mlx5 set port 1 host_shaper avail_thresh_triggered 0 rate 0
> 
> The rate unit is 100Mbps.
> To disable avail_thresh_triggered and configure a shaper of 5Gbps on port 1:
> testpmd> mlx5 set port 1 host_shaper avail_thresh_triggered 0 rate 50
> 
> Add sample code to handle rxq available descriptor threshold event, it delays
> a while so that rxq empties, then disables host shaper and rearms available
> descriptor threshold event.
> 
> Signed-off-by: Spike Du <spiked at nvidia.com>
Acked-by: Matan Azrad <matan at nvidia.com>


More information about the dev mailing list