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 1A0D545593; Fri, 5 Jul 2024 09:14:06 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D4BF040EE2; Fri, 5 Jul 2024 09:14:05 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id D9D024029C for ; Fri, 5 Jul 2024 09:14:04 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1720163644; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=PSBb1CZNjjAkxvtjcL2IkBBpDUHLu3+D9X/zkVC9tSI=; b=OVFv/LRw21LJ5QP0JW83x1Hvj3F9KAMlZpQQtd3lbKOZOnrHY45S1o8g+jDU+PgqyHsi23 HmyE0ZzEYZuckKAY2w/0yXBV9R3txHcHCxbzYJb9YNApXsjEaFpPaeST7Sw7EuwahmEg+j 8J3koxe7+CL+eEBlEBLaKbUtygopJO8= Received: from mail-lj1-f199.google.com (mail-lj1-f199.google.com [209.85.208.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-169-wrIjkzImMwilZQD2UgkIsQ-1; Fri, 05 Jul 2024 03:14:00 -0400 X-MC-Unique: wrIjkzImMwilZQD2UgkIsQ-1 Received: by mail-lj1-f199.google.com with SMTP id 38308e7fff4ca-2ee864483c2so12711361fa.2 for ; Fri, 05 Jul 2024 00:14:00 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720163639; x=1720768439; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=PSBb1CZNjjAkxvtjcL2IkBBpDUHLu3+D9X/zkVC9tSI=; b=Ie3vKrNqpY60G7TnW4EaMiHjqUHG0z+oHFmdhV7EziI4XFND0AnmQFTG2WKGyWlRlf 11EQnajVTxdL8faLe62Eiy8C2vTqXOd4IQUVcBpNe0xN9AxSSHmUL8B/Jkks6nqfa3rP 2CVgj81x86uqMqMgGIYQMhW8AwaGNnUhaWDlWczQU58StR4ZuDvS8veiBjdfCreoj19Q cBToS95tnGrDyoFpTrv69oeQeoCNyBZzqk+QbjUu8mDJVR9KxSSrcct25dl+UYc2+TSo K5xHqZuNgTTHTT8r3XQcaolPS/+Nc7B9yrDzeeaD9P06dNi5onJONSonIXWdQaMCb5Mx UNeQ== X-Gm-Message-State: AOJu0Yz/zQfSiBACXi/mUqEGskTM8dVZLDjOE+0bn0fd2+q40rXxxCmo SPc0GVKAKkcQB67/S2GzXPlGJVpQ46Kk7CPWEAfvCi4VLSOpyEOlXBFhlWpQp/tPpTznBPbcldw +Wri2bmRbVsjxbeLNiu2L+Ir1DHf3NJRbmm2hvx4tQHRwvSGMvE87KRT8ltp9vzHNIHqR/TFWnk gpIDhqpPvNJebpQgU= X-Received: by 2002:a05:651c:157:b0:2ec:2d75:509c with SMTP id 38308e7fff4ca-2ee8edf14dbmr27907521fa.46.1720163639491; Fri, 05 Jul 2024 00:13:59 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEkTLCo+EcutY5XadqipYvYfkrIwXyrPeRiOaqfJ5NZjYK6H++/EOkBca6sTCUhkUCgv6rsxuhVKaYuSb5NydA= X-Received: by 2002:a05:651c:157:b0:2ec:2d75:509c with SMTP id 38308e7fff4ca-2ee8edf14dbmr27907411fa.46.1720163639177; Fri, 05 Jul 2024 00:13:59 -0700 (PDT) MIME-Version: 1.0 References: <20240312220129.70667-1-stephen@networkplumber.org> In-Reply-To: <20240312220129.70667-1-stephen@networkplumber.org> From: David Marchand Date: Fri, 5 Jul 2024 09:13:47 +0200 Message-ID: Subject: Re: [PATCH] test-pmd: add more packet decode options (verbose) To: Stephen Hemminger Cc: dev@dpdk.org, Ori Kam , Aman Singh , Yuying Zhang , Robin Jarry X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 On Tue, Mar 12, 2024 at 11:01=E2=80=AFPM Stephen Hemminger wrote: > > The existing verbose levels 1..3 provide a messy multi-line > output per packet. This is unhelpful when diagnosing many > types of problems like packet flow. > > This patch adds two new levels: > 4: one line per packet is printed in a format resembling > tshark output. With addresses and protocol info. > 5: dump packet in hex. > Useful if the driver is messing up the data. > > Signed-off-by: Stephen Hemminger That's an interesting addition. I like the tshark like output. I had to write similar (more limited) parsing for debug. I know some project decodes packets and it could probably reuse what DPDK provides. Could the parsing function you propose go to lib/net/ maybe? Something like rte_net_format_packet(const struct rte_mbuf *m, char *buf, size_t size); It could be worth instructing the parser to decode only a part of the packet too (via an offset/size and a hint of the layer). An additional comment: when you have multiple cores processing packets (even at low rate), getting all those output mixed with no context at all would be hard to follow. I would prefer we retain the information of whether the displayed packet was caught on Rx/Tx and the queue and port on which it happened. As an alternative, there is the possibility of only displaying received or transmitted packets (if verbose is used as a bitmask with 0x1 and 0x2 controlling rx / tx filtering, and the new modes enhancing output beauty). --=20 David Marchand