[PATCH v4 09/15] net/xsc: add ethdev start

Stephen Hemminger stephen at networkplumber.org
Fri Jan 3 20:17:58 CET 2025


On Fri, 03 Jan 2025 23:04:23 +0800
"WanRenyong" <wanry at yunsilicon.com> wrote:

> +static int
> +xsc_ethdev_start(struct rte_eth_dev *dev)
> +{
> +	int ret;
> +	struct xsc_ethdev_priv *priv = TO_XSC_ETHDEV_PRIV(dev);
> +
> +	ret = xsc_txq_start(priv);
> +	if (ret) {
> +		PMD_DRV_LOG(ERR, "Port %u txq start failed: %s",
> +			    dev->data->port_id, strerror(rte_errno));
> +		goto error;
> +	}
> +
> +	ret = xsc_rxq_start(priv);
> +	if (ret) {
> +		PMD_DRV_LOG(ERR, "Port %u Rx queue start failed: %s",
> +			    dev->data->port_id, strerror(rte_errno));
> +		goto error;
> +	}
> +
> +	dev->data->dev_started = 1;
> +
> +	rte_wmb();

In general, it is preferred that DPDK drivers use rte_atomic to get
finer grain control over shared variables. Rather than using volatile
and barriers.  This is not an absolute requirement, but something
that is preferred and improves performance on weakly ordered platforms.


More information about the dev mailing list