From: Santosh Shukla Date: Wed, 18 Jan 2017 01:21:38 +0000 (+0530) Subject: net/nfp: use I/O device memory read/write API X-Git-Tag: spdx-start~4740 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=7b0983c26c0257b0a4627c31621dab14b1898598;p=dpdk.git net/nfp: use I/O device memory read/write API 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. CC: Alejandro Lucero Signed-off-by: Santosh Shukla Signed-off-by: Jerin Jacob Acked-by: Alejandro Lucero --- diff --git a/drivers/net/nfp/nfp_net_pmd.h b/drivers/net/nfp/nfp_net_pmd.h index 4df2275545..eec56bc1c8 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_read8(addr); } static inline void nn_writeb(uint8_t val, volatile void *addr) { - *((volatile uint8_t *)(addr)) = val; + rte_write8(val, addr); } static inline uint32_t nn_readl(volatile const void *addr) { - return *((volatile const uint32_t *)(addr)); + return rte_read32(addr); } static inline void nn_writel(uint32_t val, volatile void *addr) { - *((volatile uint32_t *)(addr)) = val; + rte_write32(val, addr); } static inline uint64_t nn_readq(volatile void *addr)