rdma: Remove check for translation length
With min supported DPDK >= 19.11 there is no need to check that the buffer can be split over several Memory Regions so we can remove this check. Keep assert that translation length is not less than request as a sanity check. Change-Id: If61e673ecde28bbda8eb57a2768085715bed141a Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com> Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5938 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Community-CI: Mellanox Build Bot Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
This commit is contained in:
parent
6715cc2a07
commit
3289ab6d93
@ -162,7 +162,6 @@ void spdk_rdma_free_mem_map(struct spdk_rdma_mem_map **map);
|
|||||||
* \param length Length of the memory address
|
* \param length Length of the memory address
|
||||||
* \param[in,out] translation Pointer to translation result to be filled by this function
|
* \param[in,out] translation Pointer to translation result to be filled by this function
|
||||||
* \retval -EINVAL if translation is not found
|
* \retval -EINVAL if translation is not found
|
||||||
* \retval -ERANGE if requested address + length crosses Memory Region boundary
|
|
||||||
* \retval 0 translation succeed
|
* \retval 0 translation succeed
|
||||||
*/
|
*/
|
||||||
int spdk_rdma_get_translation(struct spdk_rdma_mem_map *map, void *address,
|
int spdk_rdma_get_translation(struct spdk_rdma_mem_map *map, void *address,
|
||||||
|
@ -213,10 +213,7 @@ spdk_rdma_get_translation(struct spdk_rdma_mem_map *map, void *address,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (spdk_unlikely(real_length < length)) {
|
assert(real_length >= length);
|
||||||
SPDK_ERRLOG("Data buffer %p length %zu split over multiple RDMA Memory Regions\n", address, length);
|
|
||||||
return -ERANGE;
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user