From: Ferruh Yigit <ferruh.yigit@amd.com>
To: "Jerin Jacob" <jerinjacobk@gmail.com>,
"Morten Brørup" <mb@smartsharesystems.com>,
"Konstantin Ananyev" <konstantin.ananyev@huawei.com>
Cc: Kaiwen Deng <kaiwenx.deng@intel.com>,
dev@dpdk.org, stable@dpdk.org, qiming.yang@intel.com,
yidingx.zhou@intel.com, Aman Singh <aman.deep.singh@intel.com>,
Yuying Zhang <yuying.zhang@intel.com>,
David Marchand <david.marchand@redhat.com>
Subject: Re: [PATCH v2] app/testpmd: use Tx preparation in txonly engine
Date: Fri, 9 Feb 2024 19:18:45 +0000 [thread overview]
Message-ID: <b1ff72d7-465a-4149-9599-b0160dccd0e5@amd.com> (raw)
In-Reply-To: <CALBAE1PG690LhPNgEfVjeGu2rh=LkA5sE=zYmxOuZ6GopG4p-Q@mail.gmail.com>
On 2/8/2024 12:09 PM, Jerin Jacob wrote:
> On Thu, Feb 8, 2024 at 6:15 AM Ferruh Yigit <ferruh.yigit@amd.com> wrote:
>>
>> On 1/11/2024 5:25 AM, Kaiwen Deng wrote:
>>> Txonly forwarding engine does not call the Tx preparation API
>>> before transmitting packets. This may cause some problems.
>>>
>>> TSO breaks when MSS spans more than 8 data fragments. Those
>>> packets will be dropped by Tx preparation API, but it will cause
>>> MDD event if txonly forwarding engine does not call the Tx preparation
>>> API before transmitting packets.
>>>
>>
>> txonly is used commonly, adding Tx prepare for a specific case may
>> impact performance for users.
>>
>> What happens when driver throws MDD (Malicious Driver Detection) event,
>> can't it be ignored? As you are already OK to drop the packet, can
>> device be configured to drop these packages?
>>
>>
>> Or as Jerin suggested adding a new forwarding engine is a solution, but
>> that will create code duplication, I prefer to not have it if this can
>
> We don't need to have full-blown NEW need forwarding engine.
> Just that, we need to select correct ".packet_fwd" based on the
> offload requirements.
>
> It is easy to avoid code duplication by following without performance
> impact by moving the logic to compile time and use runtime to fix up
>
> static inline
> generic_tx_only_packet_forward(...., const unsigned flag)
> {
>
> #logic common for both packet forward
> #if (flag & NEED_PREPARE)
> prepare specific code
>
> }
>
> static
> generic_tx_only_packet_forward_without_prepare()
> {
> generic_tx_only_packet_forward(..., 0);
> }
>
> static
> generic_tx_only_packet_forward_with_prepare()
> {
> generic_tx_only_packet_forward(..., NEED_PREPARE);
> }
>
> Select the correct .packet_fwd in
> runtime(generic_tx_only_packet_forward_without_prepare() vs
> generic_tx_only_packet_forward_with_prepare())
>
+1 to not duplicate code, and I guess we can get requested mode as
testpmd parameter, but how can we avoid from performance impact,
checking mode in the .packet_fwd brings additional check per burst, and
we can't overwrite .packet_fwd.
prev parent reply other threads:[~2024-02-09 19:18 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-03 1:29 [PATCH v1] " Kaiwen Deng
2024-01-04 1:03 ` Stephen Hemminger
2024-01-04 5:52 ` Jerin Jacob
2024-01-11 5:25 ` [PATCH v2] " Kaiwen Deng
2024-01-11 6:34 ` lihuisong (C)
2024-01-11 16:57 ` Stephen Hemminger
2024-01-12 16:00 ` David Marchand
2024-02-08 0:07 ` Ferruh Yigit
2024-02-08 10:50 ` Konstantin Ananyev
2024-02-08 11:35 ` Ferruh Yigit
2024-02-08 15:14 ` Konstantin Ananyev
2024-02-08 11:52 ` Morten Brørup
2024-02-11 15:04 ` Konstantin Ananyev
2024-02-13 10:27 ` Morten Brørup
2024-02-22 18:28 ` Konstantin Ananyev
2024-02-23 8:36 ` Andrew Rybchenko
2024-02-26 13:26 ` Konstantin Ananyev
2024-02-26 13:56 ` Morten Brørup
2024-02-27 10:41 ` Konstantin Ananyev
2024-02-08 12:09 ` Jerin Jacob
2024-02-09 19:18 ` Ferruh Yigit [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=b1ff72d7-465a-4149-9599-b0160dccd0e5@amd.com \
--to=ferruh.yigit@amd.com \
--cc=aman.deep.singh@intel.com \
--cc=david.marchand@redhat.com \
--cc=dev@dpdk.org \
--cc=jerinjacobk@gmail.com \
--cc=kaiwenx.deng@intel.com \
--cc=konstantin.ananyev@huawei.com \
--cc=mb@smartsharesystems.com \
--cc=qiming.yang@intel.com \
--cc=stable@dpdk.org \
--cc=yidingx.zhou@intel.com \
--cc=yuying.zhang@intel.com \
/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).