src/dpdk/drivers/net/mlx4/mlx4.c
static int
mlx4_dev_stop(struct rte_eth_dev *dev)
{
	struct mlx4_priv *priv = dev->data->dev_private;

	if (!priv->started)
		return 0;
	DEBUG("%p: detaching flows from all RX queues", (void *)dev);
	priv->started = 0;
	dev->tx_pkt_burst = mlx4_tx_burst_removed;
	dev->rx_pkt_burst = mlx4_rx_burst_removed;
	rte_wmb();
	/* Disable datapath on secondary process. */
	mlx4_mp_req_stop_rxtx(dev);
	mlx4_flow_sync(priv, NULL);
	mlx4_rxq_intr_disable(priv);
	mlx4_rss_deinit(priv);

	return 0;
}
/**
 * DPDK callback to stop the device.
 *
 * Simulate device stop by detaching all configured flows.
 *
 * @param dev
 *   Pointer to Ethernet device structure.
 */
DPDK callback to stop the device.
Simulate device stop by detaching all configured flows.

@param dev
Pointer to Ethernet device structure.
DPDK callback to stop the device . Simulate device stop by detaching all configured flows . @param dev Pointer to Ethernet device structure .
static int
mlx4_dev_stop(struct rte_eth_dev *dev)
{
	struct mlx4_priv *priv = dev->data->dev_private;
	if (!priv->started)
		return 0;
	DEBUG("%p: detaching flows from all RX queues", (void *)dev);
	priv->started = 0;
	dev->tx_pkt_burst = mlx4_tx_burst_removed;
	dev->rx_pkt_burst = mlx4_rx_burst_removed;
	rte_wmb();
	mlx4_mp_req_stop_rxtx(dev);
	mlx4_flow_sync(priv, NULL);
	mlx4_rxq_intr_disable(priv);
	mlx4_rss_deinit(priv);
	return 0;
}
static int mlx4_dev_stop ( struct rte_eth_dev * dev ) { struct mlx4_priv * priv = dev -> data -> dev_private ; if ( ! priv -> started ) return 0 ; DEBUG ( " " , ( void * ) dev ) ; priv -> started = 0 ; dev -> tx_pkt_burst = mlx4_tx_burst_removed ; dev -> rx_pkt_burst = mlx4_rx_burst_removed ; rte_wmb ( ) ; mlx4_mp_req_stop_rxtx ( dev ) ; mlx4_flow_sync ( priv , NULL ) ; mlx4_rxq_intr_disable ( priv ) ; mlx4_rss_deinit ( priv ) ; return 0 ; }
DPDK callback to stop the device.
DPDK callback to stop the device .
/* Disable datapath on secondary process. */