On Thu, 24 Mar 2022 04:52:07 +0000
Honnappa Nagarahalli <honnappa.nagaraha...@arm.com> wrote:

> <snip>
> 
> > 
> > Hi Mattias,
> >   
> > >
> > > Would it make sense to have a seqlock implementation in DPDK?  
> I do not have any issues with adding the seqlock to DPDK.
> 
> However, I am interested in understanding the use case. As I understand, 
> seqlock is a type of reader-writer lock. This means that it is possible that 
> readers (data plane) may be blocked till the writer completes the updates. 
> Does not this mean, data plane might drop packets while the writer is 
> updating entries?
> 
> > >
> > > I think so, since it's a very useful synchronization primitive in data
> > > plane applications.
> > >  
> > 
> > Agree, it might be useful.
> > As I remember rte_hash '_lf' functions do use something similar to seqlock, 
> > but
> > in hand-made manner.
> > Probably some other entities within DPDK itself or related projects will 
> > benefit
> > from it too...
> > 
> > Konstantin

As inventor of seqlock, it is really just a kind of reader/writer spinlock
where spinning trys to do useful work.  It useful for cases where the data
being accessed is too large for __atomic primitives. 


Reply via email to