Commit 3289ab6d authored by Alexey Marchuk's avatar Alexey Marchuk Committed by Tomasz Zawadzki
Browse files

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: default avatarAlexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5938


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
parent 6715cc2a
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -162,7 +162,6 @@ void spdk_rdma_free_mem_map(struct spdk_rdma_mem_map **map);
 * \param length Length of the memory address
 * \param[in,out] translation Pointer to translation result to be filled by this function
 * \retval -EINVAL if translation is not found
 * \retval -ERANGE if requested address + length crosses Memory Region boundary
 * \retval 0 translation succeed
 */
int spdk_rdma_get_translation(struct spdk_rdma_mem_map *map, void *address,
+1 −4
Original line number Diff line number Diff line
@@ -213,10 +213,7 @@ spdk_rdma_get_translation(struct spdk_rdma_mem_map *map, void *address,
		}
	}

	if (spdk_unlikely(real_length < length)) {
		SPDK_ERRLOG("Data buffer %p length %zu split over multiple RDMA Memory Regions\n", address, length);
		return -ERANGE;
	}
	assert(real_length >= length);

	return 0;
}