summaryrefslogtreecommitdiff
path: root/lib/librte_eal/common/include/rte_devargs.h
diff options
context:
space:
mode:
authorAlejandro Lucero <alejandro.lucero@netronome.com>2018-11-07 09:44:56 +0000
committerThomas Monjalon <thomas@monjalon.net>2018-11-07 14:42:28 +0100
commitee0e074f81431f6f1223a51b84ee72b354b0445c (patch)
tree3855b25bc34f70c70d0cf3df8b46caea13576f06 /lib/librte_eal/common/include/rte_devargs.h
parent4531d096d105a9ef65c516fc59e86fc0c56e46cc (diff)
downloaddpdk-ee0e074f81431f6f1223a51b84ee72b354b0445c.zip
dpdk-ee0e074f81431f6f1223a51b84ee72b354b0445c.tar.gz
dpdk-ee0e074f81431f6f1223a51b84ee72b354b0445c.tar.xz
mem: fix DMA mask width sanity check
Current code has different max DMA mask width values for 32 and 64 bits systems. IOMMU hardware could report a higher supported width than current MAX_DMA_MASK_BITS when RTE_ARCH_64 is not defined. This is actually true with a 32 bits kernel running in a 64 bits server with IOMMU hardware. This could also be a problem with embedded systems using an IOMMU designed for 64 bits in a 32 bits system. This patch leaves a single max DMA mask width which will make sure the mask width is within the range for 64 bits variables used for DMA mask. This also will avoid wrong values because any value higher than 64 bits is likely wrong. Fixes: 223b7f1d5ef6 ("mem: add function for checking memseg IOVA") Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com> Acked-by: Anatoly Burakov <anatoly.burakov@intel.com> Tested-by: Ferruh Yigit <ferruh.yigit@intel.com>
Diffstat (limited to 'lib/librte_eal/common/include/rte_devargs.h')
0 files changed, 0 insertions, 0 deletions