From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 7522B41EB1; Thu, 16 Mar 2023 16:26:55 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 66DDF42D4B; Thu, 16 Mar 2023 16:26:55 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id 04D1440DF6 for ; Thu, 16 Mar 2023 16:26:53 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1678980413; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=xZGqNjdX8WhzRhYCgPb0LJ+9qNcQ0YSjHWb7bjM+B2Q=; b=UMGdn1cwM7q3DBFOTooF47AV7ZSru9pl4oXt2sA7tc4OjVto9eDPiQgS2J/d72F/H13qS0 qsc9xzWF4v5wG+MXeFqeMTRK9MNNl2YskYVOQBNGzDFywXtT5AMI6jOSNcwhXDr/mb9uMa z7TQOhl00p1JshQX2X2naCdTrhRRMpI= Received: from mail-pf1-f197.google.com (mail-pf1-f197.google.com [209.85.210.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-117-mNxt_G8gMU-xll0VZWYCyg-1; Thu, 16 Mar 2023 11:26:50 -0400 X-MC-Unique: mNxt_G8gMU-xll0VZWYCyg-1 Received: by mail-pf1-f197.google.com with SMTP id j9-20020aa79289000000b00625894ca452so1292941pfa.22 for ; Thu, 16 Mar 2023 08:26:50 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678980409; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=xZGqNjdX8WhzRhYCgPb0LJ+9qNcQ0YSjHWb7bjM+B2Q=; b=sPDeD7l0ff55YEAyLLHBUFzDgAZT2SLcVw9eIqHN7mvwSLQIGis1W+rJ5Dt12A4Aey 3iRfvHfO1yxy3oOgurO6pwVMBVzqiScK28W5fE3Oy9HdfFCuz7CCcxtqOoJLTXO/s0OH 9NCq8Xn7USySOhah78YtixRzFOuzS5PA4rfj8KtHTBj2XBDRVu94ROjwxcBKE56sjEkf 2CJK/0eZEiQb6jPCFhD3bgeySGS5mqK57XEKdU5jc6Q81zujt6lMiajs6OXy3kuWqrtA XmUnG1+fI3yIRDbaMNOpYsCkmVrWDHhyCfABPxodT7kxJYdjNf+x+udZFgp1zdGdBBQM VhvA== X-Gm-Message-State: AO0yUKVYqsBUpadIl+XIvUW5VxxW0BNZEOX5M5DH7w8sKYhZUWVU/30a ozBq388ymrOz2aNzSS1vaXshGDVdKBbU8+mpnR/3ScbQ3d5TvyFTbpe8OG6GlyYN8fB8LxLS9uA dfVbYCiOW9eg4emsL4ns= X-Received: by 2002:a65:4489:0:b0:50a:c1b3:ed55 with SMTP id l9-20020a654489000000b0050ac1b3ed55mr1014666pgq.11.1678980409377; Thu, 16 Mar 2023 08:26:49 -0700 (PDT) X-Google-Smtp-Source: AK7set//+PYXw1iRVN+b5afPUOS5982fxO3LAn8SXOq+OP6oIpTqCFc8zR4qql2gXd08Ce3nL9+UzbULYZoCFuctefA= X-Received: by 2002:a65:4489:0:b0:50a:c1b3:ed55 with SMTP id l9-20020a654489000000b0050ac1b3ed55mr1014656pgq.11.1678980409045; Thu, 16 Mar 2023 08:26:49 -0700 (PDT) MIME-Version: 1.0 References: <20230306065156.3759-1-zobin1999@gmail.com> In-Reply-To: <20230306065156.3759-1-zobin1999@gmail.com> From: David Marchand Date: Thu, 16 Mar 2023 16:26:38 +0100 Message-ID: Subject: Re: [PATCH] app/test: fix data length of each packet segment To: Zhuobin Huang Cc: dev@dpdk.org, cunming.liang@intel.com, ci@dpdk.org, Thomas Monjalon X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On Mon, Mar 6, 2023 at 7:52=E2=80=AFAM Zhuobin Huang = 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 size= s") > Cc: cunming.liang@intel.com > > Signed-off-by: Zhuobin Huang Reviewed-by: David Marchand 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=3Dpmd_perf_autotest ./build-gcc/app/test/dpdk-test --no-huge -m 2048 --vdev=3Dnet_null0 --vdev=3Dnet_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. --=20 David Marchand