[PATCH 20.11 2/2] dpaa2: fix build with RTE_LIBRTE_IEEE1588

Christian Ehrhardt christian.ehrhardt at canonical.com
Tue Mar 29 16:20:50 CEST 2022


On Tue, Mar 29, 2022 at 2:10 PM <luca.boccassi at gmail.com> wrote:
>
> From: Luca Boccassi <bluca at debian.org>
>
> ../drivers/net/dpaa2/dpaa2_rxtx.c: In function ‘dpaa2_dev_rx’:
> ../drivers/net/dpaa2/dpaa2_rxtx.c:863:4: error: ‘priv’ undeclared (first use in this function); did you mean ‘ldiv’?
>     priv->rx_timestamp =
>     ^~~~
>     ldiv
>
> Bugzilla ID: 982
>
> Fixes: 1d10966a22ca ("net/dpaa2: fix timestamping for IEEE1588")
>
> Signed-off-by: Luca Boccassi <bluca at debian.org>

It was unclear at first why it needs the if defined, thanks for the
IRC discussion.
While not nice I think it makes sense as a build-fix.
+1, but since I'm not a subject matter expert I'm holding back an
official signed-off for this.

> ---
>  drivers/net/dpaa2/dpaa2_rxtx.c | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/drivers/net/dpaa2/dpaa2_rxtx.c b/drivers/net/dpaa2/dpaa2_rxtx.c
> index ecd004f9fa..23e193f86c 100644
> --- a/drivers/net/dpaa2/dpaa2_rxtx.c
> +++ b/drivers/net/dpaa2/dpaa2_rxtx.c
> @@ -772,6 +772,9 @@ dpaa2_dev_rx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
>         const struct qbman_fd *fd;
>         struct qbman_pull_desc pulldesc;
>         struct rte_eth_dev_data *eth_data = dpaa2_q->eth_data;
> +#if defined(RTE_LIBRTE_IEEE1588)
> +       struct dpaa2_dev_priv *priv = eth_data->dev_private;
> +#endif
>
>         if (unlikely(!DPAA2_PER_LCORE_DPIO)) {
>                 ret = dpaa2_affine_qbman_swp();
> --
> 2.34.1
>


-- 
Christian Ehrhardt
Staff Engineer, Ubuntu Server
Canonical Ltd


More information about the stable mailing list