From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 11FFEA04DC; Sat, 31 Oct 2020 23:00:00 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 5B5FC5947; Sat, 31 Oct 2020 22:59:58 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by dpdk.org (Postfix) with ESMTP id BD2A856A3 for ; Sat, 31 Oct 2020 22:59:56 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1604181595; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=0ATADvwXgsJsmMDmhfOGBzg2n9TkkZcFcVGZKG/ilD8=; b=dtln17uEez+lN5ICpN8ikUZhLhh04L57G44OkYUcrBMcw5x4nHQEvWw/02wxdxfisW0zf1 Qc8Sbeioq/vgvMFWbeG7/eevogECrM0xnYkM0dGHhGTYtLiB/Yw4i15EcKLBC0NA7jX/k2 DX+Bl49qE7IDBYWHT32f5Cpy/jelHcE= Received: from mail-vs1-f70.google.com (mail-vs1-f70.google.com [209.85.217.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-352-BdvdnYDpPEeSzVX1Kk854Q-1; Sat, 31 Oct 2020 17:59:53 -0400 X-MC-Unique: BdvdnYDpPEeSzVX1Kk854Q-1 Received: by mail-vs1-f70.google.com with SMTP id i5so3075489vsb.6 for ; Sat, 31 Oct 2020 14:59:53 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=0ATADvwXgsJsmMDmhfOGBzg2n9TkkZcFcVGZKG/ilD8=; b=hJcCoHd3VKQ13EQzj/v1fcq+eUpN1aph+flku5cFUwjZKxolnR2IBjrYHeB8f1uJYu RqyKhOOwYoAsWi7C7IlxQFL2JraTw9XMqFcCzKdPSyGEjFRZIO3JRYemgKcSW+XB8jHQ 63ip1qllMCAZHVBYkbv0AI0Pu30hWCq0Lyrrv5RKOq2IrV8ThHoNZ97BcLbN7tKOCY2N YOghEZom7UC98daCSOvMRE2UXbhgVe1QfJI6LE2ZaBfmfV3TxiZ8c6B2qXU5MUotzcAL Z4KiHvpdshxi6+iJcsy9ddFsRWOhAGs3wZ45PflSTKWju9Bcr+ObfFLqsEvNmzZGpTqF lfJA== X-Gm-Message-State: AOAM532hlkDmIX1bWWsWSF3UpJiUtGmCRYaXr4/QjfLBEJz+9hisD/QP 5RMAUrp+0nGItTXJPZQuJNZMkh0VtjfiCAcuKI8L8nr8x0PU/Ept8ItZ0gcIin24P0lw3oTYHiA P1YkwrqQRHKm2FyEkCic= X-Received: by 2002:a67:f54b:: with SMTP id z11mr1684096vsn.17.1604181593006; Sat, 31 Oct 2020 14:59:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyCFMdRZw/XBk6ac/dLDhu2ZFDC76Mahhv598GAwkHt6dnPDiaEorC8WstdHjmZQ9n4SOpnGpVRp1vKWO7eSuc= X-Received: by 2002:a67:f54b:: with SMTP id z11mr1684086vsn.17.1604181592792; Sat, 31 Oct 2020 14:59:52 -0700 (PDT) MIME-Version: 1.0 References: <20200612212434.6852-2-timothy.mcdaniel@intel.com> <1604168282-30079-1-git-send-email-timothy.mcdaniel@intel.com> <1604168282-30079-10-git-send-email-timothy.mcdaniel@intel.com> In-Reply-To: <1604168282-30079-10-git-send-email-timothy.mcdaniel@intel.com> From: David Marchand Date: Sat, 31 Oct 2020 22:59:41 +0100 Message-ID: To: Timothy McDaniel Cc: dev , Erik Gabriel Carrillo , Gage Eads , Van Haaren Harry , Jerin Jacob Kollanukkaran , Thomas Monjalon Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=dmarchan@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] [PATCH v14 09/23] event/dlb: add xstats X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Sat, Oct 31, 2020 at 7:21 PM Timothy McDaniel 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