[EXT] Re: [PATCH v2 2/3] graph: pcap capture for graph nodes

Amit Prakash Shukla amitprakashs at marvell.com
Thu Jan 19 15:37:49 CET 2023


Hi Stephen,

Thanks for the reply. Please find my reply in-line.

> -----Original Message-----
> From: Stephen Hemminger <stephen at networkplumber.org>
> Sent: Thursday, January 12, 2023 10:00 PM
> To: Amit Prakash Shukla <amitprakashs at marvell.com>
> Cc: Jerin Jacob Kollanukkaran <jerinj at marvell.com>; Kiran Kumar
> Kokkilagadda <kirankumark at marvell.com>; Nithin Kumar Dabilpuram
> <ndabilpuram at marvell.com>; dev at dpdk.org
> Subject: Re: [EXT] Re: [PATCH v2 2/3] graph: pcap capture for graph nodes
> 
> On Thu, 12 Jan 2023 09:57:50 +0000
> Amit Prakash Shukla <amitprakashs at marvell.com> wrote:
> 
> > Hi Stephen,
> >
> > > -----Original Message-----
> > > From: Stephen Hemminger <stephen at networkplumber.org>
> > > Sent: Wednesday, January 11, 2023 9:37 PM
> > > To: Amit Prakash Shukla <amitprakashs at marvell.com>
> > > Cc: Jerin Jacob Kollanukkaran <jerinj at marvell.com>; Kiran Kumar
> > > Kokkilagadda <kirankumark at marvell.com>; Nithin Kumar Dabilpuram
> > > <ndabilpuram at marvell.com>; dev at dpdk.org
> > > Subject: [EXT] Re: [PATCH v2 2/3] graph: pcap capture for graph
> > > nodes
> > >
> > > External Email
> > >
> > > --------------------------------------------------------------------
> > > --
> > > On Wed, 11 Jan 2023 14:23:41 +0530
> > > Amit Prakash Shukla <amitprakashs at marvell.com> wrote:
> > >
> > > > +
> > > > +#define PCAP_DUMP_DATA(dbuf, buf_size, cur_len, sbuf, len)
> \
> > > > +do {                                                                         \
> > > > +	if ((cur_len + len) >= buf_size)                                     \
> > > > +		break;                                                       \
> > > > +	rte_memcpy(dbuf + cur_len, sbuf, len);                               \
> > > > +	cur_len += len;                                                      \
> > > > +} while (0)
> > > > +
> > >
> > > Why do you need this to be a macro.
> > > Macro's are evil, have side effects and hide code.
> >
> > I had added macro for future, if lot of custom data is to be added to
> > pcapng. Anyways I will remove it in next version of patch.
> 
> One other option is to add a new custom block type or options in pcapng.
> Keep comment as a string, since that is what wireshark etc no how to handle.
> Also, packet id data might be useful for graph.

I gave a try by adding a support for custom options in libpcapng, but it seems wireshark does not support PEN in custom options as of now. 
Wireshark was not dissecting dummy PEN that was passed in custom option.

> 
> 
> https://urldefense.proofpoint.com/v2/url?u=https-
> 3A__pcapng.github.io_pcapng_draft-2Dtuexen-2Dopsawg-
> 2Dpcapng.html&d=DwICAg&c=nKjWec2b6R0mOyPaz7xtfQ&r=ALGdXl3fZgFG
> R69VnJLdSnADun7zLaXG1p5Rs7pXihE&m=L7hbHExlVJ9DVyJLvofg2oChAcRcF
> GBypawp8vQkR5nAGLbwS2NdSNepsq8v5Zx7&s=1tIiV96rTBAhzcLS_JiJ5FRbL
> PUja4HyT3rhQA4RIsg&e=


More information about the dev mailing list