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 25D7FA0C48; Tue, 6 Jul 2021 22:29:11 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 11EB141333; Tue, 6 Jul 2021 22:29:11 +0200 (CEST) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by mails.dpdk.org (Postfix) with ESMTP id A15DA4067C for ; Tue, 6 Jul 2021 22:29:09 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10037"; a="196470315" X-IronPort-AV: E=Sophos;i="5.83,329,1616482800"; d="scan'208";a="196470315" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Jul 2021 13:29:07 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.83,329,1616482800"; d="scan'208";a="486522064" Received: from silpixa00399126.ir.intel.com ([10.237.223.29]) by FMSMGA003.fm.intel.com with ESMTP; 06 Jul 2021 13:29:06 -0700 From: Bruce Richardson To: dev@dpdk.org Cc: Chengwen Feng , Jerin Jacob , Jerin Jacob , =?UTF-8?q?Morten=20Br=C3=B8rup?= , Bruce Richardson Date: Tue, 6 Jul 2021 21:28:34 +0100 Message-Id: <20210706202841.661302-3-bruce.richardson@intel.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210706202841.661302-1-bruce.richardson@intel.com> References: <1625231891-2963-1-git-send-email-fengchengwen@huawei.com> <20210706202841.661302-1-bruce.richardson@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [RFC UPDATE PATCH 2/9] dmadev: change virtual addresses to IOVA 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" For 32-bit builds, iova's are 64-bit still, so to ensure we can still use PA mode on 32-bit we need to convert all enqueue "void *" parameters to rte_iova_t Signed-off-by: Bruce Richardson --- lib/dmadev/rte_dmadev.h | 8 ++++---- lib/dmadev/rte_dmadev_core.h | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/dmadev/rte_dmadev.h b/lib/dmadev/rte_dmadev.h index f74fc6adb..1659ceaf2 100644 --- a/lib/dmadev/rte_dmadev.h +++ b/lib/dmadev/rte_dmadev.h @@ -133,8 +133,8 @@ typedef int32_t dma_cookie_t; * dma_scatterlist - can hold scatter DMA operation request */ struct dma_scatterlist { - void *src; - void *dst; + rte_iova_t src; + rte_iova_t dst; uint32_t length; }; @@ -505,7 +505,7 @@ rte_dmadev_queue_info_get(uint16_t dev_id, uint16_t vq_id, */ __rte_experimental static inline dma_cookie_t -rte_dmadev_copy(uint16_t dev_id, uint16_t vq_id, void *src, void *dst, +rte_dmadev_copy(uint16_t dev_id, uint16_t vq_id, rte_iova_t src, rte_iova_t dst, uint32_t length, uint64_t flags) { struct rte_dmadev *dev = &rte_dmadevices[dev_id]; @@ -579,7 +579,7 @@ rte_dmadev_copy_sg(uint16_t dev_id, uint16_t vq_id, __rte_experimental static inline dma_cookie_t rte_dmadev_fill(uint16_t dev_id, uint16_t vq_id, uint64_t pattern, - void *dst, uint32_t length, uint64_t flags) + rte_iova_t dst, uint32_t length, uint64_t flags) { struct rte_dmadev *dev = &rte_dmadevices[dev_id]; return (*dev->fill)(dev, vq_id, pattern, dst, length, flags); diff --git a/lib/dmadev/rte_dmadev_core.h b/lib/dmadev/rte_dmadev_core.h index a3afea251..80b56ed83 100644 --- a/lib/dmadev/rte_dmadev_core.h +++ b/lib/dmadev/rte_dmadev_core.h @@ -17,7 +17,7 @@ struct rte_dmadev; typedef dma_cookie_t (*dmadev_copy_t)(struct rte_dmadev *dev, uint16_t vq_id, - void *src, void *dst, + rte_iova_t src, rte_iova_t dst, uint32_t length, uint64_t flags); /**< @internal Function used to enqueue a copy operation. */ @@ -27,7 +27,7 @@ typedef dma_cookie_t (*dmadev_copy_sg_t)(struct rte_dmadev *dev, uint16_t vq_id, /**< @internal Function used to enqueue a scatter list copy operation. */ typedef dma_cookie_t (*dmadev_fill_t)(struct rte_dmadev *dev, uint16_t vq_id, - uint64_t pattern, void *dst, + uint64_t pattern, rte_iova_t dst, uint32_t length, uint64_t flags); /**< @internal Function used to enqueue a fill operation. */ -- 2.30.2