Hi Stephen,

Please see inline.

Thanks,
Anoob

> -----Original Message-----
> From: Stephen Hemminger <step...@networkplumber.org>
> Sent: Thursday, May 25, 2023 8:56 PM
> To: Anoob Joseph <ano...@marvell.com>
> Cc: Thomas Monjalon <tho...@monjalon.net>; Akhil Goyal
> <gak...@marvell.com>; Jerin Jacob Kollanukkaran <jer...@marvell.com>;
> Konstantin Ananyev <konstantin.v.anan...@yandex.ru>; Bernard
> Iremonger <bernard.iremon...@intel.com>; Volodymyr Fialko
> <vfia...@marvell.com>; Hemant Agrawal <hemant.agra...@nxp.com>;
> Mattias Rönnblom <mattias.ronnb...@ericsson.com>; Kiran Kumar
> Kokkilagadda <kirankum...@marvell.com>; dev@dpdk.org; Olivier Matz
> <olivier.m...@6wind.com>
> Subject: Re: [EXT] Re: [PATCH v3 21/22] pdcp: add thread safe processing
> 
> On Thu, 25 May 2023 08:15:07 +0000
> Anoob Joseph <ano...@marvell.com> wrote:
> 
> > [Anoob] With PDCP (& most other protocols), we have to update the states
> atomically. Application designers would have a choice of either use single
> thread or do multi-thread processing. If the library is designed for multi-
> thread and if application uses only single thread, then there would be
> unnecessary overheads from library. If library sticks to single-thread and if
> application needs more threads for scaling, then again it would become a
> library issue.
> >
> > Is your issue with providing such an option or is it about how it is
> implemented? IPsec also has a similar challenge and similar per SA
> configuration is provided in lib IPsec as well.
> 
> If you want to provide unlocked access, then it should be done with another
> set of API's.
> 
> The cost of conditional branch will be higher than atomic some times.

[Anoob] Understood. I'll try to introduce some const flags so that compiler 
optimized threads can be registered. That way the conditional branch could be 
avoided. 

Reply via email to