Skip to content

Commit

Permalink
eal/windows: fix error code for not supported API
Browse files Browse the repository at this point in the history
[ upstream commit 7e71c4d ]

UT memory_autotest on Windows has 2 failed cases on EAL APIs
eal_memalloc_get_seg_fd and eal_memalloc_get_seg_fd_offset. These 2
APIs are not supported on Windows yet. Should return ENOTSUP such that
in test_memory.c these 2 ENOTSUP cases will not be marked as failures,
same as other ENOTSUP cases.

Fixes: 2a5d547 ("eal/windows: implement basic memory management")

Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
  • Loading branch information
Jie Zhou authored and bluca committed Feb 17, 2022
1 parent 19746aa commit 2da6c30
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/librte_eal/windows/eal_memalloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ eal_memalloc_get_seg_fd(int list_idx, int seg_idx)
RTE_SET_USED(list_idx);
RTE_SET_USED(seg_idx);
EAL_LOG_NOT_IMPLEMENTED();
return -1;
return -ENOTSUP;
}

int
Expand All @@ -29,7 +29,7 @@ eal_memalloc_get_seg_fd_offset(int list_idx, int seg_idx, size_t *offset)
RTE_SET_USED(seg_idx);
RTE_SET_USED(offset);
EAL_LOG_NOT_IMPLEMENTED();
return -1;
return -ENOTSUP;
}

static int
Expand Down Expand Up @@ -429,7 +429,7 @@ eal_memalloc_sync_with_primary(void)
{
/* No multi-process support. */
EAL_LOG_NOT_IMPLEMENTED();
return -1;
return -ENOTSUP;
}

int
Expand Down

0 comments on commit 2da6c30

Please sign in to comment.