We use `spdk_map_bar_rte()` to read mapped addresses from PCI BARs. This function is currently checking for NULL in each pair. But in PCI memory, some registers can be left unused, in which case they are set to 0. As a result, we may read some NULL pointers from BARs, which is OK. To check if given address is indeed invalid, we should first check if it is used. So it is best to delegate such checks to the user of this function. In fact, users already do the NULL check where it is needed (ex: virtio_pci.c:390, nvme_pcie.c:589) so this patch just removes them from `spdk_map_bar_rte()`. This solves github issue #1206 Change-Id: I88021ceca1b9e9d503b224f790819999cd16da01 Signed-off-by: Vitaliy Mysak <vitaliy.mysak@intel.com> Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1129 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> |
||
---|---|---|
.. | ||
env_internal.h | ||
env.c | ||
env.mk | ||
init.c | ||
Makefile | ||
memory.c | ||
pci_ioat.c | ||
pci_nvme.c | ||
pci_virtio.c | ||
pci_vmd.c | ||
pci.c | ||
threads.c |