[dpdk-dev] [PATCH] net/mlx5: fix trimming SW ring for vectorized Rx

Thomas Monjalon thomas at monjalon.net
Thu Aug 3 23:20:52 CEST 2017


03/08/2017 23:12, Yongseok Koh:
> Unlike mlx5_rx_burst(), mlx5_rx_burst_vec() doesn't replace completed
> buffers one by one right after completion is processed but replenishes
> multiple buffers later with rte_mempool_get_bulk(). Therefore, there could
> be some buffer addresses left in the SW ring (rxq->elts[]) which have
> already been delivered to application. As PMD doesn't own such buffers, it
> must not be freed by PMD.  "Trimming" is needed before cleanup.
> 
> A problem can be seen when quitting testpmd when
> CONFIG_RTE_LIBRTE_MBUF_DEBUG=y and CONFIG_RTE_LIBRTE_MEMPOOL_DEBUG=y
> 
> Trimming should be as simple as possible, it shouldn't touch any indexes
> and buffer allocation isn't necessary.
> 
> Fixes: 6cb559d67b83 ("net/mlx5: add vectorized Rx/Tx burst for x86")
> 
> Signed-off-by: Yongseok Koh <yskoh at mellanox.com>
> Acked-by: Nelio Laranjeiro <nelio.laranjeiro at 6wind.com>

Applied, thanks



More information about the dev mailing list