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 56D794569B; Tue, 23 Jul 2024 22:36:42 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3D9BE40A75; Tue, 23 Jul 2024 22:36:42 +0200 (CEST) Received: from mail-il1-f178.google.com (mail-il1-f178.google.com [209.85.166.178]) by mails.dpdk.org (Postfix) with ESMTP id EE8E940280 for ; Tue, 23 Jul 2024 22:36:40 +0200 (CEST) Received: by mail-il1-f178.google.com with SMTP id e9e14a558f8ab-3992195d08aso20473835ab.0 for ; Tue, 23 Jul 2024 13:36:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1721766999; x=1722371799; 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=wW0eYufj0LFRRnCeEpa1kLsUobcLoAvtnliCmBsG23s=; b=FKW9rmG3h4wpcVxOkzSc8Ys/975EecK6FDTRvX0NJs/PiJTlaIKD/sgcxKYxEbuq9I ISzO3EKvSCGaTC2NriDrnlT6Aqq/UJH+6I4Qgpm9iTLOtRNj1OLQPzm90LbyKb1twk9X R7HWCQ8xJw80o1NKkOrYOHXdgpuOk5ht1UHIi6Xyd/rmoRxutLPscFxgJYv+9BRvXgIa oR/5WyaLMkAz+HBx1Z6X9j8qaCWnP6Qj6ThF7gzSvr+qWWwjDza9k2Y3wicHQ0e2dQ4I Bvm1KutQIN28W8Bd/+gURfdZ90p0M1+QryrGotvn3sy+hgsVq814lMfTTHs9lOTYxRSv MdUg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721766999; x=1722371799; 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=wW0eYufj0LFRRnCeEpa1kLsUobcLoAvtnliCmBsG23s=; b=TlZKwSOscMu2rqsJtfBELut/L7+uBoT+M3tTOeWV9jTneQBFkW78+lqR0fMsAvNWZ5 uMRAAD4dG9B0Ehr+FOYUHgGG11cktHC58RkHv/N1/isPKmtnP+v1F5FCufxbElnen/ou oZQal24FjibtRoe6B3yqxarpMwLXeOwUK4H34nvfJ5Nv64iv7NXCLqK9hHLLiVv4y4pb afw8OENSG7ogXSUD1VPm2GFRS6Si2tA6xtUBaWLKh6nCEweM58ma4YSUXIJm+l+OdfWF Qq4irw21pdex2AqsPDsa0GLDbrOGYl7sDWPz/Xbq5YwnMWYWzJcM1CZLvd9GYb5509z8 WYSg== X-Gm-Message-State: AOJu0Yz7zr6yT8B2DuOC8eIB5Z9zADf8NxWQCqlwhMqOc46ADLVud/gC vMULI3kcAPoX1JhnWUnt5q1yaHqShvgzqXUz009ohK2QALpUtC3q6lQmFdv4VR5pnc3Zy0iujVk S X-Google-Smtp-Source: AGHT+IHZddf8ENOo6Bmyulf6yw5jCBevRE9HyzCxq17eb1DF2WL8k6IZJ1Bbw0y/YuiwOt/rcVdadQ== X-Received: by 2002:a05:6e02:1c25:b0:36c:4688:85aa with SMTP id e9e14a558f8ab-39a19260d77mr1137355ab.10.1721766998961; Tue, 23 Jul 2024 13:36:38 -0700 (PDT) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-70cff4b2f6esm7370062b3a.67.2024.07.23.13.36.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Jul 2024 13:36:38 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger Subject: [PATCH v3 0/3] add packet dissector function Date: Tue, 23 Jul 2024 13:33:07 -0700 Message-ID: <20240723203629.246735-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-Type: text/plain; charset=UTF-8 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 Seq# Time Port:Que Description 1 0.000000000 0:0 :: → ff02::16 ICMP 143 2 0.000000000 0:0 :: → ff02::1:ff98:2b46 ICMP 135 36 0.512762002 0:0 fe80::285f:1fff:fe98:2b46 → ff02::fb UDP 120 5353 → 5353 37 0.512779925 0:0 fe80::285f:1fff:fe98:2b46 → ff02::fb UDP 120 5353 → 5353 v3 - use a string buffer instead of use stdio stream because that can get garbled when dealing with multiple threads. - don't use longjmp unwind, as it can lead to bugs later. Stephen Hemminger (3): 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 | 241 ++++++++++++ doc/guides/testpmd_app_ug/testpmd_funcs.rst | 5 +- lib/net/meson.build | 2 + lib/net/rte_dissect.c | 407 ++++++++++++++++++++ lib/net/rte_dissect.h | 42 ++ lib/net/version.map | 7 + 11 files changed, 811 insertions(+), 18 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