[dpdk-dev] [PATCH v2] net/mlx5: add queue start and stop feature

Raslan Darawsheh rasland at mellanox.com
Mon Jul 20 09:04:58 CEST 2020


Hi,

> -----Original Message-----
> From: Viacheslav Ovsiienko <viacheslavo at mellanox.com>
> Sent: Sunday, July 19, 2020 6:36 PM
> To: dev at dpdk.org
> Cc: Matan Azrad <matan at mellanox.com>; Raslan Darawsheh
> <rasland at mellanox.com>; Thomas Monjalon <thomas at monjalon.net>
> Subject: [PATCH v2] net/mlx5: add queue start and stop feature
> 
> The mlx5 PMD did not support queue_start and queue_stop eth_dev API
> routines, queue could not be suspended and resumed during device
> operation.
> 
> There is the use case when this feature is crucial for applications:
> 
> - there is the secondary process handling the queue
> - secondary process crashed/aborted
> - some mbufs were allocated or used by secondary application
> - some mbufs were allocated by Rx queues to receive packets
> - some mbufs were placed to send queue
> - queue goes to undefined state
> 
> In this case there was no reliable way to recovery queue handling
> by restarted secondary process but reset queue to initial state
> freeing all involved resources, including buffers involved in queue
> operations, reset the mbuf pools, and then reinitialize queue
> to working state:
> 
> - reset mbuf pool, allocate all mbuf to initialize pool into
>   safe state after the crush and allow safe mbuf free calls
> - stop queue, free all potentially involved mbufs
> - reset mbuf pool again
> - start queue, reallocate mbufs needed
> 
> This patch introduces the queue start/stop feature with some
> limitations:
> 
> - hairpin queues are not supported
> - it is application responsibility to synchronize start/stop
>   with datapath routines, rx/tx_burst must be suspended during
>   the queue_start/queue_stop calls
> - it is application responsibility to track queue usage and
>   provide coordinated queue_start/queue_stop calls from
>   secondary and primary processes.
> - Rx queues with vectorized Rx routine and engaged CQE
>   compression are not supported by this patch currently
> 
> Signed-off-by: Viacheslav Ovsiienko <viacheslavo at mellanox.com>
> ---
> 
> v2: - rebase
>     - address comments for commit messages
> 
> 

Patch applied to next-net-mlx,

Kindest regards,
Raslan Darawsheh


More information about the dev mailing list