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 8A186A04AC; Mon, 24 Aug 2020 11:56:57 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 71647100C; Mon, 24 Aug 2020 11:56:56 +0200 (CEST) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 3AD6CF90 for ; Mon, 24 Aug 2020 11:56:55 +0200 (CEST) IronPort-SDR: J7NdmOj6c1QNgH2JZ6KBysgcI93jEqBpQ/5QVrbZcLRxrBblBsy4LKw/NZw5HH2WfanMH3B1fy 42VoQ93KHhRg== X-IronPort-AV: E=McAfee;i="6000,8403,9722"; a="153281360" X-IronPort-AV: E=Sophos;i="5.76,348,1592895600"; d="scan'208";a="153281360" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Aug 2020 02:56:54 -0700 IronPort-SDR: 5VfAFcfDP4dUP4WoU04q3o2d4xqRto072fBkM9Gi9UTd3DsdQcQow5jxWuldQ5qxOyH0e2dB5r gbWkdBRqsYXQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.76,348,1592895600"; d="scan'208";a="499393087" Received: from klaatz-mobl1.ger.corp.intel.com (HELO [10.213.236.56]) ([10.213.236.56]) by fmsmga005.fm.intel.com with ESMTP; 24 Aug 2020 02:56:53 -0700 To: Bruce Richardson , dev@dpdk.org Cc: cheng1.jiang@intel.com, patrick.fu@intel.com, ping.yu@intel.com References: <20200721095140.719297-1-bruce.richardson@intel.com> <20200821162944.29840-1-bruce.richardson@intel.com> <20200821162944.29840-18-bruce.richardson@intel.com> From: "Laatz, Kevin" Message-ID: <34cf6440-2670-fcfd-fb30-edcd0d9b29f7@intel.com> Date: Mon, 24 Aug 2020 10:56:52 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.11.0 MIME-Version: 1.0 In-Reply-To: <20200821162944.29840-18-bruce.richardson@intel.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Subject: Re: [dpdk-dev] [PATCH v2 17/18] raw/ioat: add xstats tracking for idxd devices 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 21/08/2020 17:29, Bruce Richardson wrote: > Add update of the relevant stats for the data path functions and point the > overall device struct xstats function pointers to the existing ioat > functions. > > At this point, all necessary hooks for supporting the existing unit tests > are in place so call them for each device. > > Signed-off-by: Bruce Richardson > --- > drivers/raw/ioat/idxd_pci.c | 3 +++ > drivers/raw/ioat/idxd_vdev.c | 3 +++ > drivers/raw/ioat/ioat_rawdev_test.c | 2 +- > drivers/raw/ioat/rte_ioat_rawdev_fns.h | 30 +++++++++++++++----------- > 4 files changed, 25 insertions(+), 13 deletions(-) > diff --git a/drivers/raw/ioat/rte_ioat_rawdev_fns.h b/drivers/raw/ioat/rte_ioat_rawdev_fns.h > index 66e3f1a836..db8608fa6b 100644 > --- a/drivers/raw/ioat/rte_ioat_rawdev_fns.h > +++ b/drivers/raw/ioat/rte_ioat_rawdev_fns.h > @@ -182,6 +182,8 @@ struct rte_idxd_user_hdl { > */ > struct rte_idxd_rawdev { > enum rte_ioat_dev_type type; > + struct rte_ioat_xstats xstats; > + > void *portal; /* address to write the batch descriptor */ > > /* counters to track the batches and the individual op handles */ > @@ -330,19 +332,15 @@ __idxd_enqueue_copy(int dev_id, rte_iova_t src, rte_iova_t dst, > IDXD_FLAG_CACHE_CONTROL; > > /* check for room in the handle ring */ > - if (((idxd->next_free_hdl + 1) & (idxd->hdl_ring_sz - 1)) == idxd->next_ret_hdl) { > - rte_errno = ENOSPC; > - return 0; > - } > - if (b->op_count >= BATCH_SIZE) { > - rte_errno = ENOSPC; > - return 0; > - } > + if (((idxd->next_free_hdl + 1) & (idxd->hdl_ring_sz - 1)) == idxd->next_ret_hdl) > + goto failed; > + > + if (b->op_count >= BATCH_SIZE) > + goto failed; > + > /* check that we can actually use the current batch */ > - if (b->submitted) { > - rte_errno = ENOSPC; > - return 0; > - } > + if (b->submitted) > + goto failed; This 'cleanup' can be done when initially adding the function in patch "raw/ioat: add data path for idxd devices", allowing for this patch to be more concise. /Kevin