[2/4] eal: allow getting memory segment FD with external memory
diff mbox series

Message ID 20191213141322.32730-3-maxime.coquelin@redhat.com
State New
Headers show
Series
  • Add external contiguous memory support to Virtio-user
Related show

Checks

Context Check Description
ci/Intel-compilation fail Compilation issues
ci/checkpatch success coding style OK

Commit Message

Maxime Coquelin Dec. 13, 2019, 2:13 p.m. UTC
Now that it is possible to associate a file descriptor when
registering external and contiguous memory, let's allow it.

If no FD is available for the memory segment, ENOENT error
is returned.

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 lib/librte_eal/common/eal_common_memory.c | 12 ------------
 1 file changed, 12 deletions(-)

Patch
diff mbox series

diff --git a/lib/librte_eal/common/eal_common_memory.c b/lib/librte_eal/common/eal_common_memory.c
index 7a4b371828..cc660f5b85 100644
--- a/lib/librte_eal/common/eal_common_memory.c
+++ b/lib/librte_eal/common/eal_common_memory.c
@@ -691,12 +691,6 @@  rte_memseg_get_fd_thread_unsafe(const struct rte_memseg *ms)
 		return -1;
 	}
 
-	/* segment fd API is not supported for external segments */
-	if (msl->external) {
-		rte_errno = ENOTSUP;
-		return -1;
-	}
-
 	ret = eal_memalloc_get_seg_fd(msl_idx, seg_idx);
 	if (ret < 0) {
 		rte_errno = -ret;
@@ -746,12 +740,6 @@  rte_memseg_get_fd_offset_thread_unsafe(const struct rte_memseg *ms,
 		return -1;
 	}
 
-	/* segment fd API is not supported for external segments */
-	if (msl->external) {
-		rte_errno = ENOTSUP;
-		return -1;
-	}
-
 	ret = eal_memalloc_get_seg_fd_offset(msl_idx, seg_idx, offset);
 	if (ret < 0) {
 		rte_errno = -ret;