[EXT] Re: [PATCH v6 06/21] pdcp: add pre and post process for UL

Anoob Joseph anoobj at marvell.com
Mon Jun 12 07:19:17 CEST 2023


Hi Thomas,

Thanks for the fix. Will check if we can have it addressed properly.

Thanks,
Anoob

> -----Original Message-----
> From: Thomas Monjalon <thomas at monjalon.net>
> Sent: Sunday, June 11, 2023 4:21 AM
> To: Akhil Goyal <gakhil at marvell.com>; Kiran Kumar Kokkilagadda
> <kirankumark at marvell.com>; Volodymyr Fialko <vfialko at marvell.com>;
> Anoob Joseph <anoobj at marvell.com>
> Cc: Jerin Jacob Kollanukkaran <jerinj at marvell.com>; Konstantin Ananyev
> <konstantin.v.ananyev at yandex.ru>; dev at dpdk.org; Hemant Agrawal
> <hemant.agrawal at nxp.com>; Mattias Rönnblom
> <mattias.ronnblom at ericsson.com>; dev at dpdk.org; Olivier Matz
> <olivier.matz at 6wind.com>; Stephen Hemminger
> <stephen at networkplumber.org>; david.marchand at redhat.com
> Subject: [EXT] Re: [PATCH v6 06/21] pdcp: add pre and post process for UL
> 
> External Email
> 
> ----------------------------------------------------------------------
> Hello,
> 
> I'm sorry to inform you that I see a compilation failure when cross-compiling
> for PPC64:
> err_mb is seen as potentially unitialized when calling rte_memcpy().
> 
> 
> 30/05/2023 12:01, Anoob Joseph:
> > +static uint16_t
> > +pdcp_post_process_ul(const struct rte_pdcp_entity *entity,
> > +		     struct rte_mbuf *in_mb[], struct rte_mbuf *out_mb[],
> > +		     uint16_t num, uint16_t *nb_err_ret) {
> > +	struct entity_priv *en_priv = entity_priv_get(entity);
> > +	const uint32_t hdr_trim_sz = en_priv->aad_sz;
> > +	int i, nb_success = 0, nb_err = 0;
> > +	struct rte_mbuf *mb, *err_mb[num];
> > +
> 
> I need to add a workaround here to make GCC happy:
> #ifdef RTE_ARCH_PPC_64
> 	err_mb[0] = NULL; /* workaround PPC-GCC bug */ #endif
> 
> > +	for (i = 0; i < num; i++) {
> > +		mb = in_mb[i];
> > +		if (unlikely(mb->ol_flags &
> RTE_MBUF_F_RX_SEC_OFFLOAD_FAILED)) {
> > +			err_mb[nb_err++] = mb;
> > +			continue;
> > +		}
> > +
> > +		if (hdr_trim_sz)
> > +			rte_pktmbuf_adj(mb, hdr_trim_sz);
> > +
> > +		out_mb[nb_success++] = mb;
> > +	}
> > +
> > +	if (unlikely(nb_err != 0))
> > +		rte_memcpy(&out_mb[nb_success], err_mb, nb_err *
> sizeof(struct
> > +rte_mbuf *));
> > +
> > +	*nb_err_ret = nb_err;
> > +	return nb_success;
> > +}
> 
> I've added the workaround in 3 places while pulling next-crypto tree.
> Feel free to improve it with a new patch, thanks.
> 



More information about the dev mailing list