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 814FEA0350 for ; Mon, 28 Feb 2022 22:20:53 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7709B41181; Mon, 28 Feb 2022 22:20:53 +0100 (CET) Received: from mail-wm1-f45.google.com (mail-wm1-f45.google.com [209.85.128.45]) by mails.dpdk.org (Postfix) with ESMTP id 03FC940140 for ; Mon, 28 Feb 2022 22:20:51 +0100 (CET) Received: by mail-wm1-f45.google.com with SMTP id a13-20020a05600c348d00b0038188b8bbf6so42985wmq.0 for ; Mon, 28 Feb 2022 13:20:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=TC3WwWZYm8def32Qmkipox4+TRVXrwA2PU9qlRiL9M4=; b=GnjznxEDu2ng6eMaiAMNXRZHGhdnFok+Ew0/8sb/f332h4KHI3XRjYPEdaRKLAmnHz 5r7OTgFAbwHH8g2kipQbxrlcL25EI7fv0sZ06svsF66wemDgsm1kgElj+F9ucyrckIRC Acji9CFfUCAg2dn8QVOx3tgZ+qi/Pepr4EZpp5YarhWwtn2H24as9R95k0zngDcfA+Bi bcBTZu9TyD37G7WBQC+X7LlKsRGggzJ5DCVfWija3FsRDjWNSgsxsjsodmTcvVIo6DV/ Cm51vLJGhxNQfdK35+E2FM/+HKc6CKOYU2JG/FYotFLazOe5J7l0p40QwWjLMMwzFcSG gK7w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=TC3WwWZYm8def32Qmkipox4+TRVXrwA2PU9qlRiL9M4=; b=72v2KYj/vCky7NJy9NR1spWL4uReDwlzaRmprSDDmrLzr1Cx0ZLqjZRjqlJR3ubqJw mOmXviz+MKdhN1BcUikFHAkc3seUnC+OJ86MVTTxirWUwEAua/ZURlB2dO1F0FtwoRXI 82VbaGtcsCjdXfnjFHuo/n6vhOh6BXxYAmNHuaZwQ4IK7mebF8iXbH2cNJvubU3zrlFd xfYgBhyvlr5ZKpNKxvvDKY0PwWTc6+qzSkihLmz+gGRFP3K5Sbt14TIpN2yAIXXZLPy8 n6Huh08f+eRQa5QV72Nod1WLHEI+UIo2bobo1n1dPqvMWzNpLOMFzY/RwgzTgBmtkKen wPWg== X-Gm-Message-State: AOAM532EjQckR9ehFZi0gHSnW5nYncvHlakz10wAIvME9qnw39+sSopU w8sj73ush41xBYC3lCLmSVA= X-Google-Smtp-Source: ABdhPJy54riS/z7RIDx4Sx+ndV8wCZsElwkjFLjx1S9g7kmoq04aZV3yPmv6uyEjQxgmYOAkPQMO4Q== X-Received: by 2002:a05:600c:348d:b0:381:673f:3e21 with SMTP id a13-20020a05600c348d00b00381673f3e21mr5397210wmq.35.1646083251555; Mon, 28 Feb 2022 13:20:51 -0800 (PST) Received: from localhost ([2a01:4b00:f41a:3600:360b:9754:2e3a:c344]) by smtp.gmail.com with ESMTPSA id e15-20020a5d6d0f000000b001ef7dca67fasm10550603wrq.114.2022.02.28.13.20.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Feb 2022 13:20:50 -0800 (PST) From: luca.boccassi@gmail.com To: Brian Dooley Cc: Bruce Richardson , Tyler Retzlaff , dpdk stable Subject: patch 'eal: add missing C++ guards' has been queued to stable release 20.11.5 Date: Mon, 28 Feb 2022 21:19:58 +0000 Message-Id: <20220228212047.3341966-2-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220228212047.3341966-1-luca.boccassi@gmail.com> References: <20220218123931.1749595-122-luca.boccassi@gmail.com> <20220228212047.3341966-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Hi, FYI, your patch has been queued to stable release 20.11.5 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 03/02/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/bluca/dpdk-stable This queued commit can be viewed at: https://github.com/bluca/dpdk-stable/commit/2c2d7d7af165285a559ea2d92923f22bce2d97b2 Thanks. Luca Boccassi --- >From 2c2d7d7af165285a559ea2d92923f22bce2d97b2 Mon Sep 17 00:00:00 2001 From: Brian Dooley Date: Wed, 16 Feb 2022 15:14:46 +0000 Subject: [PATCH] eal: add missing C++ guards [ upstream commit d7e9c02ccad8928b6b804049ced9a3ce6172d81e ] Some public header files were missing 'extern "C"' C++ guards, and couldn't be used by C++ applications. Add the missing guards. Fixes: af75078fece3 ("first public release") Fixes: 7f3aa0863903 ("eal: introduce bit operations API") Fixes: 166a743c53fa ("compat: add infrastructure to support symbol versioning") Fixes: 8f40ee0734c8 ("eal/x86: get hypervisor name") Fixes: 75583b0d1efd ("eal: add keep alive monitoring") Fixes: 88701645c98c ("eal: move interrupt type out of igb_uio") Fixes: f04519d8092e ("lib: add missing include dependencies") Fixes: f58880682c81 ("trace: implement register API") Fixes: 428eb983f5f7 ("eal: add OS specific header file") Signed-off-by: Brian Dooley Acked-by: Bruce Richardson Acked-by: Tyler Retzlaff --- lib/librte_eal/include/rte_bitops.h | 8 ++++++++ lib/librte_eal/include/rte_branch_prediction.h | 8 ++++++++ lib/librte_eal/include/rte_compat.h | 8 ++++++++ lib/librte_eal/include/rte_hypervisor.h | 8 ++++++++ lib/librte_eal/include/rte_keepalive.h | 8 ++++++++ lib/librte_eal/include/rte_pci_dev_feature_defs.h | 8 ++++++++ lib/librte_eal/include/rte_pci_dev_features.h | 8 ++++++++ lib/librte_eal/include/rte_time.h | 8 ++++++++ lib/librte_eal/include/rte_trace_point_register.h | 8 ++++++++ lib/librte_eal/linux/include/rte_os.h | 8 ++++++++ 10 files changed, 80 insertions(+) diff --git a/lib/librte_eal/include/rte_bitops.h b/lib/librte_eal/include/rte_bitops.h index 141e8ea730..f50dbe4388 100644 --- a/lib/librte_eal/include/rte_bitops.h +++ b/lib/librte_eal/include/rte_bitops.h @@ -17,6 +17,10 @@ #include #include +#ifdef __cplusplus +extern "C" { +#endif + /** * Get the uint64_t value for a specified bit set. * @@ -271,4 +275,8 @@ rte_bit_relaxed_test_and_clear64(unsigned int nr, volatile uint64_t *addr) return val & mask; } +#ifdef __cplusplus +} +#endif + #endif /* _RTE_BITOPS_H_ */ diff --git a/lib/librte_eal/include/rte_branch_prediction.h b/lib/librte_eal/include/rte_branch_prediction.h index 854ef9e5dd..0256a9de60 100644 --- a/lib/librte_eal/include/rte_branch_prediction.h +++ b/lib/librte_eal/include/rte_branch_prediction.h @@ -10,6 +10,10 @@ #ifndef _RTE_BRANCH_PREDICTION_H_ #define _RTE_BRANCH_PREDICTION_H_ +#ifdef __cplusplus +extern "C" { +#endif + /** * Check if a branch is likely to be taken. * @@ -38,4 +42,8 @@ #define unlikely(x) __builtin_expect(!!(x), 0) #endif /* unlikely */ +#ifdef __cplusplus +} +#endif + #endif /* _RTE_BRANCH_PREDICTION_H_ */ diff --git a/lib/librte_eal/include/rte_compat.h b/lib/librte_eal/include/rte_compat.h index 2718612cce..a7dbe23449 100644 --- a/lib/librte_eal/include/rte_compat.h +++ b/lib/librte_eal/include/rte_compat.h @@ -6,6 +6,10 @@ #ifndef _RTE_COMPAT_H_ #define _RTE_COMPAT_H_ +#ifdef __cplusplus +extern "C" { +#endif + #ifndef ALLOW_EXPERIMENTAL_API #define __rte_experimental \ @@ -43,4 +47,8 @@ __attribute__((section(".text.internal"))) #endif +#ifdef __cplusplus +} +#endif + #endif /* _RTE_COMPAT_H_ */ diff --git a/lib/librte_eal/include/rte_hypervisor.h b/lib/librte_eal/include/rte_hypervisor.h index 5fe719c1d4..1666431ce3 100644 --- a/lib/librte_eal/include/rte_hypervisor.h +++ b/lib/librte_eal/include/rte_hypervisor.h @@ -5,6 +5,10 @@ #ifndef RTE_HYPERVISOR_H #define RTE_HYPERVISOR_H +#ifdef __cplusplus +extern "C" { +#endif + /** * @file * Hypervisor awareness. @@ -30,4 +34,8 @@ rte_hypervisor_get(void); const char * rte_hypervisor_get_name(enum rte_hypervisor id); +#ifdef __cplusplus +} +#endif + #endif /* RTE_HYPERVISOR_H */ diff --git a/lib/librte_eal/include/rte_keepalive.h b/lib/librte_eal/include/rte_keepalive.h index bd25508da8..538fb09095 100644 --- a/lib/librte_eal/include/rte_keepalive.h +++ b/lib/librte_eal/include/rte_keepalive.h @@ -11,6 +11,10 @@ #ifndef _KEEPALIVE_H_ #define _KEEPALIVE_H_ +#ifdef __cplusplus +extern "C" { +#endif + #include #include @@ -139,4 +143,8 @@ rte_keepalive_register_relay_callback(struct rte_keepalive *keepcfg, rte_keepalive_relay_callback_t callback, void *data); +#ifdef __cplusplus +} +#endif + #endif /* _KEEPALIVE_H_ */ diff --git a/lib/librte_eal/include/rte_pci_dev_feature_defs.h b/lib/librte_eal/include/rte_pci_dev_feature_defs.h index e12c22081f..c5bb631286 100644 --- a/lib/librte_eal/include/rte_pci_dev_feature_defs.h +++ b/lib/librte_eal/include/rte_pci_dev_feature_defs.h @@ -5,6 +5,10 @@ #ifndef _RTE_PCI_DEV_DEFS_H_ #define _RTE_PCI_DEV_DEFS_H_ +#ifdef __cplusplus +extern "C" { +#endif + /* interrupt mode */ enum rte_intr_mode { RTE_INTR_MODE_NONE = 0, @@ -13,4 +17,8 @@ enum rte_intr_mode { RTE_INTR_MODE_MSIX }; +#ifdef __cplusplus +} +#endif + #endif /* _RTE_PCI_DEV_DEFS_H_ */ diff --git a/lib/librte_eal/include/rte_pci_dev_features.h b/lib/librte_eal/include/rte_pci_dev_features.h index 6104123d27..ee6e10590c 100644 --- a/lib/librte_eal/include/rte_pci_dev_features.h +++ b/lib/librte_eal/include/rte_pci_dev_features.h @@ -5,6 +5,10 @@ #ifndef _RTE_PCI_DEV_FEATURES_H #define _RTE_PCI_DEV_FEATURES_H +#ifdef __cplusplus +extern "C" { +#endif + #include #define RTE_INTR_MODE_NONE_NAME "none" @@ -12,4 +16,8 @@ #define RTE_INTR_MODE_MSI_NAME "msi" #define RTE_INTR_MODE_MSIX_NAME "msix" +#ifdef __cplusplus +} +#endif + #endif diff --git a/lib/librte_eal/include/rte_time.h b/lib/librte_eal/include/rte_time.h index 5ad7c8841a..ec25f7b93d 100644 --- a/lib/librte_eal/include/rte_time.h +++ b/lib/librte_eal/include/rte_time.h @@ -5,6 +5,10 @@ #ifndef _RTE_TIME_H_ #define _RTE_TIME_H_ +#ifdef __cplusplus +extern "C" { +#endif + #include #include @@ -98,4 +102,8 @@ rte_ns_to_timespec(uint64_t nsec) return ts; } +#ifdef __cplusplus +} +#endif + #endif /* _RTE_TIME_H_ */ diff --git a/lib/librte_eal/include/rte_trace_point_register.h b/lib/librte_eal/include/rte_trace_point_register.h index 4f5c86552d..2e61439940 100644 --- a/lib/librte_eal/include/rte_trace_point_register.h +++ b/lib/librte_eal/include/rte_trace_point_register.h @@ -5,6 +5,10 @@ #ifndef _RTE_TRACE_POINT_REGISTER_H_ #define _RTE_TRACE_POINT_REGISTER_H_ +#ifdef __cplusplus +extern "C" { +#endif + #ifdef _RTE_TRACE_POINT_H_ #error for registration, include this file first before #endif @@ -42,4 +46,8 @@ do { \ RTE_STR(in)"[32]", "string_bounded_t"); \ } while (0) +#ifdef __cplusplus +} +#endif + #endif /* _RTE_TRACE_POINT_REGISTER_H_ */ diff --git a/lib/librte_eal/linux/include/rte_os.h b/lib/librte_eal/linux/include/rte_os.h index 1618b4df22..748c4c7602 100644 --- a/lib/librte_eal/linux/include/rte_os.h +++ b/lib/librte_eal/linux/include/rte_os.h @@ -5,6 +5,10 @@ #ifndef _RTE_OS_H_ #define _RTE_OS_H_ +#ifdef __cplusplus +extern "C" { +#endif + /** * This header should contain any definition * which is not supported natively or named differently in Linux. @@ -32,4 +36,8 @@ typedef cpu_set_t rte_cpuset_t; } while (0) #endif +#ifdef __cplusplus +} +#endif + #endif /* _RTE_OS_H_ */ -- 2.30.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-02-28 21:17:54.177081870 +0000 +++ 0002-eal-add-missing-C-guards.patch 2022-02-28 21:17:53.788928092 +0000 @@ -1 +1 @@ -From d7e9c02ccad8928b6b804049ced9a3ce6172d81e Mon Sep 17 00:00:00 2001 +From 2c2d7d7af165285a559ea2d92923f22bce2d97b2 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit d7e9c02ccad8928b6b804049ced9a3ce6172d81e ] + @@ -18 +19,0 @@ -Cc: stable@dpdk.org @@ -24,10 +25,10 @@ - lib/eal/include/rte_bitops.h | 8 ++++++++ - lib/eal/include/rte_branch_prediction.h | 8 ++++++++ - lib/eal/include/rte_compat.h | 8 ++++++++ - lib/eal/include/rte_hypervisor.h | 8 ++++++++ - lib/eal/include/rte_keepalive.h | 8 ++++++++ - lib/eal/include/rte_pci_dev_feature_defs.h | 8 ++++++++ - lib/eal/include/rte_pci_dev_features.h | 8 ++++++++ - lib/eal/include/rte_time.h | 8 ++++++++ - lib/eal/include/rte_trace_point_register.h | 8 ++++++++ - lib/eal/linux/include/rte_os.h | 8 ++++++++ + lib/librte_eal/include/rte_bitops.h | 8 ++++++++ + lib/librte_eal/include/rte_branch_prediction.h | 8 ++++++++ + lib/librte_eal/include/rte_compat.h | 8 ++++++++ + lib/librte_eal/include/rte_hypervisor.h | 8 ++++++++ + lib/librte_eal/include/rte_keepalive.h | 8 ++++++++ + lib/librte_eal/include/rte_pci_dev_feature_defs.h | 8 ++++++++ + lib/librte_eal/include/rte_pci_dev_features.h | 8 ++++++++ + lib/librte_eal/include/rte_time.h | 8 ++++++++ + lib/librte_eal/include/rte_trace_point_register.h | 8 ++++++++ + lib/librte_eal/linux/include/rte_os.h | 8 ++++++++ @@ -36 +37 @@ -diff --git a/lib/eal/include/rte_bitops.h b/lib/eal/include/rte_bitops.h +diff --git a/lib/librte_eal/include/rte_bitops.h b/lib/librte_eal/include/rte_bitops.h @@ -38,2 +39,2 @@ ---- a/lib/eal/include/rte_bitops.h -+++ b/lib/eal/include/rte_bitops.h +--- a/lib/librte_eal/include/rte_bitops.h ++++ b/lib/librte_eal/include/rte_bitops.h @@ -60 +61 @@ -diff --git a/lib/eal/include/rte_branch_prediction.h b/lib/eal/include/rte_branch_prediction.h +diff --git a/lib/librte_eal/include/rte_branch_prediction.h b/lib/librte_eal/include/rte_branch_prediction.h @@ -62,2 +63,2 @@ ---- a/lib/eal/include/rte_branch_prediction.h -+++ b/lib/eal/include/rte_branch_prediction.h +--- a/lib/librte_eal/include/rte_branch_prediction.h ++++ b/lib/librte_eal/include/rte_branch_prediction.h @@ -84,4 +85,4 @@ -diff --git a/lib/eal/include/rte_compat.h b/lib/eal/include/rte_compat.h -index 9556bbf4d0..fc9fbaaab2 100644 ---- a/lib/eal/include/rte_compat.h -+++ b/lib/eal/include/rte_compat.h +diff --git a/lib/librte_eal/include/rte_compat.h b/lib/librte_eal/include/rte_compat.h +index 2718612cce..a7dbe23449 100644 +--- a/lib/librte_eal/include/rte_compat.h ++++ b/lib/librte_eal/include/rte_compat.h @@ -99 +100 @@ -@@ -46,4 +50,8 @@ __attribute__((section(".text.internal"))) +@@ -43,4 +47,8 @@ __attribute__((section(".text.internal"))) @@ -108 +109 @@ -diff --git a/lib/eal/include/rte_hypervisor.h b/lib/eal/include/rte_hypervisor.h +diff --git a/lib/librte_eal/include/rte_hypervisor.h b/lib/librte_eal/include/rte_hypervisor.h @@ -110,2 +111,2 @@ ---- a/lib/eal/include/rte_hypervisor.h -+++ b/lib/eal/include/rte_hypervisor.h +--- a/lib/librte_eal/include/rte_hypervisor.h ++++ b/lib/librte_eal/include/rte_hypervisor.h @@ -132 +133 @@ -diff --git a/lib/eal/include/rte_keepalive.h b/lib/eal/include/rte_keepalive.h +diff --git a/lib/librte_eal/include/rte_keepalive.h b/lib/librte_eal/include/rte_keepalive.h @@ -134,2 +135,2 @@ ---- a/lib/eal/include/rte_keepalive.h -+++ b/lib/eal/include/rte_keepalive.h +--- a/lib/librte_eal/include/rte_keepalive.h ++++ b/lib/librte_eal/include/rte_keepalive.h @@ -156 +157 @@ -diff --git a/lib/eal/include/rte_pci_dev_feature_defs.h b/lib/eal/include/rte_pci_dev_feature_defs.h +diff --git a/lib/librte_eal/include/rte_pci_dev_feature_defs.h b/lib/librte_eal/include/rte_pci_dev_feature_defs.h @@ -158,2 +159,2 @@ ---- a/lib/eal/include/rte_pci_dev_feature_defs.h -+++ b/lib/eal/include/rte_pci_dev_feature_defs.h +--- a/lib/librte_eal/include/rte_pci_dev_feature_defs.h ++++ b/lib/librte_eal/include/rte_pci_dev_feature_defs.h @@ -180 +181 @@ -diff --git a/lib/eal/include/rte_pci_dev_features.h b/lib/eal/include/rte_pci_dev_features.h +diff --git a/lib/librte_eal/include/rte_pci_dev_features.h b/lib/librte_eal/include/rte_pci_dev_features.h @@ -182,2 +183,2 @@ ---- a/lib/eal/include/rte_pci_dev_features.h -+++ b/lib/eal/include/rte_pci_dev_features.h +--- a/lib/librte_eal/include/rte_pci_dev_features.h ++++ b/lib/librte_eal/include/rte_pci_dev_features.h @@ -204 +205 @@ -diff --git a/lib/eal/include/rte_time.h b/lib/eal/include/rte_time.h +diff --git a/lib/librte_eal/include/rte_time.h b/lib/librte_eal/include/rte_time.h @@ -206,2 +207,2 @@ ---- a/lib/eal/include/rte_time.h -+++ b/lib/eal/include/rte_time.h +--- a/lib/librte_eal/include/rte_time.h ++++ b/lib/librte_eal/include/rte_time.h @@ -228 +229 @@ -diff --git a/lib/eal/include/rte_trace_point_register.h b/lib/eal/include/rte_trace_point_register.h +diff --git a/lib/librte_eal/include/rte_trace_point_register.h b/lib/librte_eal/include/rte_trace_point_register.h @@ -230,2 +231,2 @@ ---- a/lib/eal/include/rte_trace_point_register.h -+++ b/lib/eal/include/rte_trace_point_register.h +--- a/lib/librte_eal/include/rte_trace_point_register.h ++++ b/lib/librte_eal/include/rte_trace_point_register.h @@ -252,4 +253,4 @@ -diff --git a/lib/eal/linux/include/rte_os.h b/lib/eal/linux/include/rte_os.h -index 35c07c70cb..c72bf5b7e6 100644 ---- a/lib/eal/linux/include/rte_os.h -+++ b/lib/eal/linux/include/rte_os.h +diff --git a/lib/librte_eal/linux/include/rte_os.h b/lib/librte_eal/linux/include/rte_os.h +index 1618b4df22..748c4c7602 100644 +--- a/lib/librte_eal/linux/include/rte_os.h ++++ b/lib/librte_eal/linux/include/rte_os.h @@ -267 +268 @@ -@@ -42,4 +46,8 @@ typedef cpu_set_t rte_cpuset_t; +@@ -32,4 +36,8 @@ typedef cpu_set_t rte_cpuset_t;