src/dpdk/drivers/net/mlx5/mlx5_rxq.c
int
mlx5_ind_table_obj_release(struct rte_eth_dev *dev,
			   struct mlx5_ind_table_obj *ind_tbl,
			   bool standalone)
{
	struct mlx5_priv *priv = dev->data->dev_private;
	unsigned int i;

	if (__atomic_sub_fetch(&ind_tbl->refcnt, 1, __ATOMIC_RELAXED) == 0)
		priv->obj_ops.ind_table_destroy(ind_tbl);
	for (i = 0; i != ind_tbl->queues_n; ++i)
		claim_nonzero(mlx5_rxq_release(dev, ind_tbl->queues[i]));
	if (__atomic_load_n(&ind_tbl->refcnt, __ATOMIC_RELAXED) == 0) {
		if (!standalone)
			LIST_REMOVE(ind_tbl, next);
		mlx5_free(ind_tbl);
		return 0;
	}
	return 1;
}
/**
 * Release an indirection table.
 *
 * @param dev
 *   Pointer to Ethernet device.
 * @param ind_table
 *   Indirection table to release.
 * @param standalone
 *   Indirection table for Standalone queue.
 *
 * @return
 *   1 while a reference on it exists, 0 when freed.
 */
Release an indirection table.
@param dev
Pointer to Ethernet device.
@param ind_table
Indirection table to release.
@param standalone
Indirection table for Standalone queue.

@return
1 while a reference on it exists, 0 when freed.
Release an indirection table . @param dev Pointer to Ethernet device . @param ind_table Indirection table to release . @param standalone Indirection table for Standalone queue . @return 1 while a reference on it exists 0 when freed .
int
mlx5_ind_table_obj_release(struct rte_eth_dev *dev,
			   struct mlx5_ind_table_obj *ind_tbl,
			   bool standalone)
{
	struct mlx5_priv *priv = dev->data->dev_private;
	unsigned int i;
	if (__atomic_sub_fetch(&ind_tbl->refcnt, 1, __ATOMIC_RELAXED) == 0)
		priv->obj_ops.ind_table_destroy(ind_tbl);
	for (i = 0; i != ind_tbl->queues_n; ++i)
		claim_nonzero(mlx5_rxq_release(dev, ind_tbl->queues[i]));
	if (__atomic_load_n(&ind_tbl->refcnt, __ATOMIC_RELAXED) == 0) {
		if (!standalone)
			LIST_REMOVE(ind_tbl, next);
		mlx5_free(ind_tbl);
		return 0;
	}
	return 1;
}
int mlx5_ind_table_obj_release ( struct rte_eth_dev * dev , struct mlx5_ind_table_obj * ind_tbl , bool standalone ) { struct mlx5_priv * priv = dev -> data -> dev_private ; unsigned int i ; if ( __atomic_sub_fetch ( & ind_tbl -> refcnt , 1 , __ATOMIC_RELAXED ) == 0 ) priv -> obj_ops . ind_table_destroy ( ind_tbl ) ; for ( i = 0 ; i != ind_tbl -> queues_n ; ++ i ) claim_nonzero ( mlx5_rxq_release ( dev , ind_tbl -> queues [ i ] ) ) ; if ( __atomic_load_n ( & ind_tbl -> refcnt , __ATOMIC_RELAXED ) == 0 ) { if ( ! standalone ) LIST_REMOVE ( ind_tbl , next ) ; mlx5_free ( ind_tbl ) ; return 0 ; } return 1 ; }
Release an indirection table.
Release an indirection table .