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 62A5C45720; Fri, 2 Aug 2024 21:58:36 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3028040E0B; Fri, 2 Aug 2024 21:58:36 +0200 (CEST) Received: from mail-pf1-f172.google.com (mail-pf1-f172.google.com [209.85.210.172]) by mails.dpdk.org (Postfix) with ESMTP id BFACD40E01 for ; Fri, 2 Aug 2024 21:58:34 +0200 (CEST) Received: by mail-pf1-f172.google.com with SMTP id d2e1a72fcca58-70eb0ae23e4so6292734b3a.0 for ; Fri, 02 Aug 2024 12:58:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1722628714; x=1723233514; 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=L5HC4I2N+mdqUtqMf9qRvneG4cBXAGWbarcynaG0ABI=; b=JN85TvwzPbzexUkE6Jp4GNy7JReNSsfC+JRxjQ555682kppfUKQfKjo/GVW7ZPthhc yIg2PfcgIONaozHkdUl4kicdMwEwn7/N7PsXIxa7lCB43Dzwej3azSS8Yv1D/+qFIqRT +pehnE5pv9BxdwxX3S4LIWJnU4i6fw/Nc3LX/nPg+p+17qj+C7ujiBQhXPx/s0oq4O+f /87lbJ9WZO1HuubPYmn9kynQ1Z0+L4GAlnzDkD9283KNunDeMcKqCH/5ZZpTPlpgc7e7 LHpJA9OnAIXQFgLFoOmyLKG/zE88y6fq+ApY7GXs78GpbEOnQaVskONcGTdixvuPGfTJ 2Auw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722628714; x=1723233514; 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=L5HC4I2N+mdqUtqMf9qRvneG4cBXAGWbarcynaG0ABI=; b=lE9y9dfr9By2/Ctx7R/F6kdeXFHY1kTabhYtB8623r+I0Xsa3lEqT325SDdStDt9G0 RNb8urY/wGMZHcdejahLEqzWxnV7lggq7JDdHBlElvK9EHkzDkTJbrbT2lvBPkkb+Wap cT92XMHN2GQOOkbFNZKI5kQ4fwZhh67gi/KRbjK3CHFMT96cHHmUhRD7OakRzkxwCME3 8/EgTa1+d60QfFRBppJLPCQsr4w/rUSGhaKZUorbf4yMlTFtkv3YLFPWxGvE9vP9gR81 L9v2DtpGJ9QLwA5tqZPyudMmLBfdPB///+257QwNL4TJZwp6IWzGhwQUtKx3nMJMti+g HUuA== X-Gm-Message-State: AOJu0Yw4u/zkD3Uy6KyK7Ap6C9mNS9eg4h8xRx37VwlHSs7SjoP/O0EO tYRpk7vf2OHbQt+BX/ck/Y90j7Y259ehPiDmd7LBhyM9KB5ipau95WwCUwrV202rMz0ClIPA28A y X-Google-Smtp-Source: AGHT+IH9NId32YjrEyRjz2edq5l8+FVjV8Rfx1BrKtczZbJwPbfGI4FH31QcBKhBvdZK51zTMIhohw== X-Received: by 2002:a05:6a00:9467:b0:710:6f54:bcac with SMTP id d2e1a72fcca58-7106f54bf82mr4060745b3a.1.1722628713664; Fri, 02 Aug 2024 12:58:33 -0700 (PDT) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-7106ecfc344sm1697180b3a.151.2024.08.02.12.58.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Aug 2024 12:58:33 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger Subject: [PATCH v7 0/4] Add network packet dissector Date: Fri, 2 Aug 2024 12:56:51 -0700 Message-ID: <20240802195824.1336603-1-stephen@networkplumber.org> X-Mailer: git-send-email 2.43.0 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 with verbose level 4. 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 (4): net: add more icmp types net: add new packet dissector test: add test for packet dissector test-pmd: add more packet verbose decode options app/test-pmd/cmdline_flow.c | 3 +- app/test-pmd/config.c | 33 +- app/test-pmd/testpmd.h | 11 + app/test-pmd/util.c | 77 +++- app/test/meson.build | 1 + app/test/test_dissect.c | 302 ++++++++++++++ doc/guides/testpmd_app_ug/testpmd_funcs.rst | 5 +- 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 + 12 files changed, 914 insertions(+), 22 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.43.0