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 393B145BFE for ; Mon, 28 Oct 2024 17:59:36 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 344CB41060; Mon, 28 Oct 2024 17:59:36 +0100 (CET) Received: from mail-yb1-f169.google.com (mail-yb1-f169.google.com [209.85.219.169]) by mails.dpdk.org (Postfix) with ESMTP id C475041060 for ; Mon, 28 Oct 2024 17:59:34 +0100 (CET) Received: by mail-yb1-f169.google.com with SMTP id 3f1490d57ef6-e2bd7d8aaf8so4460822276.3 for ; Mon, 28 Oct 2024 09:59:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1730134774; x=1730739574; darn=dpdk.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=OncVvivxKi42fZWwm1Ox1hWbEl9WNoRXmBJGhj7ivb0=; b=k2xCfegrGPAOLUcp650HPh0t++y3ol2grQQxFP/nFFLvoZrMyJvLfQCq/G4Hz2FaRG D3Mad++QrL3FlmG5wg+Gf8uaBE38qBq/QLejQTA1ErD+F63TTspbkfDQp3inK1b0+rmP ay7wSOYXiVNcQVBNnhIg3UU9P+DffDTXdB7oggs9LprDe4YGYBtb8QTezmrqLSyBFS9c eGSUtCeiWRP37hY9R6VNeQEmu7808Sz2XbvcH+faYHHqRDOeHQEn+eQilb7hpvEmhzc2 JUvQFi38LAvsMG45NPfGFy6yBfw9P1XQtVCNmpzETPcDuhV0Grn/4vUgGOjFgFcNIEok nkgQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730134774; x=1730739574; h=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=OncVvivxKi42fZWwm1Ox1hWbEl9WNoRXmBJGhj7ivb0=; b=RJDWD0FJViWoObZcevhDzN0FNw2fXxp8PTifw/4TtYXu+DAMzaLO0m+GH0ECGUCnFL yNBQ4ayFns5OoQkmb5ItvL0DgTVhpTShLNmzrR6+CPvGzvKvKJfZGG1WLDsXPuVNlw/H pVuXOf8zURSO90/fDyFTZNga6IM/sVJVC8vNrzJRBVURyway2wW1nj2WXQsKEfV3Bkas 4mFHXEO0CNZ7K+JBK2glWMZGPerjrquoeX/NyqUYO688vLURdQcNzfrBS3GgIdMW8ZVk JqHtLSEqpCIRnoLxy2JvdDHQXy2N5yr2q90VIMqN8KbLXSCASyacqIjPv02ztzG1oGs7 WlPw== X-Gm-Message-State: AOJu0YxTfxQWP3uu1DnMiUvBXJrKz62yqv5kfl5s3fOHRWkLFuiX76c6 q2BOCvpSguMWhTWXMTTAtGTyrMK4qxQrXh1COGHWYCW8wJHNbJNos64Ph8cdDv9COqEsREEwlid 0drgtmIpXNiWOl0UNUJGflvK+XDU= X-Google-Smtp-Source: AGHT+IF76KuSRTED+Z5E1GlbzaG8MHX/oAGAfN61Szwk7RmD2cj44VBALhins2B6yzbBfEVMNzfsoqOBXMW39v+z/hw= X-Received: by 2002:a05:690c:18:b0:6e3:d4e3:b9ad with SMTP id 00721157ae682-6e9d8ab2300mr83258847b3.33.1730134774068; Mon, 28 Oct 2024 09:59:34 -0700 (PDT) MIME-Version: 1.0 References: <20241028140044.278128-1-oleksandrn@interfacemasters.com> In-Reply-To: <20241028140044.278128-1-oleksandrn@interfacemasters.com> From: Luca Boccassi Date: Mon, 28 Oct 2024 16:59:22 +0000 Message-ID: Subject: Re: [PATCH 22.11] pcapng: fix handling of chained mbufs To: Oleksandr Nahnybida Cc: stable@dpdk.org, stephen@networkplumber.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org On Mon, 28 Oct 2024 at 14:03, Oleksandr Nahnybida wrote: > > [ upstream commit 6db358536fee7891b5cb670df94ec87543ddd0fb ] > > The pcapng generates corrupted files when dealing with chained mbufs. > This issue arises because in rte_pcapng_copy the length of the EPB block > is incorrectly calculated using the data_len of the first mbuf instead > of the pkt_len, despite that rte_pcapng_write_packets correctly writing > the mbuf chain to disk. > > This fix ensures that the block length is calculated based on the pkt_len, > aligning it with the actual data written to disk. > > Fixes: 8d23ce8f5ee9 ("pcapng: add new library for writing pcapng files") > > Signed-off-by: Oleksandr Nahnybida > --- > app/test/test_pcapng.c | 10 +++++++++- > lib/pcapng/rte_pcapng.c | 12 ++++++------ > 2 files changed, 15 insertions(+), 7 deletions(-) Thanks, applied