From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id D93FD41E73; Sat, 11 Mar 2023 15:51:04 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 694E4410F9; Sat, 11 Mar 2023 15:51:04 +0100 (CET) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id 1783740FAE for ; Sat, 11 Mar 2023 15:51:01 +0100 (CET) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 32BCrVRT010595; Sat, 11 Mar 2023 06:51:01 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : mime-version : content-type; s=pfpt0220; bh=1O/LVoORCqIfi1Zi65OpaxvpvxKOtu6jC1OD5Yq3t2c=; b=IuwMAtz/z17H4IVNkNh3LYekPdiCgSAHc0BpxlAVvIVT08oDY8ghBSQ3GA3198t8SJh7 06+H5KtCyPYcx2+P68HwETUMLkx/p3DfG7+JVKQ5IGJMP3RuCFCrEBw+68nMSz8wRHlq 7tCu8QQToMP0yGtH2my8oNZnuSqsrMqzoIak9AJW2YFrBPw3s796XcTci/ynWpsJE4NU eq4l2DlcS0bVKSZOpyoPZSkhfn/F/W1RZlJckVA6QJ4l7b0XO5WgT3yvnUA1cPE+q4fS YD+wfiXm2ggEPKnTERPY4t1D311UGBwPXad1T78aC1Zp/sx9SVp/RA03yjQhnq/gTB8v 3Q== Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3p8t1t070t-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Sat, 11 Mar 2023 06:51:01 -0800 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Sat, 11 Mar 2023 06:50:58 -0800 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.42 via Frontend Transport; Sat, 11 Mar 2023 06:50:58 -0800 Received: from ml-host-33.caveonetworks.com (unknown [10.110.143.233]) by maili.marvell.com (Postfix) with ESMTP id 9DF5C3F707D; Sat, 11 Mar 2023 06:50:58 -0800 (PST) From: Srikanth Yalavarthi To: Srikanth Yalavarthi , David Marchand CC: , Subject: [PATCH] mldev: remove weak symbols use in type conversions Date: Sat, 11 Mar 2023 06:50:56 -0800 Message-ID: <20230311145056.16386-1-syalavarthi@marvell.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Type: text/plain X-Proofpoint-GUID: UqHu00AICE_CGWoJCDPoH9SrfVtw8_jO X-Proofpoint-ORIG-GUID: UqHu00AICE_CGWoJCDPoH9SrfVtw8_jO X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.942,Hydra:6.0.573,FMLib:17.11.170.22 definitions=2023-03-11_04,2023-03-10_01,2023-02-09_01 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Drop use of weak symbols to select the type conversion functions. Select NEON implementation only on Aarch64 builds. Enable windows build. Fixes: 3c54f91ad8c9 ("mldev: disable build on Windows") Signed-off-by: Srikanth Yalavarthi --- lib/mldev/meson.build | 9 ++------- lib/mldev/mldev_utils_scalar.c | 24 ++++++++++++------------ 2 files changed, 14 insertions(+), 19 deletions(-) diff --git a/lib/mldev/meson.build b/lib/mldev/meson.build index 51ba809465..c9db42257b 100644 --- a/lib/mldev/meson.build +++ b/lib/mldev/meson.build @@ -1,21 +1,16 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright (c) 2022 Marvell. -if is_windows - build = false - reason = 'not supported on Windows' - subdir_done() -endif - sources = files( 'rte_mldev_pmd.c', 'rte_mldev.c', 'mldev_utils.c', - 'mldev_utils_scalar.c', ) if dpdk_conf.has('RTE_ARCH_ARM64') sources += files('mldev_utils_neon.c') +else + sources += files('mldev_utils_scalar.c') endif headers = files( diff --git a/lib/mldev/mldev_utils_scalar.c b/lib/mldev/mldev_utils_scalar.c index 40320ed3ef..322b009f5d 100644 --- a/lib/mldev/mldev_utils_scalar.c +++ b/lib/mldev/mldev_utils_scalar.c @@ -84,7 +84,7 @@ union float32 { uint32_t u; }; -__rte_weak int +int rte_ml_io_float32_to_int8(float scale, uint64_t nb_elements, void *input, void *output) { float *input_buffer; @@ -116,7 +116,7 @@ rte_ml_io_float32_to_int8(float scale, uint64_t nb_elements, void *input, void * return 0; } -__rte_weak int +int rte_ml_io_int8_to_float32(float scale, uint64_t nb_elements, void *input, void *output) { int8_t *input_buffer; @@ -139,7 +139,7 @@ rte_ml_io_int8_to_float32(float scale, uint64_t nb_elements, void *input, void * return 0; } -__rte_weak int +int rte_ml_io_float32_to_uint8(float scale, uint64_t nb_elements, void *input, void *output) { float *input_buffer; @@ -171,7 +171,7 @@ rte_ml_io_float32_to_uint8(float scale, uint64_t nb_elements, void *input, void return 0; } -__rte_weak int +int rte_ml_io_uint8_to_float32(float scale, uint64_t nb_elements, void *input, void *output) { uint8_t *input_buffer; @@ -194,7 +194,7 @@ rte_ml_io_uint8_to_float32(float scale, uint64_t nb_elements, void *input, void return 0; } -__rte_weak int +int rte_ml_io_float32_to_int16(float scale, uint64_t nb_elements, void *input, void *output) { float *input_buffer; @@ -226,7 +226,7 @@ rte_ml_io_float32_to_int16(float scale, uint64_t nb_elements, void *input, void return 0; } -__rte_weak int +int rte_ml_io_int16_to_float32(float scale, uint64_t nb_elements, void *input, void *output) { int16_t *input_buffer; @@ -249,7 +249,7 @@ rte_ml_io_int16_to_float32(float scale, uint64_t nb_elements, void *input, void return 0; } -__rte_weak int +int rte_ml_io_float32_to_uint16(float scale, uint64_t nb_elements, void *input, void *output) { float *input_buffer; @@ -281,7 +281,7 @@ rte_ml_io_float32_to_uint16(float scale, uint64_t nb_elements, void *input, void return 0; } -__rte_weak int +int rte_ml_io_uint16_to_float32(float scale, uint64_t nb_elements, void *input, void *output) { uint16_t *input_buffer; @@ -429,7 +429,7 @@ __float32_to_float16_scalar_rtn(float x) return u16; } -__rte_weak int +int rte_ml_io_float32_to_float16(uint64_t nb_elements, void *input, void *output) { float *input_buffer; @@ -513,7 +513,7 @@ __float16_to_float32_scalar_rtx(uint16_t f16) return f32.f; } -__rte_weak int +int rte_ml_io_float16_to_float32(uint64_t nb_elements, void *input, void *output) { uint16_t *input_buffer; @@ -614,7 +614,7 @@ __float32_to_bfloat16_scalar_rtn(float x) return u16; } -__rte_weak int +int rte_ml_io_float32_to_bfloat16(uint64_t nb_elements, void *input, void *output) { float *input_buffer; @@ -696,7 +696,7 @@ __bfloat16_to_float32_scalar_rtx(uint16_t f16) return f32.f; } -__rte_weak int +int rte_ml_io_bfloat16_to_float32(uint64_t nb_elements, void *input, void *output) { uint16_t *input_buffer; -- 2.17.1