DPDK patches and discussions
 help / color / mirror / Atom feed
From: David Marchand <david.marchand@redhat.com>
To: dev@dpdk.org
Cc: thomas@monjalon.net, bruce.richardson@intel.com,
	andremue@linux.microsoft.com, John Daley <johndale@cisco.com>,
	Hyong Youb Kim <hyonkim@cisco.com>
Subject: [RFC 04/10] net/enic: remove weak symbols
Date: Fri,  7 Feb 2025 09:32:44 +0100	[thread overview]
Message-ID: <20250207083252.3131588-5-david.marchand@redhat.com> (raw)
In-Reply-To: <20250207083252.3131588-1-david.marchand@redhat.com>

Rather than use weak symbols, expose stubs symbols when needed.

Signed-off-by: David Marchand <david.marchand@redhat.com>
---
 drivers/net/enic/enic_main.c | 8 +++-----
 drivers/net/enic/meson.build | 1 +
 2 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/drivers/net/enic/enic_main.c b/drivers/net/enic/enic_main.c
index b755b15d92..5ee2ae555d 100644
--- a/drivers/net/enic/enic_main.c
+++ b/drivers/net/enic/enic_main.c
@@ -509,15 +509,13 @@ static void enic_prep_wq_for_simple_tx(struct enic *enic, uint16_t queue_idx)
 	}
 }
 
-/*
- * The 'strong' version is in enic_rxtx_vec_avx2.c. This weak version is used
- * used when that file is not compiled.
- */
-__rte_weak bool
+#ifndef ENIC_RXTX_VEC
+bool
 enic_use_vector_rx_handler(__rte_unused struct rte_eth_dev *eth_dev)
 {
 	return false;
 }
+#endif /* ENIC_RXTX_VEC */
 
 void enic_pick_rx_handler(struct rte_eth_dev *eth_dev)
 {
diff --git a/drivers/net/enic/meson.build b/drivers/net/enic/meson.build
index 00f8348348..1e26338350 100644
--- a/drivers/net/enic/meson.build
+++ b/drivers/net/enic/meson.build
@@ -33,6 +33,7 @@ includes += include_directories('base')
 # may not. This is to support users who build for the min supported machine
 # and need to run the binary on newer CPUs too.
 if dpdk_conf.has('RTE_ARCH_X86_64')
+    cflags += '-DENIC_RXTX_VEC'
     enic_avx2_lib = static_library('enic_avx2_lib',
             'enic_rxtx_vec_avx2.c',
             dependencies: [static_rte_ethdev, static_rte_bus_pci],
-- 
2.48.1


  parent reply	other threads:[~2025-02-07  8:33 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-07  8:32 [RFC 00/10] Remove " David Marchand
2025-02-07  8:32 ` [RFC 01/10] bus/auxiliary: remove " David Marchand
2025-02-07  8:32 ` [RFC 02/10] common/qat: " David Marchand
2025-02-07  8:32 ` [RFC 03/10] drivers: remove weak symbols in Nitrox drivers David Marchand
2025-02-07  8:32 ` David Marchand [this message]
2025-02-07  8:32 ` [RFC 05/10] net/hns3: remove weak symbols David Marchand
2025-02-07  8:32 ` [RFC 06/10] net/fm10k: " David Marchand
2025-02-07  8:51   ` Bruce Richardson
2025-02-07  8:32 ` [RFC 07/10] net/nfp: " David Marchand
2025-02-07  8:44   ` Chaoyong He
2025-02-07  8:32 ` [RFC 08/10] net/virtio: " David Marchand
2025-02-07  8:32 ` [RFC 09/10] app/compress-perf: " David Marchand
2025-02-07  8:32 ` [RFC 10/10] eal: deprecate " David Marchand

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250207083252.3131588-5-david.marchand@redhat.com \
    --to=david.marchand@redhat.com \
    --cc=andremue@linux.microsoft.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=hyonkim@cisco.com \
    --cc=johndale@cisco.com \
    --cc=thomas@monjalon.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).