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 8B7BB45A50; Sat, 28 Sep 2024 18:21:09 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 43198402F1; Sat, 28 Sep 2024 18:20:52 +0200 (CEST) Received: from mail-pf1-f170.google.com (mail-pf1-f170.google.com [209.85.210.170]) by mails.dpdk.org (Postfix) with ESMTP id 7AC334027F for ; Sat, 28 Sep 2024 18:20:48 +0200 (CEST) Received: by mail-pf1-f170.google.com with SMTP id d2e1a72fcca58-719b17b2da1so2294468b3a.0 for ; Sat, 28 Sep 2024 09:20:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1727540448; x=1728145248; 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=hhWvuVXRgHku1oHh1xOxXvjG58ltiAKxpo7DsbakfzY=; b=kFzVcYJn9GlzPd3H+kVBocutykqFjyfFVdk5jpP/TKnvto5KQ+pXvyKVUR804HK0Lm 0qKt8lRXXPjNOpCOEkg2QVwyhJLT6A+RHvkGQt5Rl490w1D2tAmyWzCxvSLn9W1+PQbz bAf0kgTUZnD5t64ZwrNeZ0KwCzLzxtVpRJfQpffqM4OJJ25Q058tJSr5IG5+ct+cYRB4 OdlEXGEzU2jj2+pSaWS0hSPlxtizdhD3eFg3y4oLMp1V1FkqfRnO5eMBpZUSTjebjtpE a83eR0M3O3n4v+NizcOg6IWTSe6Fcqu+b40RuoIqy8HWLZtKRXeUJfT8hvHObD8PaWdC 0Rpg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727540448; x=1728145248; 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=hhWvuVXRgHku1oHh1xOxXvjG58ltiAKxpo7DsbakfzY=; b=SiniBdi1jNGfebIKpVTTWvRjYaTFZ1SFQJPWaSW7lS/1+uQt7OhvDmM5j5Xfwc/+Vh 5PE8TcGlHIqLf+4ZLU8oMv8l8u7xZ5gw58WHjLCN2XTZZDSTbjRRV8z8qBSKyj0zKP70 ZGaOjRztK2bI2PePqqWijCGn7GOj+iDRBElpy0W0ddoIYmFVH7D2NrskE4x7RKWKcenk VI0kOXYvXgQ1G3p5RhfUs6FoAF1kVfThaPPoiXWXVg8RMzQy9awZ66h8PjLCm0QSr1lb 5scifzv30Yf5UfgOOw3XnbbDuay2ZJCsU16aM1ddRcnGRq8p7Hejvauj1CeGGaE46IR3 9xzQ== X-Gm-Message-State: AOJu0YwYxBNIgyiU1qi2mdQF/Q15SYcq6vzRUFvuh0jiFCRlghWunCwU yrhN3TnvHNxZmeJRohUj4dA+CH+DU2X04FcJ73VfMslHswJOqPajXkvmVH2XutTMbp9TW1KsZ2m N X-Google-Smtp-Source: AGHT+IHHtMGlQ2eUZ9ssNQ79C3l/wZsa6NeRYUKrnIVEyVfIFu6uSqwkvoHjOxn87WqnW9LBW41SBQ== X-Received: by 2002:a05:6a00:2352:b0:718:dc17:3b83 with SMTP id d2e1a72fcca58-71b25f6b4fdmr11615940b3a.16.1727540447549; Sat, 28 Sep 2024 09:20:47 -0700 (PDT) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-7e6db2b9407sm2969107a12.23.2024.09.28.09.20.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 28 Sep 2024 09:20:47 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger Subject: [PATCH v9 3/8] mbuf: decode the hash and fdir info in rte_pktmbuf_dump Date: Sat, 28 Sep 2024 09:18:33 -0700 Message-ID: <20240928162035.849326-4-stephen@networkplumber.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240928162035.849326-1-stephen@networkplumber.org> References: <20240312220129.70667-1-stephen@networkplumber.org> <20240928162035.849326-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 Useful to be able to see the meta data in the hex dump. Signed-off-by: Stephen Hemminger --- lib/mbuf/rte_mbuf.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/lib/mbuf/rte_mbuf.c b/lib/mbuf/rte_mbuf.c index 559d5ad8a7..8e452ca98f 100644 --- a/lib/mbuf/rte_mbuf.c +++ b/lib/mbuf/rte_mbuf.c @@ -678,12 +678,26 @@ rte_pktmbuf_dump(FILE *f, const struct rte_mbuf *m, unsigned dump_len) fprintf(f, " pkt_len=%u, ol_flags=%#"PRIx64", nb_segs=%u, port=%u", m->pkt_len, m->ol_flags, m->nb_segs, m->port); + if (m->port != RTE_MBUF_PORT_INVALID) + fprintf(f, ", port=%u", m->port); + if (m->ol_flags & (RTE_MBUF_F_RX_QINQ | RTE_MBUF_F_TX_QINQ)) fprintf(f, ", vlan_tci_outer=%u", m->vlan_tci_outer); if (m->ol_flags & (RTE_MBUF_F_RX_VLAN | RTE_MBUF_F_TX_VLAN)) fprintf(f, ", vlan_tci=%u", m->vlan_tci); + if (m->ol_flags & RTE_MBUF_F_RX_RSS_HASH) + fprintf(f, ", rss=%#x", m->hash.rss); + else if (m->ol_flags & RTE_MBUF_F_RX_FDIR) { + if (m->ol_flags & RTE_MBUF_F_RX_FDIR_ID) + fprintf(f, ", fdir id=%u", m->hash.fdir.id); + else if (m->ol_flags & RTE_MBUF_F_RX_FDIR_FLX) + fprintf(f, ", fdir flex=%#x %x", m->hash.fdir.hi, m->hash.fdir.lo); + else + fprintf(f, " fdir hash=%#x id=%#x ", m->hash.fdir.hash, m->hash.fdir.id); + } + fprintf(f, ", ptype=%#"PRIx32"\n", m->packet_type); nb_segs = m->nb_segs; -- 2.45.2