[dpdk-dev] [PATCH v4 1/3] app/testpmd: move dumping packets to a separate function

Raslan Darawsheh rasland at mellanox.com
Tue Oct 16 12:10:52 CEST 2018


Hi Ferruh,

PSB.

Kindest regards,
Raslan Darawsheh

> -----Original Message-----
> From: Ferruh Yigit <ferruh.yigit at intel.com>
> Sent: Thursday, October 11, 2018 5:56 PM
> To: Raslan Darawsheh <rasland at mellanox.com>; jingjing.wu at intel.com
> Cc: Thomas Monjalon <thomas at monjalon.net>; dev at dpdk.org; Shahaf
> Shuler <shahafs at mellanox.com>; Xueming(Steven) Li
> <xuemingl at mellanox.com>; Ori Kam <orika at mellanox.com>;
> jerin.jacob at caviumnetworks.com; david.marchand at 6wind.com;
> bernard.iremonger at intel.com
> Subject: Re: [dpdk-dev] [PATCH v4 1/3] app/testpmd: move dumping
> packets to a separate function
> 
> On 10/7/2018 8:38 AM, Raslan Darawsheh wrote:
> > verbosity for the received/sent packets is needed in all of the
> > forwarding engines so moving it to be in a separate function
> 
> +1, this is good idea.
> 
> > ---
> > changes in v3:
> > 	- add util.c in the mason.build file
> > 	- restore missing check for ol_flags & PKT_RX_RSS_HASH.
> > 	- add local variables for rte_be_to_cpu to avoid long
> > 	  lines.
> >
> > changes in v4:
> > 	- add missing l3 and l4 checks
> > ---
> >
> > Signed-off-by: Raslan Darawsheh <rasland at mellanox.com>
> 
> <...>
> 
> > @@ -0,0 +1,150 @@
> > +/* SPDX-License-Identifie.r: BSD-3-Clause
> > + * Copyri.ght(c) 2010-2018 Mellanox technology.
> 
> It can be good to keep original Copyright owner when moving some code
> from one file another.
I added a new copy right since it contains some new functionality as well not only the original one.
> 
> <...>
> 
> > +		sw_packet_type = rte_net_get_ptype(mb, &hdr_lens,
> > +						   RTE_PTYPE_ALL_MASK);
> 
> DPDK coding convention requires a single tab in next line, instead of alligning
> to the parenthesis.
Will send a new version with these fixed.
> 
> <...>
> 
> > +			/* Do not support ipv4 option field */
> > +			if (RTE_ETH_IS_IPV4_HDR(packet_type)) {
> > +				l3_len = sizeof(struct ipv4_hdr);
> > +				ipv4_hdr = rte_pktmbuf_mtod_offset(mb,
> > +				struct ipv4_hdr *,
> > +				l2_len);
> > +				l4_proto = ipv4_hdr->next_proto_id;
> 
> The syntax broken here.
This is the same as present in rxonly file nothing changed
> 
> <...>
> 
> > +		}
> > +		printf(" - %s queue=0x%x", is_rx ? "Receive" : "Send",
> > +			(unsigned int) queue);
> 
> Isn't this same information with initial header line, does this add any
> extra/new information?

This is as of per packet, since you can get more than one packet printed when you have RSS the first one will be a print for the entire burst,
and then you'll get this print for each packet printed.


More information about the dev mailing list