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 DC0C8459B0; Tue, 17 Sep 2024 05:31:30 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 219AD40261; Tue, 17 Sep 2024 05:31:30 +0200 (CEST) Received: from mail-pl1-f180.google.com (mail-pl1-f180.google.com [209.85.214.180]) by mails.dpdk.org (Postfix) with ESMTP id D99714021F for ; Tue, 17 Sep 2024 05:31:28 +0200 (CEST) Received: by mail-pl1-f180.google.com with SMTP id d9443c01a7336-20570b42f24so54166765ad.1 for ; Mon, 16 Sep 2024 20:31:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1726543888; x=1727148688; 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=eDE6ipAB38gTq4Zgd7H3PlReYyW8goEqnn1eCGv+hxQ=; b=BeXt2cX1NTupNu/fDRFk1BvBYNeEr9+8kkkYJIr7oyp/6lo6P6O0hzkViXTlNd58nV xB9I4yhyLXYcKebKQvoIGQVsHE2+k6/YGw8bNXXo9efDEgv17iPvGXurG2GLSfJkDdhm O/ASXmstL6V8SGTWDxLvleyjlGknawIYDZpwhXFP6UZCnyQdbF3XC44I5Mx9I+aD9gr6 w0wNGpGPFBr9mXDyvjkyvEds7cLRzaXeKAdI4/pI0AstEHeJpx71IyrjbXBJ7tZOeh3Q DRYUvDtrWeQfDtOFzgGJhD1MWjamWJsaq8cEHjK9xVBWawhkYwOEOcAFfX9VwM1T3dQE 1w6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726543888; x=1727148688; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=eDE6ipAB38gTq4Zgd7H3PlReYyW8goEqnn1eCGv+hxQ=; b=PsqNZmaP1ragzqCydG8+rWSoDd8pqp+jLqeYdLC0lSJSwQFhNPMXW33R8zih+FJFWh 5YAm9jnrMF0mZ+Ijm+5iOjPViQhigsTuIV8bUc5F5N+fwUJ5n0RqJFJj+IlqXVkGIn6Y hyg3TUuMTl1V785qfCGn8cX5FH37DPtiLkhsGgleiYroubdWu75pLHt28Ew1QcN00QCR kQuAnDBeBNOoqqHfXh/f+kKnrsF2XRMS5ARJ6uf7+aFuNaolHAOY6azVmRC/GUfnzUTu wxPpMfRqjQTMgFgyMBBpvQZPS6hrTooLJZAa/ZHbo/bTovyrTUJwgSNR6+P2qlkKY4hz vb5g== X-Gm-Message-State: AOJu0YwQjWrpcPWeZ5kHzmycVC8JpSOmOW+et8Uv5F2yZiYYIbd4mzV6 xpszCbB+xgvsC15Vknk83pjqnCRnyAgPm/WDCsQYdRUHq5OujO7j/QbWtfsjeBAOHpJ6XYkxDyI r X-Google-Smtp-Source: AGHT+IE4y9IYtDPGAu933Pb35YKaIzsugQADEpXOX6zXw428X+9Sjppqt+fOWbe6jdsHz5GLRGGq2Q== X-Received: by 2002:a17:903:2285:b0:1fc:2b3b:1482 with SMTP id d9443c01a7336-2076e31576fmr278191535ad.12.1726543887427; Mon, 16 Sep 2024 20:31:27 -0700 (PDT) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2079473d05dsm42647735ad.287.2024.09.16.20.31.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Sep 2024 20:31:26 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger Subject: [PATCH v8 0/7] Test-pmd packet decode enhancements Date: Mon, 16 Sep 2024 20:27:57 -0700 Message-ID: <20240917033117.66346-1-stephen@networkplumber.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240312220129.70667-1-stephen@networkplumber.org> References: <20240312220129.70667-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 While debugging TAP rte_flow discovered that test pmd verbose output was confusing and unhelpful. Instead, made a simple dissector that prints one line per packet like this in test-pmd. The new commands are: testpmd> set output /tmp/packet.log testpmd> set format dissect To enable packet logging need to use: testpmd> set verbose 3 v8 - added JSON output format, and ability to redirect packet log, and don't overload verbose option. v7 - change rte_dissect to return number of characters that would be printed (same as snprintf). And tests around that. v6 - validate result of rte_dissect for simple packet v5 - breakout the additional ICMP types into header - fix some decoding bugs in ARP and ICMP Stephen Hemminger (7): net: add more icmp types net: add new packet dissector test: add test for packet dissector test-pmd: add option to redirect packet log test-pmd: add hex decode test-pmd: add packet dissect format test-pmd: add a JSON packet output app/test-pmd/cmdline.c | 81 ++++ app/test-pmd/config.c | 47 +++ app/test-pmd/testpmd.c | 4 + app/test-pmd/testpmd.h | 12 + app/test-pmd/util.c | 225 +++++++++- app/test/meson.build | 1 + app/test/test_dissect.c | 302 ++++++++++++++ doc/guides/testpmd_app_ug/testpmd_funcs.rst | 22 + lib/net/meson.build | 2 + lib/net/rte_dissect.c | 428 ++++++++++++++++++++ lib/net/rte_dissect.h | 45 ++ lib/net/rte_icmp.h | 22 +- lib/net/version.map | 7 + 13 files changed, 1187 insertions(+), 11 deletions(-) create mode 100644 app/test/test_dissect.c create mode 100644 lib/net/rte_dissect.c create mode 100644 lib/net/rte_dissect.h -- 2.45.2