From: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
To: "Morten Brørup" <mb@smartsharesystems.com>,
"Sunil Kumar Kori" <skori@marvell.com>,
"Konstantin Ananyev" <konstantin.ananyev@huawei.com>
Cc: dev@dpdk.org, Thomas Monjalon <thomas@monjalon.net>,
Ferruh Yigit <ferruh.yigit@amd.com>
Subject: Re: [PATCH v2 2/2] ethdev: remove callback checks from fast path
Date: Sat, 26 Jul 2025 12:09:33 +0300 [thread overview]
Message-ID: <2858a9d1-894a-4e21-8a44-81bedfeb41c4@oktetlabs.ru> (raw)
In-Reply-To: <98CBD80474FA8B44BF855DF32C47DC35E9FCFC@smartserver.smartshare.dk>
On 6/16/25 17:30, Morten Brørup wrote:
>> From: Sunil Kumar Kori [mailto:skori@marvell.com]
>> Sent: Monday, 16 June 2025 10.36
>>
>>>>> From: Sunil Kumar Kori <skori@marvell.com>
>>>>> Sent: Monday, 12 May 2025 17.07
>>>>>
>>>>> rte_eth_fp_ops contains ops for fast path APIs. Each API validates
>>>>> availability of callback and then invoke it.
>>>>> These checks impact data path performace.
>>>>
>>>> Picking up the discussion from another thread [1]:
>>>>
>>>>> From: Konstantin Ananyev [mailto:konstantin.ananyev@huawei.com]
>>>>> Sent: Wednesday, 28 May 2025 11.14
>>>>>
>>>>> So what we are saving with that patch: one cmp and one un-taken branch:
>>>>> @@ -6399,8 +6399,6 @@ rte_eth_rx_queue_count(uint16_t port_id,
>>>>> uint16_t
>>>>> queue_id)
>>>>> return -EINVAL;
>>>>> #endif
>>>>>
>>>>> - if (p->rx_queue_count == NULL)
>>>>> - return -ENOTSUP;
>>>>> return p->rx_queue_count(qd);
>>>>> }
>>>>
>>>> These are inline functions, so we also save some code space,
>>>> instruction cache, and possibly an entry in the branch predictor -
>>>> everywhere these functions are instantiated by the compiler.
>>>>
>>>>>
>>>>> I wonder is how realistic (and measurable) is the gain?
>>>>
>>>> The performance optimization is mainly targeting the mbuf recycle
>>>> operations, i.e. the hot fast path, where every cycle counts.
>>>> And while optimizing those, the other ethdev fast path callbacks are
>>>> also optimized.
>>>>
>>>> Yes, although we all agree that there is no downside to this
>>>> optimization, it would be nice to see some performance numbers.
>>>>
>>> Sure, I will get performance numbers for Marvell platform and will share.
>>>
>>
>> Hi Morten,
>> I got performance numbers on multiple Marvell's platforms and observed gain
>> around 0.1% (~20K pps) with this patch. Other than this, there are other fast
>> path callbacks (rx_pkt_burst and tx_pkt_burst) which avoid this check.
I'm really impressed that 0.1% is measurable since it means that the
measurement results of different runs have higher order of stability.
>> IMO, this patch has no negative impact and slight improvement & cleanup the
>> fast path. Please suggest.
>
> I still like this patch, so I confirm my ACK:
>
> Acked-by: Morten Brørup <mb@smartsharesystems.com>
>
next prev parent reply other threads:[~2025-07-26 9:09 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-29 18:11 [PATCH] " skori
2025-04-29 23:55 ` Stephen Hemminger
2025-04-29 23:59 ` Stephen Hemminger
2025-04-30 7:26 ` Morten Brørup
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-28 9:35 ` Morten Brørup
2025-06-10 5:11 ` Sunil Kumar Kori
2025-06-16 8:36 ` Sunil Kumar Kori
2025-06-16 14:30 ` Morten Brørup
2025-07-26 9:09 ` Andrew Rybchenko [this message]
2025-07-26 9:15 ` Andrew Rybchenko
2025-05-12 16:04 ` [PATCH v2 1/2] ethdev: remove unnecessary type conversion Morten Brørup
2025-07-26 8:44 ` Andrew Rybchenko
2025-05-27 15:07 ` Stephen Hemminger
2025-05-27 16:24 ` Morten Brørup
2025-05-28 8:17 ` Konstantin Ananyev
2025-05-28 8:23 ` Konstantin Ananyev
2025-05-28 8:48 ` Morten Brørup
2025-05-28 9:14 ` Konstantin Ananyev
2025-05-28 9:39 ` Morten Brørup
2025-05-26 12:30 ` [EXTERNAL] [PATCH] ethdev: remove callback checks from fast path Jerin Jacob
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=2858a9d1-894a-4e21-8a44-81bedfeb41c4@oktetlabs.ru \
--to=andrew.rybchenko@oktetlabs.ru \
--cc=dev@dpdk.org \
--cc=ferruh.yigit@amd.com \
--cc=konstantin.ananyev@huawei.com \
--cc=mb@smartsharesystems.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).