From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jerin Jacob Subject: [PATCH 24/28] net/nfp: use eal I/O device memory read/write API Date: Wed, 14 Dec 2016 07:25:54 +0530 Message-ID: <1481680558-4003-25-git-send-email-jerin.jacob@caviumnetworks.com> References: <1481680558-4003-1-git-send-email-jerin.jacob@caviumnetworks.com> Mime-Version: 1.0 Content-Type: text/plain Cc: , , , , , Santosh Shukla , Jerin Jacob , Alejandro Lucero To: Return-path: Received: from NAM03-DM3-obe.outbound.protection.outlook.com (mail-dm3nam03on0046.outbound.protection.outlook.com [104.47.41.46]) by dpdk.org (Postfix) with ESMTP id 375FC56B7 for ; Wed, 14 Dec 2016 02:59:14 +0100 (CET) In-Reply-To: <1481680558-4003-1-git-send-email-jerin.jacob@caviumnetworks.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Santosh Shukla Replace the raw I/O device memory read/write access with eal abstraction for I/O device memory read/write access to fix portability issues across different architectures. Signed-off-by: Santosh Shukla Signed-off-by: Jerin Jacob CC: Alejandro Lucero --- drivers/net/nfp/nfp_net_pmd.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/net/nfp/nfp_net_pmd.h b/drivers/net/nfp/nfp_net_pmd.h index c180972..ec3d35e 100644 --- a/drivers/net/nfp/nfp_net_pmd.h +++ b/drivers/net/nfp/nfp_net_pmd.h @@ -121,25 +121,26 @@ struct nfp_net_adapter; #define NFD_CFG_MINOR_VERSION_of(x) (((x) >> 0) & 0xff) #include +#include static inline uint8_t nn_readb(volatile const void *addr) { - return *((volatile const uint8_t *)(addr)); + return rte_readb(addr); } static inline void nn_writeb(uint8_t val, volatile void *addr) { - *((volatile uint8_t *)(addr)) = val; + rte_writeb(val, addr); } static inline uint32_t nn_readl(volatile const void *addr) { - return *((volatile const uint32_t *)(addr)); + return rte_readl(addr); } static inline void nn_writel(uint32_t val, volatile void *addr) { - *((volatile uint32_t *)(addr)) = val; + rte_writel(val, addr); } static inline uint64_t nn_readq(volatile void *addr) -- 2.5.5