[lng-odp] [API-NEXT PATCH] api: packet reference count support

2015-09-09 Thread Maxim Uvarov
Add api for buffer reference count support. Which is useful in case: - multicast support - TCP retransmission - traffic generator odp_packet_free() function should relay on reference count and do not free packet with reference count > 1. Implementation for pktio send() function should be also a

Re: [lng-odp] [API-NEXT PATCH] api: packet reference count support

2015-09-09 Thread Ola Liljedahl
On 9 September 2015 at 13:41, Maxim Uvarov wrote: > Add api for buffer reference count support. Which is useful in case: > - multicast support > - TCP retransmission > - traffic generator > I can understand that a traffic generator wants to reuse existing initialised packets but doesn't it nee

Re: [lng-odp] [API-NEXT PATCH] api: packet reference count support

2015-09-09 Thread Bill Fischofer
On Wed, Sep 9, 2015 at 6:41 AM, Maxim Uvarov wrote: > Add api for buffer reference count support. Which is useful in case: > - multicast support > - TCP retransmission > - traffic generator > > odp_packet_free() function should relay on reference count and do not > free packet with reference c

Re: [lng-odp] [API-NEXT PATCH] api: packet reference count support

2015-09-09 Thread Bill Fischofer
Actually on reflection I don't like adding reference count decrement functionality to odp_packet_free(). The problem is that this is a void function so there's no way to tell after calling it whether the packet was actually freed or not. If it was, the pkt handle is no longer valid and cannot be

Re: [lng-odp] [API-NEXT PATCH] api: packet reference count support

2015-09-09 Thread Ivan Khoronzhuk
On 09.09.15 22:15, Bill Fischofer wrote: On Wed, Sep 9, 2015 at 6:41 AM, Maxim Uvarov mailto:maxim.uva...@linaro.org>> wrote: Add api for buffer reference count support. Which is useful in case: - multicast support - TCP retransmission - traffic generator odp_packe

Re: [lng-odp] [API-NEXT PATCH] api: packet reference count support

2015-09-10 Thread Maxim Uvarov
On 09/09/15 22:15, Bill Fischofer wrote: On Wed, Sep 9, 2015 at 6:41 AM, Maxim Uvarov > wrote: Add api for buffer reference count support. Which is useful in case: - multicast support - TCP retransmission - traffic generator odp_packet_f

Re: [lng-odp] [API-NEXT PATCH] api: packet reference count support

2015-09-10 Thread Maxim Uvarov
On 09/09/15 22:52, Bill Fischofer wrote: Actually on reflection I don't like adding reference count decrement functionality to odp_packet_free(). The problem is that this is a void function so there's no way to tell after calling it whether the packet was actually freed or not. If it was, the

Re: [lng-odp] [API-NEXT PATCH] api: packet reference count support

2015-09-10 Thread Savolainen, Petri (Nokia - FI/Espoo)
packet -Petri From: lng-odp [mailto:lng-odp-boun...@lists.linaro.org] On Behalf Of EXT Bill Fischofer Sent: Wednesday, September 09, 2015 10:53 PM To: Maxim Uvarov Cc: LNG ODP Mailman List Subject: Re: [lng-odp] [API-NEXT PATCH] api: packet reference count support Actually on reflection I don't

Re: [lng-odp] [API-NEXT PATCH] api: packet reference count support

2015-09-10 Thread Maxim Uvarov
On 09/09/15 22:58, Ivan Khoronzhuk wrote: t's also unclear when and where packet finally has to be really deleted. What if odp_packet_refcount_dec() leads to 0, but odp_packet_free() was called sometime before? There should be no packets with refcount 0. As soon as it became 0 it's freed. It'

Re: [lng-odp] [API-NEXT PATCH] api: packet reference count support

2015-09-10 Thread Ivan Khoronzhuk
Maxim, On 10.09.15 12:09, Maxim Uvarov wrote: On 09/09/15 22:58, Ivan Khoronzhuk wrote: t's also unclear when and where packet finally has to be really deleted. What if odp_packet_refcount_dec() leads to 0, but odp_packet_free() was called sometime before? There should be no packets with ref

Re: [lng-odp] [API-NEXT PATCH] api: packet reference count support

