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 2ED4245BE5; Mon, 28 Oct 2024 03:22:01 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 49D9D4069F; Mon, 28 Oct 2024 03:21:51 +0100 (CET) Received: from mail-pl1-f173.google.com (mail-pl1-f173.google.com [209.85.214.173]) by mails.dpdk.org (Postfix) with ESMTP id 0C4F540649 for ; Mon, 28 Oct 2024 03:21:44 +0100 (CET) Received: by mail-pl1-f173.google.com with SMTP id d9443c01a7336-20e6981ca77so40373325ad.2 for ; Sun, 27 Oct 2024 19:21:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1730082103; x=1730686903; 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=Pn4dAcjSxVlQP7PK9ns1BTaDZ5Wmz6LyviuXiM4E8yIkKCKsDfVKB3a326xtKtrbpr wwmVYIJO4kYzEzbfRIlYWAvhfSh7BRpPMvrKE1nRkpcFrM8XD3t27H8A8tGxOXwJ/cOl khdnJ/+dfv3vNFp/dZOwtdIrT+j0komsBAWM2uOx2XS+QgGQdQOjTuE9e0xyrw7Lhsd7 rZ6TU6RstR7C8Ip4A5NNkf44R2BMTo4Olibd8sSCi+qm6tTYjgjpJNLLycZ4YpOZH2RQ XuDS0J69GSHCDTEYQwqdYz5DEwes0kFnR7KtkWGCasYJebzbT/zMZji3JjDJZoo2bi9P hNcw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730082103; x=1730686903; 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=PL+O6cpRrqXNWTkZHHUSSflobJHdWmKCCOYkPrb7uKvHvEVEDP3hFa1VWMs8r6ufmj Z6ymANpMCajktwM0DXvAhH2XcfaL17dvV5fHfGfeh301npWxziOII/vQ6XdYWg1McyVY +tIQgONcxqh6zAN45MYKW1/o3wEuEZM9luJSF3c2t1p+R9yl+yMRdL9YuXN1NDanPLUH 5WHA1AOncevn8nyu9V9e7IIxwHXtxaCJDP/Qk6CNixKjTZ2MqZmy9IlYAn/+ruLNL+SW TA79SvbM/R1Ig/yvn9FtfvOtsvK/Pf1D0jlV6c5FjFmVw3Ne8mDjfx33qbbJJ1/xC7og +pZA== X-Gm-Message-State: AOJu0Yw5ie6dcyRh5uWiWUlfiKAAJ6rpnWKghV7i59xGVWXGxpuSgd4u xzYF35Nwec/b4i0qcJyJVCxLC36PF0t972C5z0DefCJNQgv2EXdMsWMYVjmHy8tbWHAHG5l19z4 b59w= X-Google-Smtp-Source: AGHT+IHaWYvigv7RJLtXd1qBB2VOv3Nv8nf6LO0aHh0ZrYaXU+gAzdEAW9o9rvfOUEBv0ks/X45r7A== X-Received: by 2002:a17:902:c94d:b0:20c:d428:adf4 with SMTP id d9443c01a7336-210c6c6ed84mr96768545ad.38.1730082103228; Sun, 27 Oct 2024 19:21:43 -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.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 27 Oct 2024 19:21:42 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger Subject: [PATCH v10 3/8] mbuf: decode the hash and fdir info in rte_pktmbuf_dump Date: Sun, 27 Oct 2024 19:19:29 -0700 Message-ID: <20241028022131.142609-4-stephen@networkplumber.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241028022131.142609-1-stephen@networkplumber.org> References: <20240312220129.70667-1-stephen@networkplumber.org> <20241028022131.142609-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