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 C7F7E471EC; Mon, 12 Jan 2026 05:54:07 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A711740693; Mon, 12 Jan 2026 05:54:07 +0100 (CET) Received: from mail-ed1-f52.google.com (mail-ed1-f52.google.com [209.85.208.52]) by mails.dpdk.org (Postfix) with ESMTP id A54574013F for ; Mon, 12 Jan 2026 05:54:05 +0100 (CET) Received: by mail-ed1-f52.google.com with SMTP id 4fb4d7f45d1cf-6505d3adc3aso9419022a12.1 for ; Sun, 11 Jan 2026 20:54:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1768193645; x=1768798445; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=g4PuEP5S/MZnc0WdyV7NuiYG426/3sQBFxrZffnrxXs=; b=WvUPLVGghxph7Vz0dHG/JwcQdfCLfAaIMVGfYr3ohIT1bJpScv8LQJGCTM2AvWcw6w YlgAiZSewXTJMBST9KApetcTq3aiN+4xcu8W5CT3l2yl8sjZ1/3J8JWSbMczcwKHfkag 4jvcP4sE8fRAQ/ECUidIXSyYzvdIrAIn0rVUzQ9QOapFpgOpCzqNwuXu8Bf5UaIeXdCu L12DoEWKbcCQ/ZI/n/6tCYnL+qjAxA7OMG8iECj1qdNLpC467e0vx/YXmuXtGf+xl7HB QqtBGLm572cK8R1xcbE27sJZKRhI7YXxYCjzAb1q9zUpMHs1EYSVmkR27qyksfTzxxxm fPFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768193645; x=1768798445; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:sub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+ke50al8h09U7dhQ8yMt8KumSCHM4pdhBB+ysjsTGOskj+pg== X-Google-Smtp-Source: AGHT+IFayJDMQvjWZuo6WrDdqQicX+yV0YvFK7chFftlkGnRZWXx598qbG0dwWEsNP1oj3ri+hYLFw== X-Received: by 2002:a17:907:7846:b0:b84:569b:5b6e with SMTP id a640c23a62f3a-b84569b61d5mr1011816466b.41.1768193645040; Sun, 11 Jan 2026 20:54:05 -0800 (PST) Received: from phoenix.lan (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-b86f9a9103bsm534327166b.30.2026.01.11.20.54.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 11 Jan 2026 20:54:04 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger Subject: [PATCH v3 0/7] pcapng: fixes and improvements Date: Sun, 11 Jan 2026 20:50:13 -0800 Message-ID: <20260112045359.142999-1-stephen@networkplumber.org> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20251126051218.50568-1-stephen@networkplumber.org> References: <20251126051218.50568-1-stephen@networkplumber.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 This series addresses several issues in the pcapng library and improves test coverage. Several of these patches were submitted previously in other series but have been more throughly tested and passed AI review. Bug Fixes: Patches 1-3 fix potential issues with string handling in the pcapng administrative APIs. The pcapng file format uses 16-bit length fields for option data, but the library did not validate input string lengths, and used fixed-size stack buffers that could be overrun by large comments or metadata strings. Patch 1 adds length validation against the format's 16-bit limit Patch 2 replaces fixed stack buffers with dynamic allocation Patch 3 handles the case where comment options exceed available mbuf tailroom by chaining an additional mbuf segment Test Improvements: Patches 4-6 improve the pcapng unit test coverage: Patch 4 exercises the comment option code path with varied test strings Patch 5 varies packet sizes to exercise more of the copy logic Patch 6 ensures the test runs long enough to verify 32-bit TSC wraparound handling Performance: Patch 7 optimizes timestamp conversion by replacing division operations with shift-multiply arithmetic, following the approach used by the Linux kernel vDSO. This eliminates expensive divides from the packet capture hot path. Stephen Hemminger (7): pcapng: add length checks to string arguments pcapng: use malloc instead of fixed buffer size pcapng: add additional mbuf if space required on copy test: add more tests for comments in pcapng test: vary size of packets in pcapng test test: increase gap in pcapng test pcapng: improve performance of timestamping app/test/test_pcapng.c | 134 ++++++++++++++++++++++++++---------- lib/pcapng/rte_pcapng.c | 147 +++++++++++++++++++++++++++++----------- lib/pcapng/rte_pcapng.h | 8 ++- 3 files changed, 211 insertions(+), 78 deletions(-) -- 2.51.0