[dpdk-dev] [PATCH v2 12/30] net/mlx5: add reference counter on DPDK Tx queues
Ferruh Yigit
ferruh.yigit at intel.com
Mon Oct 9 20:33:46 CEST 2017
On 10/5/2017 1:49 PM, Nelio Laranjeiro wrote:
> Use the same design for DPDK queue as for Verbs queue for symmetry, this
> also helps in fixing some issues like the DPDK release queue API which is
> not expected to fail. With such design, the queue is released when the
> reference counters reaches 0.
>
> Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro at 6wind.com>
<...>
> +struct mlx5_txq_ctrl*
> +mlx5_priv_txq_get(struct priv *priv, uint16_t idx)
> +{
> + struct mlx5_txq_ctrl *ctrl = NULL;
> +
> + if ((*priv->txqs)[idx]) {
> + ctrl = container_of((*priv->txqs)[idx], struct mlx5_txq_ctrl,
> + txq);
> + unsigned int i;
> +
> + mlx5_priv_txq_ibv_get(priv, idx);
> + for (i = 0; i != MLX5_PMD_TX_MP_CACHE; ++i) {
> + struct mlx5_mr *mr;
While applying slightly updated as following to fix icc warning:
struct mlx5_mr *mr = NULL;
Please let me know if you disagree with update.
More information about the dev
mailing list