[EXT] Re: [PATCH v4 21/22] pdcp: add thread safe processing
Anoob Joseph
anoobj at marvell.com
Sat May 27 09:17:13 CEST 2023
Hi Stephen,
I've dropped this patch for now. Based on what we conclude on this thread, will post this as a separate patch as required.
Thanks,
Anoob
> -----Original Message-----
> From: Anoob Joseph <anoobj at marvell.com>
> Sent: Saturday, May 27, 2023 10:55 AM
> To: Stephen Hemminger <stephen at networkplumber.org>
> Cc: Thomas Monjalon <thomas at monjalon.net>; Akhil Goyal
> <gakhil at marvell.com>; Jerin Jacob Kollanukkaran <jerinj at marvell.com>;
> Konstantin Ananyev <konstantin.v.ananyev at yandex.ru>; Volodymyr Fialko
> <vfialko at marvell.com>; Hemant Agrawal <hemant.agrawal at nxp.com>;
> Mattias Rönnblom <mattias.ronnblom at ericsson.com>; Kiran Kumar
> Kokkilagadda <kirankumark at marvell.com>; dev at dpdk.org; Olivier Matz
> <olivier.matz at 6wind.com>
> Subject: RE: [EXT] Re: [PATCH v4 21/22] pdcp: add thread safe processing
>
> Hi Stephen,
>
> Please see inline.
>
> Thanks,
> Anoob
>
> > -----Original Message-----
> > From: Stephen Hemminger <stephen at networkplumber.org>
> > Sent: Saturday, May 27, 2023 3:42 AM
> > To: Anoob Joseph <anoobj at marvell.com>
> > Cc: Thomas Monjalon <thomas at monjalon.net>; Akhil Goyal
> > <gakhil at marvell.com>; Jerin Jacob Kollanukkaran <jerinj at marvell.com>;
> > Konstantin Ananyev <konstantin.v.ananyev at yandex.ru>; Volodymyr
> Fialko
> > <vfialko at marvell.com>; Hemant Agrawal <hemant.agrawal at nxp.com>;
> > Mattias Rönnblom <mattias.ronnblom at ericsson.com>; Kiran Kumar
> > Kokkilagadda <kirankumark at marvell.com>; dev at dpdk.org; Olivier Matz
> > <olivier.matz at 6wind.com>
> > Subject: [EXT] Re: [PATCH v4 21/22] pdcp: add thread safe processing
> >
> > External Email
> >
> > ----------------------------------------------------------------------
> > On Sat, 27 May 2023 02:32:13 +0530
> > Anoob Joseph <anoobj at marvell.com> wrote:
> >
> > > +static inline uint32_t
> > > +pdcp_atomic_inc(uint32_t *val, const bool mt_safe) {
> > > + if (mt_safe)
> > > + return __atomic_fetch_add(val, 1, __ATOMIC_RELAXED);
> > > + else
> > > + return (*val)++;
> > > +}
> >
> > This is a bad pattern. None of the rest of DPDK does this.
> > Either be thread safe or not.
>
> [Anoob] Most protocol implementation would have a similar issue. I've tried
> to follow the approach taken in lib IPsec (please check lib/ipsec/ipsec_sqn.h).
> From the discussion we had on v3, I've tried to make it compile time constant
> to remove any conditional checks in datapath.
>
> If you still think, this is an issue, I could drop this patch for now and re-
> introduce it later once we have test applications that can work with traffic.
> Please share your thoughts.
More information about the dev
mailing list