From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124])
	by inbox.dpdk.org (Postfix) with ESMTP id 043FDA0C47;
	Tue, 26 Oct 2021 04:26:57 +0200 (CEST)
Received: from [217.70.189.124] (localhost [127.0.0.1])
	by mails.dpdk.org (Postfix) with ESMTP id D1AFF410F8;
	Tue, 26 Oct 2021 04:26:51 +0200 (CEST)
Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182])
 by mails.dpdk.org (Postfix) with ESMTP id 8388B40E0F
 for <dev@dpdk.org>; Tue, 26 Oct 2021 04:26:49 +0200 (CEST)
Received: from
 linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net
 (linux.microsoft.com [13.77.154.182])
 by linux.microsoft.com (Postfix) with ESMTPSA id 9A7D720A3E11;
 Mon, 25 Oct 2021 19:26:48 -0700 (PDT)
DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 9A7D720A3E11
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com;
 s=default; t=1635215208;
 bh=RYRFSl0eXA1lw9V/p/npn21OhvTol5apv1Inw601kSo=;
 h=From:To:Cc:Subject:Date:In-Reply-To:References:From;
 b=sJlDXCTOezFpavvGONlHjLv1yORugGJCWlThlaQqLfh766tLf/3UEHwLlqVeDfWMf
 aeSBgGq/NH5z+vAPCMp8FAaJ0zK/4RLI3YTiKS9cXV3Fg6wK99peLOviw1Cn+Joi0X
 s22NGVVdHtKbsWGtdNjIWdQLTrIazfhx5xi9eGGo=
From: Jie Zhou <jizh@linux.microsoft.com>
To: dev@dpdk.org
Cc: dmitry.kozliuk@gmail.com, roretzla@microsoft.com,
 navasile@linux.microsoft.com, dmitrym@microsoft.com,
 pallavi.kadam@intel.com, talshn@nvidia.com, thomas@monjalon.net,
 aconole@redhat.com
Date: Mon, 25 Oct 2021 19:26:34 -0700
Message-Id: <1635215204-20604-2-git-send-email-jizh@linux.microsoft.com>
X-Mailer: git-send-email 1.8.3.1
In-Reply-To: <1635215204-20604-1-git-send-email-jizh@linux.microsoft.com>
References: <1634228502-14701-1-git-send-email-jizh@linux.microsoft.com>
 <1635215204-20604-1-git-send-email-jizh@linux.microsoft.com>
Subject: [dpdk-dev] [PATCH v7 01/11] eal/windows: return ENOTSUP for not
 supported API
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org
Sender: "dev" <dev-bounces@dpdk.org>

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.

Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>

---
 lib/eal/windows/eal_memalloc.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/lib/eal/windows/eal_memalloc.c b/lib/eal/windows/eal_memalloc.c
index 55d6dcc71c..aa7589b81d 100644
--- a/lib/eal/windows/eal_memalloc.c
+++ b/lib/eal/windows/eal_memalloc.c
@@ -17,7 +17,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
@@ -28,7 +28,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
@@ -428,7 +428,7 @@ eal_memalloc_sync_with_primary(void)
 {
 	/* No multi-process support. */
 	EAL_LOG_NOT_IMPLEMENTED();
-	return -1;
+	return -ENOTSUP;
 }
 
 int
-- 
2.32.0.windows.2