From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 76A62A04DD for ; Wed, 28 Oct 2020 11:54:51 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 6534ACA62; Wed, 28 Oct 2020 11:54:50 +0100 (CET) Received: from mail-wm1-f54.google.com (mail-wm1-f54.google.com [209.85.128.54]) by dpdk.org (Postfix) with ESMTP id 7BEFACA4E for ; Wed, 28 Oct 2020 11:54:49 +0100 (CET) Received: by mail-wm1-f54.google.com with SMTP id k18so4312046wmj.5 for ; Wed, 28 Oct 2020 03:54:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=hMdaY6F18C+mTdOFBlIUe7m7LR+piKodd9TsBFpOP3w=; b=cFKIiEgWeL9WPZ/O/09eX7GjpVXTP84fNXHZrCnw5aW21DQ3SuJsfL/eBjafCSprqx yvVTfKt1RXDMTkXGuBIcAVaZ0mHCylgU0MrqsJR7A6JqYxDj8HLA+u4DyCeQMB7kostd SdJFvpjmOuVFlnIyt2fX1mqlu6EngDh7IJ5CWHGdbqlYAubSGX3TBLlK2az3sE2yK1Se Ig7GtIXUcF6zAW/qD++4spkmTyxRA4vpyvw+51gR9Yb3wqp1CklsB7PwBS0tQoiKvRu5 s5eKtD/6jeg712JL2Jz1WGdIplA2w1Y3mRSnSVgH6SMnN0QYrO78wQ4IsFbjof0A0GPL 4KOA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=hMdaY6F18C+mTdOFBlIUe7m7LR+piKodd9TsBFpOP3w=; b=X+Atvv9Ma2rvLj+bamJIwV1VvcuBDjNvl0U6SkCRqZJxZ3F9DCYQWafW+DE7T7MSVH dfyCYsWO2NNOma3vKoZF3LNs0HlNHJ2Nd3wCdlPDWTjmKoVYVaUdBNunmT/Bb8GAze5g DhvkIBVcTDtcNf9GnOuKxNokcnmTdkKavIrzgO9ZzLGZsx4qpc2PVuahPYX2nOu/mocw jtzo3mChUGTjy+FVPOLN/VFof47vvzwQICaiQZGwZQMreBqlsxKYITx55Zwyk1Nra/PB Kt1TC4f1In3ziJwclNDZpb1aVlMw+4aqyPhOMg2RtEcdUZ4DDoHJ00+U18PgyJ1Ks1Tf G4kw== X-Gm-Message-State: AOAM5317iiRTNCSjeHI5Lv6PSvht1Vo2Fc+uGDFGKeiusbk+1XjVs+Rd c4z8J/j1WXJgfIVWGMfc6SyL0GXPjQFKOtI5 X-Google-Smtp-Source: ABdhPJzD8+IfieLtHE9q9B55kAXVReW6oW30IdDRVSoXuIlZqmuZGHYX7BuzNrmMd2ip4dpiVSFMLw== X-Received: by 2002:a1c:20ce:: with SMTP id g197mr7561406wmg.18.1603882488248; Wed, 28 Oct 2020 03:54:48 -0700 (PDT) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id d129sm5780645wmf.19.2020.10.28.03.54.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Oct 2020 03:54:47 -0700 (PDT) From: luca.boccassi@gmail.com To: Chenxu Di Cc: Ferruh Yigit , Sachin Saxena , dpdk stable Date: Wed, 28 Oct 2020 10:45:22 +0000 Message-Id: <20201028104606.3504127-163-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201028104606.3504127-1-luca.boccassi@gmail.com> References: <20201028104606.3504127-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'net/dpaa2: fix build with timesync functions' has been queued to stable release 19.11.6 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 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 Sender: "stable" Hi, FYI, your patch has been queued to stable release 19.11.6 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 10/30/20. 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. Thanks. Luca Boccassi --- >From e3d00438db8bf4794df58375bd54e134707e7b43 Mon Sep 17 00:00:00 2001 From: Chenxu Di Date: Tue, 6 Oct 2020 18:16:37 +0100 Subject: [PATCH] net/dpaa2: fix build with timesync functions [ upstream commit c6299a086711b0578fcebe6a2ee99f3cba6faa54 ] Some timesync related source files are built only when 'RTE_LIBRTE_IEEE1588' config is set, which is missing in meson. Building with '-DRTE_LIBRTE_IEEE1588' cflag will enable timesync functionality in the files that are build, but it won't build files that require 'RTE_LIBRTE_IEEE1588' config. This causes the build error. Fixing by removing config check in meson file and build all .c files by default, but wrap relevant code part with 'RTE_LIBRTE_IEEE1588' macro. Also removing 'RTE_LIBRTE_IEEE1588' ifdef around some fields of the data structures, to not require finer grained macro wraps on the functions using them. Since the registration of the function disabled with macro check, having functions compiled shouldn't affect the functionality. Fixes: 184c39d16568 ("net/dpaa2: add DPRTC sub-module") Signed-off-by: Chenxu Di Signed-off-by: Ferruh Yigit Acked-by: Sachin Saxena --- drivers/net/dpaa2/dpaa2_ethdev.h | 4 ---- drivers/net/dpaa2/dpaa2_ptp.c | 2 ++ drivers/net/dpaa2/meson.build | 7 ++----- 3 files changed, 4 insertions(+), 9 deletions(-) diff --git a/drivers/net/dpaa2/dpaa2_ethdev.h b/drivers/net/dpaa2/dpaa2_ethdev.h index 95674b26b9..0030251b8a 100644 --- a/drivers/net/dpaa2/dpaa2_ethdev.h +++ b/drivers/net/dpaa2/dpaa2_ethdev.h @@ -135,7 +135,6 @@ struct dpaa2_dev_priv { uint16_t ss_offset; uint64_t ss_iova; uint64_t ss_param_iova; -#if defined(RTE_LIBRTE_IEEE1588) /*stores timestamp of last received packet on dev*/ uint64_t rx_timestamp; /*stores timestamp of last received tx confirmation packet on dev*/ @@ -144,7 +143,6 @@ struct dpaa2_dev_priv { * it corresponds to last packet transmitted */ struct dpaa2_queue *next_tx_conf_queue; -#endif struct rte_eth_dev *eth_dev; /**< Pointer back to holding ethdev */ @@ -200,7 +198,6 @@ void dpaa2_dev_free_eqresp_buf(uint16_t eqresp_ci); void dpaa2_flow_clean(struct rte_eth_dev *dev); uint16_t dpaa2_dev_tx_conf(void *queue) __attribute__((unused)); -#if defined(RTE_LIBRTE_IEEE1588) int dpaa2_timesync_enable(struct rte_eth_dev *dev); int dpaa2_timesync_disable(struct rte_eth_dev *dev); int dpaa2_timesync_read_time(struct rte_eth_dev *dev, @@ -213,5 +210,4 @@ int dpaa2_timesync_read_rx_timestamp(struct rte_eth_dev *dev, uint32_t flags __rte_unused); int dpaa2_timesync_read_tx_timestamp(struct rte_eth_dev *dev, struct timespec *timestamp); -#endif #endif /* _DPAA2_ETHDEV_H */ diff --git a/drivers/net/dpaa2/dpaa2_ptp.c b/drivers/net/dpaa2/dpaa2_ptp.c index 316912fe3e..bd9bcd58b0 100644 --- a/drivers/net/dpaa2/dpaa2_ptp.c +++ b/drivers/net/dpaa2/dpaa2_ptp.c @@ -129,6 +129,7 @@ int dpaa2_timesync_read_rx_timestamp(struct rte_eth_dev *dev, return 0; } +#if defined(RTE_LIBRTE_IEEE1588) static int dpaa2_create_dprtc_device(int vdev_fd __rte_unused, struct vfio_device_info *obj_info __rte_unused, @@ -179,3 +180,4 @@ static struct rte_dpaa2_object rte_dpaa2_dprtc_obj = { }; RTE_PMD_REGISTER_DPAA2_OBJECT(dprtc, rte_dpaa2_dprtc_obj); +#endif diff --git a/drivers/net/dpaa2/meson.build b/drivers/net/dpaa2/meson.build index 571cdb7d4b..fc4707db10 100644 --- a/drivers/net/dpaa2/meson.build +++ b/drivers/net/dpaa2/meson.build @@ -13,15 +13,12 @@ sources = files('base/dpaa2_hw_dpni.c', 'dpaa2_flow.c', 'dpaa2_rxtx.c', 'dpaa2_sparser.c', + 'dpaa2_ptp.c', + 'mc/dprtc.c', 'mc/dpkg.c', 'mc/dpdmux.c', 'mc/dpni.c') -if dpdk_conf.has('RTE_LIBRTE_IEEE1588') - sources += files('mc/dprtc.c') - sources += files('dpaa2_ptp.c') -endif - includes += include_directories('base', 'mc') # depends on fslmc bus which uses experimental API -- 2.20.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2020-10-28 10:35:16.788385803 +0000 +++ 0163-net-dpaa2-fix-build-with-timesync-functions.patch 2020-10-28 10:35:11.764833851 +0000 @@ -1,8 +1,10 @@ -From c6299a086711b0578fcebe6a2ee99f3cba6faa54 Mon Sep 17 00:00:00 2001 +From e3d00438db8bf4794df58375bd54e134707e7b43 Mon Sep 17 00:00:00 2001 From: Chenxu Di Date: Tue, 6 Oct 2020 18:16:37 +0100 Subject: [PATCH] net/dpaa2: fix build with timesync functions +[ upstream commit c6299a086711b0578fcebe6a2ee99f3cba6faa54 ] + Some timesync related source files are built only when 'RTE_LIBRTE_IEEE1588' config is set, which is missing in meson. @@ -21,7 +23,6 @@ functions compiled shouldn't affect the functionality. Fixes: 184c39d16568 ("net/dpaa2: add DPRTC sub-module") -Cc: stable@dpdk.org Signed-off-by: Chenxu Di Signed-off-by: Ferruh Yigit @@ -33,10 +34,10 @@ 3 files changed, 4 insertions(+), 9 deletions(-) diff --git a/drivers/net/dpaa2/dpaa2_ethdev.h b/drivers/net/dpaa2/dpaa2_ethdev.h -index e577355d57..94cf253827 100644 +index 95674b26b9..0030251b8a 100644 --- a/drivers/net/dpaa2/dpaa2_ethdev.h +++ b/drivers/net/dpaa2/dpaa2_ethdev.h -@@ -160,7 +160,6 @@ struct dpaa2_dev_priv { +@@ -135,7 +135,6 @@ struct dpaa2_dev_priv { uint16_t ss_offset; uint64_t ss_iova; uint64_t ss_param_iova; @@ -44,7 +45,7 @@ /*stores timestamp of last received packet on dev*/ uint64_t rx_timestamp; /*stores timestamp of last received tx confirmation packet on dev*/ -@@ -169,7 +168,6 @@ struct dpaa2_dev_priv { +@@ -144,7 +143,6 @@ struct dpaa2_dev_priv { * it corresponds to last packet transmitted */ struct dpaa2_queue *next_tx_conf_queue; @@ -52,22 +53,22 @@ struct rte_eth_dev *eth_dev; /**< Pointer back to holding ethdev */ -@@ -227,7 +225,6 @@ void dpaa2_dev_free_eqresp_buf(uint16_t eqresp_ci); +@@ -200,7 +198,6 @@ void dpaa2_dev_free_eqresp_buf(uint16_t eqresp_ci); void dpaa2_flow_clean(struct rte_eth_dev *dev); - uint16_t dpaa2_dev_tx_conf(void *queue) __rte_unused; + uint16_t dpaa2_dev_tx_conf(void *queue) __attribute__((unused)); -#if defined(RTE_LIBRTE_IEEE1588) int dpaa2_timesync_enable(struct rte_eth_dev *dev); int dpaa2_timesync_disable(struct rte_eth_dev *dev); int dpaa2_timesync_read_time(struct rte_eth_dev *dev, -@@ -240,5 +237,4 @@ int dpaa2_timesync_read_rx_timestamp(struct rte_eth_dev *dev, +@@ -213,5 +210,4 @@ int dpaa2_timesync_read_rx_timestamp(struct rte_eth_dev *dev, uint32_t flags __rte_unused); int dpaa2_timesync_read_tx_timestamp(struct rte_eth_dev *dev, struct timespec *timestamp); -#endif #endif /* _DPAA2_ETHDEV_H */ diff --git a/drivers/net/dpaa2/dpaa2_ptp.c b/drivers/net/dpaa2/dpaa2_ptp.c -index f58eedb314..899dd5d442 100644 +index 316912fe3e..bd9bcd58b0 100644 --- a/drivers/net/dpaa2/dpaa2_ptp.c +++ b/drivers/net/dpaa2/dpaa2_ptp.c @@ -129,6 +129,7 @@ int dpaa2_timesync_read_rx_timestamp(struct rte_eth_dev *dev, @@ -84,7 +85,7 @@ RTE_PMD_REGISTER_DPAA2_OBJECT(dprtc, rte_dpaa2_dprtc_obj); +#endif diff --git a/drivers/net/dpaa2/meson.build b/drivers/net/dpaa2/meson.build -index 6dd0eb274c..4312aa73f7 100644 +index 571cdb7d4b..fc4707db10 100644 --- a/drivers/net/dpaa2/meson.build +++ b/drivers/net/dpaa2/meson.build @@ -13,15 +13,12 @@ sources = files('base/dpaa2_hw_dpni.c', @@ -104,7 +105,7 @@ - includes += include_directories('base', 'mc') - install_headers('rte_pmd_dpaa2.h') + # depends on fslmc bus which uses experimental API -- 2.20.1