[dpdk-dev] [PATCH v14 09/23] event/dlb: add xstats
David Marchand
david.marchand at redhat.com
Sat Oct 31 22:59:41 CET 2020
On Sat, Oct 31, 2020 at 7:21 PM Timothy McDaniel
<timothy.mcdaniel at intel.com> wrote:
> +void
> +dlb_eventdev_dump(struct rte_eventdev *dev, FILE *f)
> +{
> + struct dlb_eventdev *dlb;
> + struct dlb_hw_dev *handle;
> + int i;
> +
> + if (f == NULL) {
> + printf("Invalid file pointer\n");
No printf in a driver!
This check should probably be at eventdev layer level.
> + return;
> + }
> +
> + if (dev == NULL) {
dev can't be NULL.
> + fprintf(f, "Invalid event device\n");
> + return;
> + }
> +
> + dlb = dlb_pmd_priv(dev);
> +
> + if (dlb == NULL) {
I wonder if this can happen, dev_private is allocated at the same time
the eventdev dev is.
> + fprintf(f, "DLB Event device cannot be dumped!\n");
> + return;
> + }
> +
--
David Marchand
More information about the dev
mailing list