From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id EC9F0A0548; Fri, 24 Sep 2021 12:30:19 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1A4834130D; Fri, 24 Sep 2021 12:30:07 +0200 (CEST) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by mails.dpdk.org (Postfix) with ESMTP id 9545E4130B for ; Fri, 24 Sep 2021 12:30:05 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10116"; a="203541136" X-IronPort-AV: E=Sophos;i="5.85,319,1624345200"; d="scan'208";a="203541136" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Sep 2021 03:30:05 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.85,319,1624345200"; d="scan'208";a="436117682" Received: from silpixa00399126.ir.intel.com ([10.237.223.29]) by orsmga006.jf.intel.com with ESMTP; 24 Sep 2021 03:30:03 -0700 From: Bruce Richardson To: dev@dpdk.org Cc: conor.walsh@intel.com, kevin.laatz@intel.com, fengchengwen@huawei.com, jerinj@marvell.com, Bruce Richardson Date: Fri, 24 Sep 2021 11:29:37 +0100 Message-Id: <20210924102942.2878051-5-bruce.richardson@intel.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210924102942.2878051-1-bruce.richardson@intel.com> References: <20210826183301.333442-1-bruce.richardson@intel.com> <20210924102942.2878051-1-bruce.richardson@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v6 04/13] dma/skeleton: add burst capacity function X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 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" Implement function to return the remaining space for operations. Signed-off-by: Bruce Richardson --- drivers/dma/skeleton/skeleton_dmadev.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/dma/skeleton/skeleton_dmadev.c b/drivers/dma/skeleton/skeleton_dmadev.c index ada9a3be68..65655261e6 100644 --- a/drivers/dma/skeleton/skeleton_dmadev.c +++ b/drivers/dma/skeleton/skeleton_dmadev.c @@ -432,6 +432,15 @@ skeldma_completed_status(struct rte_dma_dev *dev, return count; } +static uint16_t +skeldma_burst_capacity(const struct rte_dma_dev *dev, uint16_t vchan) +{ + struct skeldma_hw *hw = dev->dev_private; + + RTE_SET_USED(vchan); + return rte_ring_count(hw->desc_empty); +} + static const struct rte_dma_dev_ops skeldma_ops = { .dev_info_get = skeldma_info_get, .dev_configure = skeldma_configure, @@ -467,6 +476,7 @@ skeldma_create(const char *name, struct rte_vdev_device *vdev, int lcore_id) dev->submit = skeldma_submit; dev->completed = skeldma_completed; dev->completed_status = skeldma_completed_status; + dev->burst_capacity = skeldma_burst_capacity; dev->dev_ops = &skeldma_ops; dev->device = &vdev->device; -- 2.30.2