src/dpdk/drivers/net/mvpp2/mrvl_flow.c
static int
mrvl_flow_flush(struct rte_eth_dev *dev, struct rte_flow_error *error)
{
	struct mrvl_priv *priv = dev->data->dev_private;

	while (!LIST_EMPTY(&priv->flows)) {
		struct rte_flow *flow = LIST_FIRST(&priv->flows);
		int ret = mrvl_flow_remove(priv, flow, error);
		if (ret)
			return ret;

		LIST_REMOVE(flow, next);
		rte_free(flow);
	}

	if (priv->cls_tbl) {
		pp2_cls_tbl_deinit(priv->cls_tbl);
		priv->cls_tbl = NULL;
	}

	return 0;
}
/**
 * DPDK flow flush callback called when flows are to be flushed.
 *
 * @param dev Pointer to the device.
 * @param error Pointer to the flow error.
 * @returns 0 in case of success, negative value otherwise.
 */
DPDK flow flush callback called when flows are to be flushed.
@param dev Pointer to the device.
@param error Pointer to the flow error.
@returns 0 in case of success, negative value otherwise.
DPDK flow flush callback called when flows are to be flushed . @param dev Pointer to the device . @param error Pointer to the flow error . @returns 0 in case of success negative value otherwise .
static int
mrvl_flow_flush(struct rte_eth_dev *dev, struct rte_flow_error *error)
{
	struct mrvl_priv *priv = dev->data->dev_private;
	while (!LIST_EMPTY(&priv->flows)) {
		struct rte_flow *flow = LIST_FIRST(&priv->flows);
		int ret = mrvl_flow_remove(priv, flow, error);
		if (ret)
			return ret;
		LIST_REMOVE(flow, next);
		rte_free(flow);
	}
	if (priv->cls_tbl) {
		pp2_cls_tbl_deinit(priv->cls_tbl);
		priv->cls_tbl = NULL;
	}
	return 0;
}
static int mrvl_flow_flush ( struct rte_eth_dev * dev , struct rte_flow_error * error ) { struct mrvl_priv * priv = dev -> data -> dev_private ; while ( ! LIST_EMPTY ( & priv -> flows ) ) { struct rte_flow * flow = LIST_FIRST ( & priv -> flows ) ; int ret = mrvl_flow_remove ( priv , flow , error ) ; if ( ret ) return ret ; LIST_REMOVE ( flow , next ) ; rte_free ( flow ) ; } if ( priv -> cls_tbl ) { pp2_cls_tbl_deinit ( priv -> cls_tbl ) ; priv -> cls_tbl = NULL ; } return 0 ; }
DPDK flow flush callback called when flows are to be flushed.
DPDK flow flush callback called when flows are to be flushed .