[PATCH v12 02/13] net/sxe: add ethdev probe and remove
Stephen Hemminger
stephen at networkplumber.org
Sat Oct 25 00:14:04 CEST 2025
On Mon, 28 Jul 2025 17:05:06 +0800
liujie5 at linkdatatechnology.com wrote:
> +static s32 sxe_dev_start(struct rte_eth_dev *dev)
> +{
> + s32 ret;
> + struct sxe_adapter *adapter = dev->data->dev_private;
> + struct sxe_hw *hw = &adapter->hw;
> + struct rte_pci_device *pci_dev = RTE_ETH_DEV_TO_PCI(dev);
> + struct rte_intr_handle *handle = SXE_PCI_INTR_HANDLE(pci_dev);
> + struct sxe_irq_context *irq = &adapter->irq_ctxt;
> +
> + ret = sxe_fw_time_sync(hw);
> +
> + rte_intr_disable(handle);
> +
> + ret = sxe_hw_reset(hw);
> + if (ret < 0) {
> + PMD_LOG_ERR(INIT, "hw init failed, ret=%d", ret);
> + goto l_end;
> + }
> +
> + sxe_hw_start(hw);
> +
> + ret = sxe_irq_configure(dev);
> + if (ret) {
> + PMD_LOG_ERR(INIT, "irq config fail.");
> + goto l_error;
> + }
> +
> +l_end:
> + return ret;
> +
> +l_error:
> + PMD_LOG_ERR(INIT, "dev start err, ret=%d", ret);
> + sxe_irq_vec_free(handle);
> + ret = -EIO;
> + goto l_end;
> +}
> +
Since this device is supporting per-queue start/stop, it should support defer_start.
The semantic in DPDK is that when device is started, all non defered queues should be
auto started. Looks like this driver is assuming application will call tx/rx_queue_start
on each queue.
More information about the dev
mailing list