DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Sachin Saxena (OSS)" <sachin.saxena@oss.nxp.com>
To: Ferruh Yigit <ferruh.yigit@intel.com>,
	Hemant Agrawal <hemant.agrawal@nxp.com>,
	Chenxu Di <chenxux.di@intel.com>
Cc: Priyanka Jain <priyanka.jain@nxp.com>, dev@dpdk.org, stable@dpdk.org
Subject: Re: [dpdk-dev] [PATCH v3] net/dpaa2: fix build error about timesync functions
Date: Thu, 8 Oct 2020 07:54:38 +0530
Message-ID: <d97ebf8c-4c2a-75a0-7006-976880d3a716@oss.nxp.com> (raw)
In-Reply-To: <20201006171638.2636145-1-ferruh.yigit@intel.com>

Following change should also be handled as suggested by Ferruh in earlier.

    diff --git a/drivers/net/dpaa2/dpaa2_ptp.c
    b/drivers/net/dpaa2/dpaa2_ptp.c
    index 9f755e84bf..0e44d4c6bf 100644
    --- a/drivers/net/dpaa2/dpaa2_ptp.c
    +++ b/drivers/net/dpaa2/dpaa2_ptp.c
    @@ -178,4 +178,6 @@ static struct rte_dpaa2_object
    rte_dpaa2_dprtc_obj = {
             .create = dpaa2_create_dprtc_device,
      };

    +#if defined(RTE_LIBRTE_IEEE1588)
      RTE_PMD_REGISTER_DPAA2_OBJECT(dprtc, rte_dpaa2_dprtc_obj);
    +#endif



regards,
Sachin

On 06-Oct-20 10:46 PM, Ferruh Yigit wrote:
> From: Chenxu Di <chenxux.di@intel.com>
>
> 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")
> Cc: stable@dpdk.org
>
> Signed-off-by: Chenxu Di <chenxux.di@intel.com>
> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
> ---
>   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 e577355d57..94cf253827 100644
> --- a/drivers/net/dpaa2/dpaa2_ethdev.h
> +++ b/drivers/net/dpaa2/dpaa2_ethdev.h
> @@ -160,7 +160,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*/
> @@ -169,7 +168,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 */
>   
> @@ -227,7 +225,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;
>   
> -#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,
>   						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
> --- 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 6dd0eb274c..4312aa73f7 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')
>   
>   install_headers('rte_pmd_dpaa2.h')


  reply	other threads:[~2020-10-08  2:24 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-15  2:40 [dpdk-dev] [PATCH] " Chenxu Di
2020-09-15  3:22 ` Hemant Agrawal
2020-09-16  5:12 ` Zhou, JunX W
2020-09-16 15:29 ` [dpdk-dev] [dpdk-stable] " Ferruh Yigit
2020-09-17  2:03   ` Di, ChenxuX
2020-09-17 11:38     ` Ferruh Yigit
2020-09-17 11:50       ` Hemant Agrawal
2020-09-17 11:59         ` Ferruh Yigit
2020-09-17 15:40           ` Hemant Agrawal
2020-09-30 15:09             ` Ferruh Yigit
2020-09-17  8:43 ` [dpdk-dev] [PATCH v2] " Chenxu Di
2020-09-17 11:48   ` Hemant Agrawal
2020-10-06 17:16   ` [dpdk-dev] [PATCH v3] " Ferruh Yigit
2020-10-08  2:24     ` Sachin Saxena (OSS) [this message]
2020-10-08 13:12       ` Ferruh Yigit
2020-10-09  7:48         ` Sachin Saxena (OSS)
2020-10-09 11:22           ` Ferruh Yigit

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=d97ebf8c-4c2a-75a0-7006-976880d3a716@oss.nxp.com \
    --to=sachin.saxena@oss.nxp.com \
    --cc=chenxux.di@intel.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=hemant.agrawal@nxp.com \
    --cc=priyanka.jain@nxp.com \
    --cc=stable@dpdk.org \
    /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

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ https://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git