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 DDB1345F26; Tue, 24 Dec 2024 04:06:26 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id F1EC1402D8; Tue, 24 Dec 2024 04:06:16 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 0A7FA402AD for ; Tue, 24 Dec 2024 04:06:14 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1213) id 3B2B4206ADD7; Mon, 23 Dec 2024 19:06:13 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 3B2B4206ADD7 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1735009573; bh=IeecmKaYDEp7bPQdR9QP8EP58N5U7OQ3w+sGXRyBsKU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cTOOKdC+cmhWNwAG3JXOjcxDy8igeU4YzltP6rgCfCEDH7rPT6AXaUTaMbDhqnMX9 RHOZ3vfWmpM7kI2in4jirCLBKru8I5LoRwg9p2inNXS52pjCOxlQPFsGBoBzkU7fUs yV/3SeXCkTVBKoQ5hRA+UngNqjpvAKNo5SWeS8M0= From: Andre Muezerie To: Cc: dev@dpdk.org, Andre Muezerie Subject: [PATCH 2/5] app/test-compress-perf: use portable macro for weak linking Date: Mon, 23 Dec 2024 19:05:49 -0800 Message-Id: <1735009552-31906-3-git-send-email-andremue@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1735009552-31906-1-git-send-email-andremue@linux.microsoft.com> References: <1735009552-31906-1-git-send-email-andremue@linux.microsoft.com> 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 MSVC uses pragmas to indicate weak linking, so the old __rte_weak attribute needs to made into a macro so that the same syntax can be used for MSVC and other compilers like gcc. This patch replaces __rte_weak with macro RTE_WEAK. Signed-off-by: Andre Muezerie --- app/test-compress-perf/main.c | 36 +++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/app/test-compress-perf/main.c b/app/test-compress-perf/main.c index fa366123ed..01742a39ee 100644 --- a/app/test-compress-perf/main.c +++ b/app/test-compress-perf/main.c @@ -522,8 +522,8 @@ main(int argc, char **argv) return ret; } -__rte_weak void * -cperf_cyclecount_test_constructor(uint8_t dev_id __rte_unused, +void * +RTE_WEAK(cperf_cyclecount_test_constructor)(uint8_t dev_id __rte_unused, uint16_t qp_id __rte_unused, struct comp_test_data *options __rte_unused) { @@ -531,20 +531,20 @@ cperf_cyclecount_test_constructor(uint8_t dev_id __rte_unused, return NULL; } -__rte_weak void -cperf_cyclecount_test_destructor(void *arg __rte_unused) +void +RTE_WEAK(cperf_cyclecount_test_destructor)(void *arg __rte_unused) { RTE_LOG(INFO, USER1, "Something wrong happened!!!\n"); } -__rte_weak int -cperf_cyclecount_test_runner(void *test_ctx __rte_unused) +int +RTE_WEAK(cperf_cyclecount_test_runner)(void *test_ctx __rte_unused) { return 0; } -__rte_weak void * -cperf_throughput_test_constructor(uint8_t dev_id __rte_unused, +void * +RTE_WEAK(cperf_throughput_test_constructor)(uint8_t dev_id __rte_unused, uint16_t qp_id __rte_unused, struct comp_test_data *options __rte_unused) { @@ -552,19 +552,19 @@ cperf_throughput_test_constructor(uint8_t dev_id __rte_unused, return NULL; } -__rte_weak void -cperf_throughput_test_destructor(void *arg __rte_unused) +void +RTE_WEAK(cperf_throughput_test_destructor)(void *arg __rte_unused) { } -__rte_weak int -cperf_throughput_test_runner(void *test_ctx __rte_unused) +int +RTE_WEAK(cperf_throughput_test_runner)(void *test_ctx __rte_unused) { return 0; } -__rte_weak void * -cperf_verify_test_constructor(uint8_t dev_id __rte_unused, +void * +RTE_WEAK(cperf_verify_test_constructor)(uint8_t dev_id __rte_unused, uint16_t qp_id __rte_unused, struct comp_test_data *options __rte_unused) { @@ -572,14 +572,14 @@ cperf_verify_test_constructor(uint8_t dev_id __rte_unused, return NULL; } -__rte_weak void -cperf_verify_test_destructor(void *arg __rte_unused) +void +RTE_WEAK(cperf_verify_test_destructor)(void *arg __rte_unused) { } -__rte_weak int -cperf_verify_test_runner(void *test_ctx __rte_unused) +int +RTE_WEAK(cperf_verify_test_runner)(void *test_ctx __rte_unused) { return 0; } -- 2.47.0.vfs.0.3