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 E437AA0C55; Wed, 13 Oct 2021 17:18:26 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DC63A41202; Wed, 13 Oct 2021 17:18:07 +0200 (CEST) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mails.dpdk.org (Postfix) with ESMTP id 99702411F2 for ; Wed, 13 Oct 2021 17:18:04 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10136"; a="290944072" X-IronPort-AV: E=Sophos;i="5.85,371,1624345200"; d="scan'208";a="290944072" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Oct 2021 08:17:57 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.85,371,1624345200"; d="scan'208";a="441682069" Received: from silpixa00399126.ir.intel.com ([10.237.223.151]) by orsmga006.jf.intel.com with ESMTP; 13 Oct 2021 08:17:56 -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: Wed, 13 Oct 2021 16:17:27 +0100 Message-Id: <20211013151736.762378-5-bruce.richardson@intel.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20211013151736.762378-1-bruce.richardson@intel.com> References: <20210924102942.2878051-1-bruce.richardson@intel.com> <20211013151736.762378-1-bruce.richardson@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v7 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 Reviewed-by: Conor Walsh --- 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 dd2f1c9b57..2952417126 100644 --- a/drivers/dma/skeleton/skeleton_dmadev.c +++ b/drivers/dma/skeleton/skeleton_dmadev.c @@ -431,6 +431,15 @@ skeldma_completed_status(void *dev_private, return count; } +static uint16_t +skeldma_burst_capacity(const void *dev_private, uint16_t vchan) +{ + const struct skeldma_hw *hw = 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, @@ -469,6 +478,7 @@ skeldma_create(const char *name, struct rte_vdev_device *vdev, int lcore_id) dev->fp_obj->submit = skeldma_submit; dev->fp_obj->completed = skeldma_completed; dev->fp_obj->completed_status = skeldma_completed_status; + dev->fp_obj->burst_capacity = skeldma_burst_capacity; hw = dev->data->dev_private; hw->lcore_id = lcore_id; -- 2.30.2