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 DF5AE45BC8; Thu, 24 Oct 2024 22:25:44 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B1FE8434E6; Thu, 24 Oct 2024 22:25:44 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id C1BDB400EF for ; Thu, 24 Oct 2024 22:25:42 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1729801542; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ew13BQ/rpl59ZZMdbCgCCcaQ7kO8XBhTZ7lE8VwTxA8=; b=RuQ1lMyzgT2rMw9rjjVGegOb5KybQ7Y+PUyVSlFjUIxGGuLOAkZ/ZSYmM6COME00oq+eOb p7YXyEckM5PidJhDEUVXM9qJ6HSKu7gmIZigeMb9lY40LcFjZuzImj4KMdK2smygvKO+zd eQb0mYpUb0iCLJoU4CCeqPF7CiMY5gM= Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-290-_tI8WqluNPui9WDQuKWW0A-1; Thu, 24 Oct 2024 16:25:40 -0400 X-MC-Unique: _tI8WqluNPui9WDQuKWW0A-1 Received: from mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.15]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id C22E519560A1; Thu, 24 Oct 2024 20:25:37 +0000 (UTC) Received: from dmarchan.redhat.com (unknown [10.45.224.57]) by mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 76BF81955F42; Thu, 24 Oct 2024 20:25:34 +0000 (UTC) From: David Marchand To: dev@dpdk.org Cc: John Miller , Thomas Monjalon , Ferruh Yigit , Andrew Rybchenko , =?UTF-8?q?Mattias=20R=C3=B6nnblom?= , =?UTF-8?q?Morten=20Br=C3=B8rup?= Subject: [PATCH] ethdev: fix link with C++ Date: Thu, 24 Oct 2024 22:25:23 +0200 Message-ID: <20241024202524.3347144-1-david.marchand@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.15 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true 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 Some ethdev symbols were put out of extern "C" {} and became unavailable when linking with C++ objects. Fixes: 719834a6849e ("use C linkage where appropriate in headers") Reported-by: John Miller Signed-off-by: David Marchand --- lib/ethdev/rte_ethdev.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/lib/ethdev/rte_ethdev.h b/lib/ethdev/rte_ethdev.h index c4241d048c..a08ee7f2b8 100644 --- a/lib/ethdev/rte_ethdev.h +++ b/lib/ethdev/rte_ethdev.h @@ -171,6 +171,10 @@ #include "rte_ethdev_trace_fp.h" #include "rte_dev_info.h" +#ifdef __cplusplus +extern "C" { +#endif + extern int rte_eth_dev_logtype; #define RTE_LOGTYPE_ETHDEV rte_eth_dev_logtype @@ -1460,9 +1464,17 @@ enum rte_eth_tunnel_type { RTE_ETH_TUNNEL_TYPE_MAX, }; +#ifdef __cplusplus +} +#endif + /* Deprecated API file for rte_eth_dev_filter_* functions */ #include "rte_eth_ctrl.h" +#ifdef __cplusplus +extern "C" { +#endif + /** * UDP tunneling configuration. * @@ -6115,6 +6127,10 @@ int rte_eth_cman_config_set(uint16_t port_id, const struct rte_eth_cman_config * __rte_experimental int rte_eth_cman_config_get(uint16_t port_id, struct rte_eth_cman_config *config); +#ifdef __cplusplus +} +#endif + #include #ifdef __cplusplus -- 2.46.2