From: yangxingui <yangxingui@huawei.com>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: <dev@dpdk.org>, <david.marchand@redhat.com>,
<aman.deep.singh@intel.com>, <fengchengwen@huawei.com>,
<lihuisong@huawei.com>, <liuyonglong@huawei.com>,
<kangfenglong@huawei.com>
Subject: Re: [PATCH v3] app/testpmd: support runt and ultra-small frames in txonly
Date: Thu, 23 Jul 2026 12:00:40 +0800 [thread overview]
Message-ID: <2fd6e7d8-7679-2c7e-5716-ccc20550ded0@huawei.com> (raw)
In-Reply-To: <20260722152256.16fa03a9@phoenix.local>
On 2026/7/23 6:22, Stephen Hemminger wrote:
> On Mon, 6 Jul 2026 21:20:50 +0800
> Xingui Yang <yangxingui@huawei.com> wrote:
>
>> Allow set txpkts to accept packet lengths as small as one byte,
>> enabling generation of runt frames and ultra-small packets for
>> testing NIC padding logic and undersized frame handling.
>>
>> The txonly engine handles three ranges: normal (>= 42 bytes) with
>> full Ethernet/IPv4/UDP headers, runt (14-41 bytes) with truncated
>> headers, and ultra-small (< 14 bytes) filled with a repeating
>> pattern. Checksum offloads are disabled when headers are incomplete.
>>
>> Minimum length validation in set_tx_pkt_segments() is relaxed from
>> 42 to 1 byte. Random split and multi-flow still require the full
>> header stack in the first segment, as enforced by tx_only_begin().
>>
>> Signed-off-by: Xingui Yang <yangxingui@huawei.com>
>> Suggested-by: Stephen Hemminger <stephen@networkplumber.org>
>> ---
>
> I would suggest that if NIC ever gets a packet < ethernet header it is
> an application bug, and driver should drop it as an transmit error.
> Or crash with an assert failed. There is no guarantee that this
> will ever work.
>
> Therefore can not see why testpmd needs to do this.
>
> For packets with Ethernet header plus a few more bytes, it makes
> sense to allow. There are always control level protocols that are
> very short.
Haha, I think you're right. We have an internal test case for
ultra-short packets to verify hardware capabilities, and this test case
has been around for many years. We have maintained this private patch
separately for many years. It's possible that other network cards might
not have such a requirement.
Thanks.
Xingui
prev parent reply other threads:[~2026-07-23 4:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-06 13:20 [PATCH v3] app/testpmd: support runt and ultra-small frames in txonly Xingui Yang
2026-07-22 22:22 ` Stephen Hemminger
2026-07-23 4:00 ` yangxingui [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=2fd6e7d8-7679-2c7e-5716-ccc20550ded0@huawei.com \
--to=yangxingui@huawei.com \
--cc=aman.deep.singh@intel.com \
--cc=david.marchand@redhat.com \
--cc=dev@dpdk.org \
--cc=fengchengwen@huawei.com \
--cc=kangfenglong@huawei.com \
--cc=lihuisong@huawei.com \
--cc=liuyonglong@huawei.com \
--cc=stephen@networkplumber.org \
/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