X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=lib%2Flibrte_eal%2Fcommon%2Feal_common_memory.c;h=d47ea4938f90b5908c5b94f158511dd07f7c8f25;hb=refs%2Ftags%2Fupstream%2F18.11-rc3;hp=87fd9921fb04706b2eaf58b2f9869615a757b60d;hpb=88fab00d4402af240c1b7cc2566133aece115488;p=deb_dpdk.git diff --git a/lib/librte_eal/common/eal_common_memory.c b/lib/librte_eal/common/eal_common_memory.c index 87fd9921..d47ea493 100644 --- a/lib/librte_eal/common/eal_common_memory.c +++ b/lib/librte_eal/common/eal_common_memory.c @@ -439,11 +439,7 @@ check_iova(const struct rte_memseg_list *msl __rte_unused, return 1; } -#if defined(RTE_ARCH_64) #define MAX_DMA_MASK_BITS 63 -#else -#define MAX_DMA_MASK_BITS 31 -#endif /* check memseg iovas are within the required range based on dma mask */ static int __rte_experimental @@ -453,7 +449,8 @@ check_dma_mask(uint8_t maskbits, bool thread_unsafe) uint64_t mask; int ret; - /* sanity check */ + /* Sanity check. We only check width can be managed with 64 bits + * variables. Indeed any higher value is likely wrong. */ if (maskbits > MAX_DMA_MASK_BITS) { RTE_LOG(ERR, EAL, "wrong dma mask size %u (Max: %u)\n", maskbits, MAX_DMA_MASK_BITS);