On Tue, 29 Apr 2025 23:41:30 +0530
<sk...@marvell.com> wrote:

>  
> +static inline void
> +rte_eth_set_dummy_fops(struct rte_eth_dev *eth_dev)

Not fastpath, do not add inline here

> +{
> +     eth_dev->rx_pkt_burst = rte_eth_pkt_burst_dummy;
> +     eth_dev->tx_pkt_burst = rte_eth_pkt_burst_dummy;
> +     eth_dev->tx_pkt_prepare = rte_eth_tx_pkt_prepare_dummy;
> +     eth_dev->rx_queue_count = rte_eth_rx_queue_count_dummy;
> +     eth_dev->tx_queue_count = rte_eth_tx_queue_count_dummy;
> +     eth_dev->rx_descriptor_status = rte_eth_descriptor_status_dummy;
> +     eth_dev->tx_descriptor_status = rte_eth_descriptor_status_dummy;
> +     eth_dev->recycle_tx_mbufs_reuse = rte_eth_recycle_tx_mbufs_reuse_dummy;
> +     eth_dev->recycle_rx_descriptors_refill = 
> rte_eth_recycle_rx_descriptors_refill_dummy;
> +}
> +
>  /**
>   * Copy pci device info to the Ethernet device data.
>   * Shared memory (eth_dev->data) only updated by primary process, so it is 
> safe
> @@ -147,6 +161,11 @@ rte_eth_dev_pci_generic_probe(struct rte_pci_device 
> *pci_dev,
>       if (!eth_dev)
>               return -ENOMEM;
>  
> +     /* Update fast path ops with dummy callbacks. Driver will update
> +      * them with required callbacks in the init function.
> +      */
> +     rte_eth_set_dummy_fops(eth_dev);
> +

What about non PCI ethdev's?
And in PCI devices there is lots of duplicated code already initilizes these.
Needs to be consolidated and documented. Actually the whole probe process needs 
more documentation.

Also need to make sure secondary process setup is not broken.

Reply via email to