2015-09-10 Thread Maxim Uvarov
ng-odp [mailto:lng-odp-boun...@lists.linaro.org] *On Behalf Of *EXT Bill Fischofer *Sent:* Wednesday, September 09, 2015 10:53 PM *To:* Maxim Uvarov *Cc:* LNG ODP Mailman List *Subject:* Re: [lng-odp] [API-NEXT PATCH] api: packet reference count support Actually on reflection I don't like

Re: [lng-odp] [API-NEXT PATCH] api: packet reference count support

2015-09-10 Thread Ivan Khoronzhuk
ODP Mailman List *Subject:* Re: [lng-odp] [API-NEXT PATCH] api: packet reference count support Actually on reflection I don't like adding reference count decrement functionality to odp_packet_free(). The problem is that this is a void function so there's no way to tell after calling it

Re: [lng-odp] [API-NEXT PATCH] api: packet reference count support

2015-09-10 Thread Savolainen, Petri (Nokia - FI/Espoo)
the first > > segment and > > > > //rest of the segments are shared with other references to the packet > > > > What is use case for support segmentations refcounts? Do we have big > overhead if we keep hole packet, not only it's segment? For example, multica

Re: [lng-odp] [API-NEXT PATCH] api: packet reference count support

2015-09-10 Thread Maxim Uvarov
-odp] [API-NEXT PATCH] api: packet reference count support On 09/10/15 12:00, Savolainen, Petri (Nokia - FI/Espoo) wrote: The problem to solve is: how to enable multiple references to a packet and more generally to a packet segment. It would be better to create new handles, instead of increment a

Re: [lng-odp] [API-NEXT PATCH] api: packet reference count support

2015-09-11 Thread Savolainen, Petri (Nokia - FI/Espoo)
Savolainen, Petri (Nokia - FI/Espoo); EXT Bill Fischofer > >> Cc: LNG ODP Mailman List > >> Subject: Re: [lng-odp] [API-NEXT PATCH] api: packet reference count > >> support > >> > >> On 09/10/15 12:00, Savolainen, Petri (Nokia - FI/Espoo) wrote: > >>

Re: [lng-odp] [API-NEXT PATCH] api: packet reference count support

2015-09-11 Thread Maxim Uvarov
Fischofer Cc: LNG ODP Mailman List Subject: Re: [lng-odp] [API-NEXT PATCH] api: packet reference count support On 09/10/15 12:00, Savolainen, Petri (Nokia - FI/Espoo) wrote: The problem to solve is: how to enable multiple references to a packet and more generally to a packet segment. It would be

Re: [lng-odp] [API-NEXT PATCH] api: packet reference count support

2015-09-11 Thread Savolainen, Petri (Nokia - FI/Espoo)
lainen, Petri (Nokia - FI/Espoo); EXT Bill Fischofer > >> Cc: LNG ODP Mailman List > >> Subject: Re: [lng-odp] [API-NEXT PATCH] api: packet reference count > >> support > >> > >> On 09/10/15 15:54, Savolainen, Petri (Nokia - FI/Espoo) wrote: >

Re: [lng-odp] [API-NEXT PATCH] api: packet reference count support

2015-09-11 Thread Maxim Uvarov
Fischofer Cc: LNG ODP Mailman List Subject: Re: [lng-odp] [API-NEXT PATCH] api: packet reference count support On 09/10/15 15:54, Savolainen, Petri (Nokia - FI/Espoo) wrote: -Original Message- From: EXT Maxim Uvarov [mailto:maxim.uva...@linaro.org] Sent: Thursday, September 10, 2015 2:20 PM

Re: [lng-odp] [API-NEXT PATCH] api: packet reference count support

2015-09-11 Thread Savolainen, Petri (Nokia - FI/Espoo)
lainen, Petri (Nokia - FI/Espoo); EXT Bill Fischofer > >> Cc: LNG ODP Mailman List > >> Subject: Re: [lng-odp] [API-NEXT PATCH] api: packet reference count > >> support > >> > >> On 09/11/15 10:48, Savolainen, Petri (Nokia - FI/Espoo) wrote: >

Re: [lng-odp] [API-NEXT PATCH] api: packet reference count support

2015-09-11 Thread Maxim Uvarov
Fischofer Cc: LNG ODP Mailman List Subject: Re: [lng-odp] [API-NEXT PATCH] api: packet reference count support On 09/11/15 10:48, Savolainen, Petri (Nokia - FI/Espoo) wrote: -Original Message- From: EXT Maxim Uvarov [mailto:maxim.uva...@linaro.org] Sent: Thursday, September 10, 2015 7:11 PM