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 28C8545BE5; Mon, 28 Oct 2024 03:21:44 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 04099402F2; Mon, 28 Oct 2024 03:21:44 +0100 (CET) Received: from mail-pl1-f176.google.com (mail-pl1-f176.google.com [209.85.214.176]) by mails.dpdk.org (Postfix) with ESMTP id EBE02402A3 for ; Mon, 28 Oct 2024 03:21:41 +0100 (CET) Received: by mail-pl1-f176.google.com with SMTP id d9443c01a7336-20caea61132so31778185ad.2 for ; Sun, 27 Oct 2024 19:21:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1730082101; x=1730686901; 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=+f3xP3cMMCjKNAeJx6Xh8Hta0uhafvLwmJ1V9WKsEGw=; b=Jf6D8A8+EdBe+9eEdEZv9+nx4hbRDsqKKGytivyIxBgiJM7/Z86jATw0f7dU7OcdVP 7fBQQjskYKXOFRnL6WUm/++960aXcUNRiodcD2o6doGWuSskSajiwEOGhX66x+ABIkUc 9HdJsU2UEky2rgTaTAcQNdZ14uRX+KYDP8H6kJA5L6jJiDsJfjE+p+dFMQsfecBRcu2t 27fpwNAh/PIEzh5tCvFl7lACBo9f7TMXi6Oje+I76oPyD5RuBccWZX72qccnJvrunMv6 wHwxhCY830yMz0F36d3V3hqF0gfwxYEv26auF25KS3uWyMrP7/kPn38oxOG8Q6TkZ1kQ aqtg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730082101; x=1730686901; 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=+f3xP3cMMCjKNAeJx6Xh8Hta0uhafvLwmJ1V9WKsEGw=; b=OI5uXfaJFaEq9jqQpOvyL751HtaYs32INBGOvt2krz5zhp3yqOUjpScqPE4yKxfW+9 hEzC81rqHaRm1t0G/NmZ3PtKik1ltF4tBJsJvcIZb6ULm2aVNJjn5se4J67X9UR2znus pO3B6qrcgdhex6PlEVrgxtOHLDiTvNGtiXIJUc6a7xOMtIIkHG494R3QFXY3m0ikg8Rl YYv1rXIgk2Mrlb+EfGjLQ4zmEa0rRqGdUnBW/lhVXHGENMJRGmTReeypEpxSfqTdvsvZ Q84Dhn3pDw79QbdFwQ4RtzbL8CltJUIebZzwCzorERmhkfdPykG9UlkZrixQ4ZGjnUJe T7Rw== X-Gm-Message-State: AOJu0YzV+SuTx0tEdQ2/nvSVFRyrbSCrz2/5Lh1BF3iNCZM34s/a5vwi aLe0yyGWNVemCmZswUDwaznNw4N5M+YExarKkWg6bCLrCWJ5zc+yC3l3azTVSB9xv96F90SWcCa IGVI= X-Google-Smtp-Source: AGHT+IFZhq2bi4Z5Yg56fS53e4HHQTw0mldUHNd73du0vS6vxan6ETH5ThRDoyx6Xi1HmLtLKfqgrw== X-Received: by 2002:a17:903:240b:b0:20c:c9ac:bd05 with SMTP id d9443c01a7336-210c689b948mr87633235ad.15.1730082100736; Sun, 27 Oct 2024 19:21:40 -0700 (PDT) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-210bc04b8bbsm41095615ad.244.2024.10.27.19.21.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 27 Oct 2024 19:21:40 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger Subject: [PATCH v10 0/8] test-pmd packet decoding enhancements Date: Sun, 27 Oct 2024 19:19:26 -0700 Message-ID: <20241028022131.142609-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. Also supports hex and JSON mode when more detail is needed. 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 v10 - rebase based on changes to lib/net and cmdline Stephen Hemminger (8): net: add more icmp types net: add new packet dissector mbuf: decode the hash and fdir info in rte_pktmbuf_dump 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 | 48 +++ app/test-pmd/testpmd.c | 4 + app/test-pmd/testpmd.h | 12 + app/test-pmd/util.c | 256 +++++++++++- app/test/meson.build | 1 + app/test/test_dissect.c | 302 ++++++++++++++ doc/guides/testpmd_app_ug/testpmd_funcs.rst | 22 + lib/mbuf/rte_mbuf.c | 14 + lib/net/meson.build | 2 + lib/net/rte_dissect.c | 429 ++++++++++++++++++++ lib/net/rte_dissect.h | 45 ++ lib/net/rte_icmp.h | 9 + lib/net/version.map | 7 + 14 files changed, 1225 insertions(+), 7 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