DPDK CI discussions
 help / color / mirror / Atom feed
* Re: [PATCH] app/test: fix data length of each packet segment
       [not found] <20230306065156.3759-1-zobin1999@gmail.com>
@ 2023-03-16 15:26 ` David Marchand
  0 siblings, 0 replies; only message in thread
From: David Marchand @ 2023-03-16 15:26 UTC (permalink / raw)
  To: Zhuobin Huang; +Cc: dev, cunming.liang, ci, Thomas Monjalon

On Mon, Mar 6, 2023 at 7:52 AM Zhuobin Huang <zobin1999@gmail.com> wrote:
>
> Assign correct data length to each segments according
> to the given pkt_len and nb_pkt_segs, instead of
> using pkt_len as the data_len of every packet segment
>
> Fixes: a9c9e9698d5e ("app/test: allow to create packets of different sizes")
> Cc: cunming.liang@intel.com
>
> Signed-off-by: Zhuobin Huang <zobin1999@gmail.com>

Reviewed-by: David Marchand <david.marchand@redhat.com>

Good catch.
I am curious to know how you noticed the issue since I see no in-tree
code asking for multiseg.


For the record, to check this patch, I compiled with
-DRTE_LIBRTE_MBUF_DEBUG and a small modification:

diff --git a/app/test/test_pmd_perf.c b/app/test/test_pmd_perf.c
index ff84d251ff..5c670ff165 100644
--- a/app/test/test_pmd_perf.c
+++ b/app/test/test_pmd_perf.c
@@ -209,7 +209,7 @@ init_traffic(struct rte_mempool *mp,
        return generate_packet_burst(mp, pkts_burst, &pkt_eth_hdr,
                                     0, &pkt_ipv4_hdr, 1,
                                     &pkt_udp_hdr, burst_size,
-                                    PACKET_BURST_GEN_PKT_LEN, 1);
+                                    PACKET_BURST_GEN_PKT_LEN, 2);
 }

 static int


Before the fix:

DPDK_TEST=pmd_perf_autotest ./build-gcc/app/test/dpdk-test --no-huge
-m 2048  --vdev=net_null0 --vdev=net_null1
...
Generate 4096 packets @socket 0
inject 2048 packet to port 0
PANIC in rte_mbuf_sanity_check():
bad pkt_len


Cc: ci@ in general, we should have more tests run with debug/check
options enabled.


-- 
David Marchand


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-03-16 15:26 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20230306065156.3759-1-zobin1999@gmail.com>
2023-03-16 15:26 ` [PATCH] app/test: fix data length of each packet segment David Marchand

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).