[dpdk-dev] [PATCH 07/22] event/dlb2: add xstats

Chen, Mike Ximing mike.ximing.chen at intel.com
Fri Sep 18 02:37:58 CEST 2020



> -----Original Message-----
> From: McDaniel, Timothy <timothy.mcdaniel at intel.com>
> Sent: Thursday, September 17, 2020 5:26 PM
> To: Chen, Mike Ximing <mike.ximing.chen at intel.com>
> Cc: dev at dpdk.org; Carrillo, Erik G <erik.g.carrillo at intel.com>; Eads, Gage
> <gage.eads at intel.com>; Van Haaren, Harry <harry.van.haaren at intel.com>;
> jerinj at marvell.com
> Subject: RE: [dpdk-dev] [PATCH 07/22] event/dlb2: add xstats
> 
> 
> 
> > -----Original Message-----
> > From: Chen, Mike Ximing <mike.ximing.chen at intel.com>
> > Sent: Thursday, September 17, 2020 3:58 PM
> > To: McDaniel, Timothy <timothy.mcdaniel at intel.com>
> > Cc: dev at dpdk.org; Carrillo, Erik G <Erik.G.Carrillo at intel.com>; Eads,
> > Gage <gage.eads at intel.com>; Van Haaren, Harry
> > <harry.van.haaren at intel.com>; jerinj at marvell.com
> > Subject: RE: [dpdk-dev] [PATCH 07/22] event/dlb2: add xstats
> >
> > <snip>
> > > +dlb2_eventdev_dump(struct rte_eventdev *dev, FILE *f) {
> > > +	struct dlb2_eventdev *dlb2;
> > > +	struct dlb2_hw_dev *handle;
> > > +	int i;
> > > +
> > > +	if (!f) {
> > > +		printf("Invalid file pointer\n");
> > > +		return;
> > > +	}
> > > +
> > > +	if (!dev) {
> > > +		fprintf(f, "Invalid event device\n");
> > > +		return;
> > > +	}
> > > +
> > > +	dlb2 = dlb2_pmd_priv(dev);
> > > +
> > > +	if (!dlb2) {
> > > +		fprintf(f, "DLB2 Event device cannot be dumped!\n");
> > > +		return;
> > > +	}
> > > +
> >
> > Not sure if this is enforced. The DPDK coding style discourages using
> > ! on pointers ( see section 1. 8.1 at
> > https://doc.dpdk.org/guides/contributing/coding_style.html).
> >
> 
> I see !ptr used in many other dpdk components, and it is not flagged by
> checkpatch either.
> 
Yes, I do see !ptr in dpdk functions. I guess the rule is not enforced.


More information about the dev mailing list