DPDK patches and discussions
 help / color / mirror / Atom feed
* Question about RTE ring
@ 2024-04-09 10:56 arie abergel
  2024-04-11  8:08 ` Konstantin Ananyev
  0 siblings, 1 reply; 4+ messages in thread
From: arie abergel @ 2024-04-09 10:56 UTC (permalink / raw)
  To: dev

Hi,

As part of a project I have a question about the rte ring.
I’m using rte ring multi producer/single consumer.
The producers are several process.
If one producer is enqueuing an element and crashed (kill pid) in the middle of the
 enqueuing, can it compromise the ring ?

Thanks !

^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: Question about RTE ring
  2024-04-09 10:56 Question about RTE ring arie abergel
@ 2024-04-11  8:08 ` Konstantin Ananyev
  2024-04-11  8:34   ` arie abergel
  0 siblings, 1 reply; 4+ messages in thread
From: Konstantin Ananyev @ 2024-04-11  8:08 UTC (permalink / raw)
  To: arie abergel, dev



 Hi,
> 
> As part of a project I have a question about the rte ring.
> I’m using rte ring multi producer/single consumer.
> The producers are several process.
> If one producer is enqueuing an element and crashed (kill pid) in the middle of the
>  enqueuing, can it compromise the ring ?

I suppose you are using rte_ring as IPC mechanism between multiple processes, correct?
In theory - yes, if your producer crashed during enqueue() to the ring, then yes, the ring might be affected.
If producer already moved prod.head  and crashed before updating prod.tail, then no other producers
will be able to enqueue() into the ring, till you'll do reset() for it.
I expect such situation really rare and hard to reproduce, but in theory it is possible.
Konstantin  

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Question about RTE ring
  2024-04-11  8:08 ` Konstantin Ananyev
@ 2024-04-11  8:34   ` arie abergel
  2024-04-11  9:24     ` Konstantin Ananyev
  0 siblings, 1 reply; 4+ messages in thread
From: arie abergel @ 2024-04-11  8:34 UTC (permalink / raw)
  To: Konstantin Ananyev; +Cc: dev

Thans for your response !

Yes, using rte_ring between multiple process.

So in this case you’re saying the behavior is undefined ?
In my case another process crashed after that.

> Le 11 avr. 2024 à 11:08, Konstantin Ananyev <konstantin.ananyev@huawei.com> a écrit :
> 
> 
> 
> Hi,
>> 
>> As part of a project I have a question about the rte ring.
>> I’m using rte ring multi producer/single consumer.
>> The producers are several process.
>> If one producer is enqueuing an element and crashed (kill pid) in the middle of the
>> enqueuing, can it compromise the ring ?
> 
> I suppose you are using rte_ring as IPC mechanism between multiple processes, correct?
> In theory - yes, if your producer crashed during enqueue() to the ring, then yes, the ring might be affected.
> If producer already moved prod.head  and crashed before updating prod.tail, then no other producers
> will be able to enqueue() into the ring, till you'll do reset() for it.
> I expect such situation really rare and hard to reproduce, but in theory it is possible.
> Konstantin  

^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: Question about RTE ring
  2024-04-11  8:34   ` arie abergel
@ 2024-04-11  9:24     ` Konstantin Ananyev
  0 siblings, 0 replies; 4+ messages in thread
From: Konstantin Ananyev @ 2024-04-11  9:24 UTC (permalink / raw)
  To: arie abergel; +Cc: dev

> 
> Thans for your response !
> 
> Yes, using rte_ring between multiple process.
> 
> So in this case you’re saying the behavior is undefined ?
> In my case another process crashed after that.

Without a proper debug session it is really hard to tell what is going on.
If the situation is reproducible, I'd suggest to run it with gdb and see.

> 
> > Le 11 avr. 2024 à 11:08, Konstantin Ananyev <konstantin.ananyev@huawei.com> a écrit :
> >
> > 
> >
> > Hi,
> >>
> >> As part of a project I have a question about the rte ring.
> >> I’m using rte ring multi producer/single consumer.
> >> The producers are several process.
> >> If one producer is enqueuing an element and crashed (kill pid) in the middle of the
> >> enqueuing, can it compromise the ring ?
> >
> > I suppose you are using rte_ring as IPC mechanism between multiple processes, correct?
> > In theory - yes, if your producer crashed during enqueue() to the ring, then yes, the ring might be affected.
> > If producer already moved prod.head  and crashed before updating prod.tail, then no other producers
> > will be able to enqueue() into the ring, till you'll do reset() for it.
> > I expect such situation really rare and hard to reproduce, but in theory it is possible.
> > Konstantin

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-04-11  9:25 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-09 10:56 Question about RTE ring arie abergel
2024-04-11  8:08 ` Konstantin Ananyev
2024-04-11  8:34   ` arie abergel
2024-04-11  9:24     ` Konstantin Ananyev

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).