From: "Morten Brørup" <mb@smartsharesystems.com>
To: "Sunil Kumar Kori" <skori@marvell.com>,
"Thomas Monjalon" <thomas@monjalon.net>,
"Ferruh Yigit" <ferruh.yigit@amd.com>,
"Andrew Rybchenko" <andrew.rybchenko@oktetlabs.ru>,
"Stephen Hemminger" <stephen@networkplumber.org>
Cc: <dev@dpdk.org>
Subject: RE: [PATCH] ethdev: remove callback checks from fast path
Date: Wed, 30 Apr 2025 09:26:51 +0200 [thread overview]
Message-ID: <98CBD80474FA8B44BF855DF32C47DC35E9FC16@smartserver.smartshare.dk> (raw)
In-Reply-To: <20250429181132.2544771-1-skori@marvell.com>
> From: Sunil Kumar Kori <skori@marvell.com>
> Sent: Tuesday, 29 April 2025 20.12
>
> rte_eth_fp_ops contains ops for fast path APIs. Each API
> validates availability of callback and then invoke it.
>
> Removing these NULL checks instead using dummy callbacks.
The description should mention the motivation for this patch: mbuf recycling performance optimization.
A few nits below.
> +RTE_EXPORT_INTERNAL_SYMBOL(rte_eth_rx_queue_count_dummy)
> +uint32_t
> +rte_eth_rx_queue_count_dummy(void *queue __rte_unused)
> +{
> + return -ENOTSUP;
> +}
Instead of type casting back and forth, change the type of the RX queue count callback [1]:
-typedef uint32_t (*eth_rx_queue_count_t)(void *rxq);
+typedef int (*eth_rx_queue_count_t)(void *rxq);
So it resembles the TX queue count callback, eth_tx_queue_count_t, which already returns int.
[1]: https://elixir.bootlin.com/dpdk/v25.03/source/lib/ethdev/rte_ethdev_core.h#L48
Although my suggestion is formally an API change, I suppose changing from unsigned to signed should be acceptable.
> +RTE_EXPORT_INTERNAL_SYMBOL(rte_eth_recycle_rx_descriptors_refill_dummy
> )
> +void
> +rte_eth_recycle_rx_descriptors_refill_dummy(void *queue __rte_unused,
> + uint16_t nb __rte_unused)
> +{
> +
This empty line looks strange. Perhaps add a comment /* No action. */ to indicate that no code is missing here.
> +}
next prev parent reply other threads:[~2025-04-30 7:26 UTC|newest]
Thread overview: 8+ 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
2025-04-30 7:26 ` Morten Brørup [this message]
2025-05-12 15:07 ` [PATCH v2 1/2] ethdev: remove unnecessary type conversion skori
2025-05-12 15:07 ` [PATCH v2 2/2] ethdev: remove callback checks from fast path skori
2025-05-12 16:12 ` Morten Brørup
2025-05-12 16:04 ` [PATCH v2 1/2] ethdev: remove unnecessary type conversion Morten Brørup
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=98CBD80474FA8B44BF855DF32C47DC35E9FC16@smartserver.smartshare.dk \
--to=mb@smartsharesystems.com \
--cc=andrew.rybchenko@oktetlabs.ru \
--cc=dev@dpdk.org \
--cc=ferruh.yigit@amd.com \
--cc=skori@marvell.com \
--cc=stephen@networkplumber.org \
--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).