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 <[email protected]> > Sent: Saturday, May 27, 2023 10:55 AM > To: Stephen Hemminger <[email protected]> > Cc: Thomas Monjalon <[email protected]>; Akhil Goyal > <[email protected]>; Jerin Jacob Kollanukkaran <[email protected]>; > Konstantin Ananyev <[email protected]>; Volodymyr Fialko > <[email protected]>; Hemant Agrawal <[email protected]>; > Mattias Rönnblom <[email protected]>; Kiran Kumar > Kokkilagadda <[email protected]>; [email protected]; Olivier Matz > <[email protected]> > 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 <[email protected]> > > Sent: Saturday, May 27, 2023 3:42 AM > > To: Anoob Joseph <[email protected]> > > Cc: Thomas Monjalon <[email protected]>; Akhil Goyal > > <[email protected]>; Jerin Jacob Kollanukkaran <[email protected]>; > > Konstantin Ananyev <[email protected]>; Volodymyr > Fialko > > <[email protected]>; Hemant Agrawal <[email protected]>; > > Mattias Rönnblom <[email protected]>; Kiran Kumar > > Kokkilagadda <[email protected]>; [email protected]; Olivier Matz > > <[email protected]> > > 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 <[email protected]> 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.

