DPDK patches and discussions
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: <skori@marvell.com>
Cc: Thomas Monjalon <thomas@monjalon.net>,
	Ferruh Yigit <ferruh.yigit@amd.com>,
	Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>, <dev@dpdk.org>
Subject: Re: [PATCH] ethdev: remove callback checks from fast path
Date: Tue, 29 Apr 2025 16:59:53 -0700	[thread overview]
Message-ID: <20250429165953.0ff82613@hermes.local> (raw)
In-Reply-To: <20250429181132.2544771-1-skori@marvell.com>

On Tue, 29 Apr 2025 23:41:30 +0530
<skori@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.


      parent reply	other threads:[~2025-04-29 23:59 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-29 18:11 skori
2025-04-29 23:55 ` Stephen Hemminger
2025-04-29 23:59 ` Stephen Hemminger [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250429165953.0ff82613@hermes.local \
    --to=stephen@networkplumber.org \
    --cc=andrew.rybchenko@oktetlabs.ru \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@amd.com \
    --cc=skori@marvell.com \
    --cc=thomas@monjalon.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).