From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 7477CA04C1; Wed, 20 Nov 2019 18:41:37 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 946782B8B; Wed, 20 Nov 2019 18:41:36 +0100 (CET) Received: from mail-pl1-f195.google.com (mail-pl1-f195.google.com [209.85.214.195]) by dpdk.org (Postfix) with ESMTP id 47B69A69 for ; Wed, 20 Nov 2019 18:41:35 +0100 (CET) Received: by mail-pl1-f195.google.com with SMTP id q18so96687pls.5 for ; Wed, 20 Nov 2019 09:41:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=owXITrLS0taMFnJXpYKWuCg2czCCpPSxeNMD4FT5gHs=; b=KT/BUdctyuUyHCbvHMJdLs7B10tyA+5mAnxWVF8MZljgwuXsocjHxZADAAO/5c8QP6 VHHWEx55IDhn+eKa/RgcVbU1QzRKK9763l5w5N+cE4lCUQ9cvZblu2VTfDwC+vC/yXuw mkxdVCHEjpsaTrqhmPaGJIQuNG0VDxsFLaIaC3pTYDbb/sK0hN6wB9Otz4X+oLtRVzg2 XRENVLUtZGU/x3AP7+/vtE1l2C0u/iyYPkjiQK+K/bjyXiCRnYF+8rij/5fYj8uOaUEI 6+RSotKzYSlc2qXJXotp1aIphSTzuZ6XkQtJJKDe2Nx0NQfXfttbypCf0l3f6+fchBmr jaCA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=owXITrLS0taMFnJXpYKWuCg2czCCpPSxeNMD4FT5gHs=; b=Mr+0Cb5vo6pMil+cNVG75Zc3RjcbsKmYAxso6eCmTI7feUvjuqcGiX12EvoMc+XmTU ux+/4ub9mxu8Zrgd5XXvbzYJz82sCtrXCf23os61eXqW8uGT7lr/n1OBRpPNOYYlI5kJ lS4AhWy7FIliC0SmNkfkahFbVYTvtD+qpo9KTKnQkd6pkmx2o0XPheS0JaJ9J6UT9So/ ZMzxCneiiNwLbeuBDvrZzCy8RTgdxiFSuXk7YFd3dx6BIYTC9tlYle+kNnzeyIjROVJv GWzDGyRSptSUjXk9NhKWjlXjNt9NfDPZLslkdnuLSDDtpoBwZfcGd1SSANdznbt6WyX3 OYDg== X-Gm-Message-State: APjAAAX/v/TpqrmFjaTuccSM7RgVOevBU4IuQ3VjpsJkfKak7SJ4dGsb j6Wa8q1PU7hksfbsfMOC5k1n3gvFnrL6wA== X-Google-Smtp-Source: APXvYqy9ydswizqe8AwVFdnQTpcNUVE5Kb6GpnZayM77ZVa5mdsqoNGJsEoLH4W3b14iZLM4zml7SA== X-Received: by 2002:a17:90a:fd88:: with SMTP id cx8mr4940018pjb.66.1574271693908; Wed, 20 Nov 2019 09:41:33 -0800 (PST) Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id fz12sm7544386pjb.15.2019.11.20.09.41.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Nov 2019 09:41:32 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger Date: Wed, 20 Nov 2019 09:41:25 -0800 Message-Id: <20191120174125.23704-1-stephen@networkplumber.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH] mbuf: display more fields in dump X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" The rte_pktmbuf_dump should display offset, refcount, and vlan info since these are often useful during debugging. Signed-off-by: Stephen Hemminger --- lib/librte_mbuf/rte_mbuf.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/lib/librte_mbuf/rte_mbuf.c b/lib/librte_mbuf/rte_mbuf.c index 35df1c4c38a5..a964464bd598 100644 --- a/lib/librte_mbuf/rte_mbuf.c +++ b/lib/librte_mbuf/rte_mbuf.c @@ -473,11 +473,14 @@ rte_pktmbuf_dump(FILE *f, const struct rte_mbuf *m, unsigned dump_len) __rte_mbuf_sanity_check(m, 1); - fprintf(f, "dump mbuf at %p, iova=%"PRIx64", buf_len=%u\n", - m, (uint64_t)m->buf_iova, (unsigned)m->buf_len); - fprintf(f, " pkt_len=%"PRIu32", ol_flags=%"PRIx64", nb_segs=%u, " - "in_port=%u\n", m->pkt_len, m->ol_flags, - (unsigned)m->nb_segs, (unsigned)m->port); + fprintf(f, "dump mbuf at %p, iova=%"PRIx64", buf_len=%u," + " offs=%u, refcnt=%u\n", + m, (uint64_t)m->buf_iova, (unsigned)m->buf_len, + (unsigned)m->data_off, (unsigned)rte_mbuf_refcnt_read(m)); + fprintf(f, " pkt_len=%u, ol_flags=%#"PRIx64"," + " nb_segs=%u, in_port=%u, vlan_tci=%#x\n", + (unsigned)m->pkt_len, m->ol_flags, + (unsigned)m->nb_segs, (unsigned)m->port, (unsigned)m->vlan_tci); nb_segs = m->nb_segs; while (m && nb_segs != 0) { -- 2.20.1