mbuf: display more fields in dump
PATCH 1/1 mbuf: display more fields in dump
The rte_pktmbuf_dump should display offset, refcount, and vlan info since these are often useful during debugging.
--- lib/librte_mbuf/rte_mbuf.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-)
lib/librte_mbuf/rte_mbuf.c +8 -5
@@ -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 ) {
Signature · 1 line
2.20.1
Quoted 35 lines
-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Stephen Hemminger
Sent: Wednesday, November 20, 2019 6:41 PMThe
rte_pktmbuf_dumpshould display offset, refcount, and vlan info since these are often useful during debugging.Signed-off-by Stephen Hemminger <[email protected]>--- lib/librte_mbuf/rte_mbuf.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-)lib/librte_mbuf/rte_mbuf.c +0
-3@@ -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,"
lib/librte_mbuf/rte_mbuf.c +8
-2-"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-
Quoted 1 line
Quoted 1 line
vlan_tci);
Are all these explicit type casts really needed? buf_iova is already uint64_t, buflen is uint16_t, data_off is uint16_t, rte_mbuf_refcnt_read() returns uint16_t, pkt_len is uint32_t, nb_segs is uint16_t, port is uint16_t, vlan_tci is uint16_t.
m->port is not only the input port anymore (ref. the mbuf documentation), so please change in_port=%u to port=%u.
For consistency with ol_flags and vlan_tci format, consider changing iova=% to iova=%#.
Quoted 6 lines
lib/librte_mbuf/rte_mbuf.c +0
-1nb_segs = m->nb_segs;while (m && nb_segs !=0 ) { --2.20.1
Quoted 1 line · On Thu, 21 Nov 2019 17:16:42 +0100 Morten Brørup <[email protected]>…
Are all these explicit type casts really needed?
buf_iovais alreadyuint64_t, buflen isuint16_t,data_offisuint16_t,rte_mbuf_refcnt_read()returnsuint16_t,pkt_lenisuint32_t,nb_segsisuint16_t, port isuint16_t,vlan_tciisuint16_t.
Normally, they are not needed.
If you turn up some of the warning levels in Gcc, then yes.
Quoted 2 lines
m->portis not only the input port anymore (ref. the mbuf documentation), so please change in_port=%u to port=%u.
Makes sense, but since this in internal would rather keep existing
to print the name of the field.
Quoted 2 lines
For consistency with
ol_flagsandvlan_tciformat, consider changing iova=% to iova=%#.
good idea, personal preference is to always use %#x over %x
PATCH v2 1/1 mbuf: display more fields in dump
In reply to Stephen HemmingerThe rte_pktmbuf_dump should display offset, refcount, and vlan info since these are often useful during debugging.
---
v2 - remove casts, change in_port to port
the refcount and offset are property of per-segment
lib/librte_mbuf/rte_mbuf.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-)
lib/librte_mbuf/rte_mbuf.c +10 -7
@@ -473,18 +473,21 @@ 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\n" , + m, m->buf_iova, m->buf_len); +fprintf (f, +" pkt_len=%u, ol_flags=%#" PRIx64", nb_segs=%u, port=%u, vlan_tci=%#x\n" , + m->pkt_len, m->ol_flags, m->nb_segs, m->port, m->vlan_tci); + nb_segs = m->nb_segs;while (m && nb_segs !=0 ) {__rte_mbuf_sanity_check (m,0 ); -fprintf (f," segment at %p, data=%p, data_len=%u\n" , - m, rte_pktmbuf_mtod(m, void *), (unsigned)m->data_len); +fprintf (f," segment at %p, data=%p, len=%u, off=%u, refcnt=%u\n" , + m, rte_pktmbuf_mtod(m, void *), + m->data_len, m->data_off,rte_mbuf_refcnt_read (m)); + len = dump_len;if (len > m->data_len) len = m->data_len;
Signature · 1 line
2.20.1
Quoted 4 lines · Stephen Hemminger
The
rte_pktmbuf_dumpshould display offset, refcount, and vlan info since these are often useful during debugging.Signed-off-by Stephen Hemminger <[email protected]>
May be it would be a bit better to split cosmetic changes into separate patch(es), but anyway
Hi,
Quoted 47 lines · Stephen Hemminger
The
rte_pktmbuf_dumpshould display offset, refcount, and vlan info since these are often useful during debugging.Signed-off-by Stephen Hemminger <[email protected]>---
v2 - remove casts, changein_portto port
the refcount and offset are property of per-segmentlib/librte_mbuf/rte_mbuf.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-)lib/librte_mbuf/rte_mbuf.c +10
-7@@ -473,18 +473,21 @@ 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\n" , + m, m->buf_iova, m->buf_len); +fprintf (f, +" pkt_len=%u, ol_flags=%#" PRIx64", nb_segs=%u, port=%u, vlan_tci=%#x\n" , + m->pkt_len, m->ol_flags, m->nb_segs, m->port, m->vlan_tci); + nb_segs = m->nb_segs;while (m && nb_segs !=0 ) {__rte_mbuf_sanity_check (m,0 ); -fprintf (f," segment at %p, data=%p, data_len=%u\n" , - m, rte_pktmbuf_mtod(m, void *), (unsigned)m->data_len); +fprintf (f," segment at %p, data=%p, len=%u, off=%u, refcnt=%u\n" , + m, rte_pktmbuf_mtod(m, void *), + m->data_len, m->data_off,rte_mbuf_refcnt_read (m)); + len = dump_len;if (len > m->data_len) len = m->data_len;Signature · 1 line
2.20.1
Thanks for this enhancement.
One comment however: I don't see why vlan_tci would be important than packet type or rss tag. It is also a bit confusing to display a field which can have a random value (if the vlan flag is not set in ol_flags).
I'd prefer to dump vlan_tci only if the flag is present. Later we could add more fields with the same logic. What do you think?
Olivier
Quoted 53 lines · On Thu, 26 Dec 2019 17:15:39 +0100 Olivier Matz <[email protected]> wrote:
Hi,
Quoted 47 lines · Stephen Hemminger
The
rte_pktmbuf_dumpshould display offset, refcount, and vlan info since these are often useful during debugging.Signed-off-by Stephen Hemminger <[email protected]>---
v2 - remove casts, changein_portto port
the refcount and offset are property of per-segmentlib/librte_mbuf/rte_mbuf.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-)lib/librte_mbuf/rte_mbuf.c +10
-7@@ -473,18 +473,21 @@ 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\n" , + m, m->buf_iova, m->buf_len); +fprintf (f, +" pkt_len=%u, ol_flags=%#" PRIx64", nb_segs=%u, port=%u, vlan_tci=%#x\n" , + m->pkt_len, m->ol_flags, m->nb_segs, m->port, m->vlan_tci); + nb_segs = m->nb_segs;while (m && nb_segs !=0 ) {__rte_mbuf_sanity_check (m,0 ); -fprintf (f," segment at %p, data=%p, data_len=%u\n" , - m, rte_pktmbuf_mtod(m, void *), (unsigned)m->data_len); +fprintf (f," segment at %p, data=%p, len=%u, off=%u, refcnt=%u\n" , + m, rte_pktmbuf_mtod(m, void *), + m->data_len, m->data_off,rte_mbuf_refcnt_read (m)); + len = dump_len;if (len > m->data_len) len = m->data_len;Signature · 1 line
2.20.1Thanks for this enhancement.
Quoted 6 lines
One comment however: I don't see why
vlan_tciwould be important than packet type or rss tag. It is also a bit confusing to display a field which can have a random value (if the vlan flag is not set inol_flags).I'd prefer to dump
vlan_tcionly if the flag is present. Later we could add more fields with the same logic. What do you think?
Because this is a debugging hook and easier to always display the value. Thats all.
Hi,
Quoted 60 lines · Stephen Hemminger
Quoted 57 lines · On Thu, 26 Dec 2019 17:15:39 +0100 Olivier Matz <[email protected]> wrote:
Hi,
Quoted 47 lines · Stephen Hemminger
The
rte_pktmbuf_dumpshould display offset, refcount, and vlan info since these are often useful during debugging.Signed-off-by Stephen Hemminger <[email protected]>---
v2 - remove casts, changein_portto port
the refcount and offset are property of per-segmentlib/librte_mbuf/rte_mbuf.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-)lib/librte_mbuf/rte_mbuf.c +10
-7@@ -473,18 +473,21 @@ 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\n" , + m, m->buf_iova, m->buf_len); +fprintf (f, +" pkt_len=%u, ol_flags=%#" PRIx64", nb_segs=%u, port=%u, vlan_tci=%#x\n" , + m->pkt_len, m->ol_flags, m->nb_segs, m->port, m->vlan_tci); + nb_segs = m->nb_segs;while (m && nb_segs !=0 ) {__rte_mbuf_sanity_check (m,0 ); -fprintf (f," segment at %p, data=%p, data_len=%u\n" , - m, rte_pktmbuf_mtod(m, void *), (unsigned)m->data_len); +fprintf (f," segment at %p, data=%p, len=%u, off=%u, refcnt=%u\n" , + m, rte_pktmbuf_mtod(m, void *), + m->data_len, m->data_off,rte_mbuf_refcnt_read (m)); + len = dump_len;if (len > m->data_len) len = m->data_len;Signature · 1 line
2.20.1Thanks for this enhancement.
One comment however: I don't see why
vlan_tciwould be important than packet type or rss tag. It is also a bit confusing to display a field which can have a random value (if the vlan flag is not set inol_flags).
Quoted 5 lines
Quoted 2 lines
I'd prefer to dump
vlan_tcionly if the flag is present. Later we could add more fields with the same logic. What do you think?Because this is a debugging hook and easier to always display the value. Thats all.
This is precisely because it is a debug hook that I find dangerous to display a wrong value. As the mbuf are recycled, a mbuf that does not have a vlan_tci can display its previous value, which may look valid.
What about simply doing this?
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->ol_flags & PKT_RX_VLAN) fprintf(f, ", vlan_tci=%#x", m->vlan_tci); fprintf(f, "\n");
If you want I can submit an updated version of your patch.
Quoted 75 lines · On Fri, 27 Dec 2019 10:10:18 +0100 Olivier Matz <[email protected]> wrote:
Hi,
Quoted 60 lines · Stephen Hemminger
Quoted 57 lines · On Thu, 26 Dec 2019 17:15:39 +0100 Olivier Matz <[email protected]> wrote:
Hi,
Quoted 47 lines · Stephen Hemminger
The
rte_pktmbuf_dumpshould display offset, refcount, and vlan info since these are often useful during debugging.Signed-off-by Stephen Hemminger <[email protected]>---
v2 - remove casts, changein_portto port
the refcount and offset are property of per-segmentlib/librte_mbuf/rte_mbuf.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-)lib/librte_mbuf/rte_mbuf.c +10
-7@@ -473,18 +473,21 @@ 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\n" , + m, m->buf_iova, m->buf_len); +fprintf (f, +" pkt_len=%u, ol_flags=%#" PRIx64", nb_segs=%u, port=%u, vlan_tci=%#x\n" , + m->pkt_len, m->ol_flags, m->nb_segs, m->port, m->vlan_tci); + nb_segs = m->nb_segs;while (m && nb_segs !=0 ) {__rte_mbuf_sanity_check (m,0 ); -fprintf (f," segment at %p, data=%p, data_len=%u\n" , - m, rte_pktmbuf_mtod(m, void *), (unsigned)m->data_len); +fprintf (f," segment at %p, data=%p, len=%u, off=%u, refcnt=%u\n" , + m, rte_pktmbuf_mtod(m, void *), + m->data_len, m->data_off,rte_mbuf_refcnt_read (m)); + len = dump_len;if (len > m->data_len) len = m->data_len;Signature · 1 line
2.20.1Thanks for this enhancement.
One comment however: I don't see why
vlan_tciwould be important than packet type or rss tag. It is also a bit confusing to display a field which can have a random value (if the vlan flag is not set inol_flags).Quoted 5 lines
Quoted 2 lines
I'd prefer to dump
vlan_tcionly if the flag is present. Later we could add more fields with the same logic. What do you think?Because this is a debugging hook and easier to always display the value. Thats all.
This is precisely because it is a debug hook that I find dangerous to display a wrong value. As the mbuf are recycled, a mbuf that does not have a
vlan_tcican display its previous value, which may look valid.What about simply doing this?
Quoted 8 lines
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->ol_flags & PKT_RX_VLAN) fprintf(f, ", vlan_tci=%#x", m->vlan_tci); fprintf(f, "\n");If you want I can submit an updated version of your patch
The right flags are more complex, you need to deal with TX vlan. And PKT_RX_VLAN means "this is a vlan packet" it doesn't mean vlan tag is stripped into TCI. That is PKT_RX_VLAN_STRIPPED
Quoted 85 lines · Stephen Hemminger
Quoted 82 lines · On Fri, 27 Dec 2019 10:10:18 +0100 Olivier Matz <[email protected]> wrote:
Hi,
Quoted 60 lines · Stephen Hemminger
Quoted 57 lines · On Thu, 26 Dec 2019 17:15:39 +0100 Olivier Matz <[email protected]> wrote:
Hi,
Quoted 47 lines · Stephen Hemminger
The
rte_pktmbuf_dumpshould display offset, refcount, and vlan info since these are often useful during debugging.Signed-off-by Stephen Hemminger <[email protected]>---
v2 - remove casts, changein_portto port
the refcount and offset are property of per-segmentlib/librte_mbuf/rte_mbuf.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-)lib/librte_mbuf/rte_mbuf.c +10
-7@@ -473,18 +473,21 @@ 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\n" , + m, m->buf_iova, m->buf_len); +fprintf (f, +" pkt_len=%u, ol_flags=%#" PRIx64", nb_segs=%u, port=%u, vlan_tci=%#x\n" , + m->pkt_len, m->ol_flags, m->nb_segs, m->port, m->vlan_tci); + nb_segs = m->nb_segs;while (m && nb_segs !=0 ) {__rte_mbuf_sanity_check (m,0 ); -fprintf (f," segment at %p, data=%p, data_len=%u\n" , - m, rte_pktmbuf_mtod(m, void *), (unsigned)m->data_len); +fprintf (f," segment at %p, data=%p, len=%u, off=%u, refcnt=%u\n" , + m, rte_pktmbuf_mtod(m, void *), + m->data_len, m->data_off,rte_mbuf_refcnt_read (m)); + len = dump_len;if (len > m->data_len) len = m->data_len;Signature · 1 line
2.20.1Thanks for this enhancement.
One comment however: I don't see why
vlan_tciwould be important than packet type or rss tag. It is also a bit confusing to display a field which can have a random value (if the vlan flag is not set inol_flags).Quoted 5 lines
Quoted 2 lines
I'd prefer to dump
vlan_tcionly if the flag is present. Later we could add more fields with the same logic. What do you think?Because this is a debugging hook and easier to always display the value. Thats all.
This is precisely because it is a debug hook that I find dangerous to display a wrong value. As the mbuf are recycled, a mbuf that does not have a
vlan_tcican display its previous value, which may look valid.What about simply doing this?
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->ol_flags & PKT_RX_VLAN) fprintf(f, ", vlan_tci=%#x", m->vlan_tci); fprintf(f, "\n");
Quoted 5 lines
Quoted 1 line
If you want I can submit an updated version of your patch
The right flags are more complex, you need to deal with TX vlan. And
PKT_RX_VLANmeans "this is a vlan packet" it doesn't mean vlan tag is stripped into TCI. That isPKT_RX_VLAN_STRIPPED
PKT_RX_VLAN means that m->vlan_tci is valid, and this is what we want here.
PATCH v3 1/1 mbuf: display more fields in dump
In reply to Stephen HemmingerThe rte_pktmbuf_dump should display offset, refcount, and vlan info since these are often useful during debugging.
---
v3 - only display vlan tci if offload flags say it is there
display packet type
v2 - remove casts, change in_port to port
the refcount and offset are property of per-segment
lib/librte_mbuf/rte_mbuf.c | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-)
lib/librte_mbuf/rte_mbuf.c +14 -7
@@ -675,18 +675,25 @@ 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\n" , + m, m->buf_iova, m->buf_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->ol_flags & (PKT_RX_VLAN |PKT_TX_VLAN )) +fprintf (f,", vlan_tci=%u" , m->vlan_tci); + +fprintf (f,", ptype=%#" PRIx32"\n" , m->packet_type); + nb_segs = m->nb_segs;while (m && nb_segs !=0 ) {__rte_mbuf_sanity_check (m,0 ); -fprintf (f," segment at %p, data=%p, data_len=%u\n" , - m, rte_pktmbuf_mtod(m, void *), (unsigned)m->data_len); +fprintf (f," segment at %p, data=%p, len=%u, off=%u, refcnt=%u\n" , + m, rte_pktmbuf_mtod(m, void *), + m->data_len, m->data_off,rte_mbuf_refcnt_read (m)); + len = dump_len;if (len > m->data_len) len = m->data_len;
Signature · 1 line
2.20.1
Quoted 5 lines · Stephen Hemminger
The
rte_pktmbuf_dumpshould display offset, refcount, and vlan info since these are often useful during debugging.Signed-off-by Stephen Hemminger <[email protected]>Acked-by Andrew Rybchenko <[email protected]>
Thomas Monjalon
Applied06/02/2020 10:48, Olivier Matz:
Quoted 8 lines · Stephen Hemminger
Quoted 5 lines
The
rte_pktmbuf_dumpshould display offset, refcount, and vlan info since these are often useful during debugging.Signed-off-by Stephen Hemminger <[email protected]>Acked-by Andrew Rybchenko <[email protected]>Acked-by Olivier Matz <[email protected]>
Applied, thanks