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 512D741EB1 for ; Thu, 16 Mar 2023 16:26:54 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4B9E842D53; Thu, 16 Mar 2023 16:26:54 +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 3317440DF6 for ; Thu, 16 Mar 2023 16:26:52 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1678980411; 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=f3GQGqaWvdWP28XJ+nRxgHgqSjrE2YCePUXFcllYzK1+n4BYuLtgq8SOn15B/sjdrHZiZX Ud35mDcGkWzQYz0jRvyDrSVa4/vtllzBjTkx4EuCwtz3j8I2D1NzTn5gbQU9kB1mxqUA81 gi+Kuo87ocSRggXkrRShjtNcEh/Cl7c= Received: from mail-pj1-f72.google.com (mail-pj1-f72.google.com [209.85.216.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-117-lOXL2hXhNtiF9K-wlR3Kpg-1; Thu, 16 Mar 2023 11:26:50 -0400 X-MC-Unique: lOXL2hXhNtiF9K-wlR3Kpg-1 Received: by mail-pj1-f72.google.com with SMTP id m9-20020a17090a7f8900b0023769205928so2682611pjl.6 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=SIOoHqiJr0plsFDsox1ailuFMMMnt24U5HArr52ohL3EM44aPwwwXuQCG5jWu2Fqak McB2cxh+5bBioGV8ipHYaZAZk/eLRg0g6aihfDie30CDp+H59s2tSEiUUZKsn89jiBSa S37oWs61N+Tbi9X+eFPPw6tsrlzdK9OQibR19kudTvfWUrIgKEfueHXVvqkGSZ/L/RE0 gZlV85YyPa9aqK94VBuzRsEvNElIwqkooZ68F/n8ajDVt5xonYRv2pphgsaUDQoBGy5u 9qW4nKHKX/+E+PAB4Ca3JYa3QXBTtXI0AJa8v3CphgLG9mcnevkJTsulIX0WhZh/2PpI 57DA== X-Gm-Message-State: AO0yUKUUq2YhMN+T4zPtJVD5fp4U9xzN7xiUCOPn30r5qxv5uRaOY6k3 iHp9WiGq9/9m/9PQ6WUMJ6EN+H2kUfEe2lxTFDErCDTyUCPENIN/W3ksydaxN9C9KcJCwZV0VX+ 0/HhlYF5/gRg3+r29yg== X-Received: by 2002:a65:4489:0:b0:50a:c1b3:ed55 with SMTP id l9-20020a654489000000b0050ac1b3ed55mr1014665pgq.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: ci@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK CI discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ci-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