mbox series

[v2,0/8] fix distributor synchronization issues

Message ID 20200923014713.16932-1-l.wojciechow@partner.samsung.com (mailing list archive)
Headers
Series fix distributor synchronization issues |

Message

Lukasz Wojciechowski Sept. 23, 2020, 1:47 a.m. UTC
  During review and verification of the patch created by Sarosh Arif:
"test_distributor: prevent memory leakages from the pool" I found out
that running distributor unit tests multiple times in a row causes fails.
So I investigated all the issues I found.

There are few synchronization issues that might cause deadlocks
or corrupted data. They are fixed with this set of patches for both tests
and librte_distributor library.

---
v2:
* assign NULL to freed mbufs in distributor test
* fix handshake check on legacy single distributor
     rte_distributor_return_pkt_single()
* add patch 7 passing NULL to legacy API calls if no bufs are returned
* add patch 8 fixing API documentation

Lukasz Wojciechowski (8):
  app/test: fix deadlock in distributor test
  app/test: synchronize statistics between lcores
  app/test: fix freeing mbufs in distributor tests
  app/test: collect return mbufs in distributor test
  distributor: fix missing handshake synchronization
  distributor: fix handshake deadlock
  distributor: do not use oldpkt when not needed
  distributor: align API documentation with code

 app/test/test_distributor.c                   | 113 +++++++++++-------
 lib/librte_distributor/rte_distributor.c      |  27 ++++-
 lib/librte_distributor/rte_distributor.h      |  23 ++--
 .../rte_distributor_single.c                  |   4 +
 4 files changed, 110 insertions(+), 57 deletions(-)
  

Comments

Hunt, David Sept. 23, 2020, 8:46 a.m. UTC | #1
Hi Lukasz,


On 23/9/2020 2:47 AM, Lukasz Wojciechowski wrote:
> During review and verification of the patch created by Sarosh Arif:
> "test_distributor: prevent memory leakages from the pool" I found out
> that running distributor unit tests multiple times in a row causes fails.
> So I investigated all the issues I found.
>
> There are few synchronization issues that might cause deadlocks
> or corrupted data. They are fixed with this set of patches for both tests
> and librte_distributor library.
>
> ---
> v2:
> * assign NULL to freed mbufs in distributor test
> * fix handshake check on legacy single distributor
>       rte_distributor_return_pkt_single()
> * add patch 7 passing NULL to legacy API calls if no bufs are returned
> * add patch 8 fixing API documentation
>
>

Please include any Acked-by or Tested-by tags from previous versions.

Rgds,
Dave.
  
Hunt, David Sept. 23, 2020, 8:47 a.m. UTC | #2
Hi Lukasz,

On 23/9/2020 2:47 AM, Lukasz Wojciechowski wrote:
> During review and verification of the patch created by Sarosh Arif:
> "test_distributor: prevent memory leakages from the pool" I found out
> that running distributor unit tests multiple times in a row causes fails.
> So I investigated all the issues I found.
>
> There are few synchronization issues that might cause deadlocks
> or corrupted data. They are fixed with this set of patches for both tests
> and librte_distributor library.
>
> ---
> v2:
> * assign NULL to freed mbufs in distributor test
> * fix handshake check on legacy single distributor
>       rte_distributor_return_pkt_single()
> * add patch 7 passing NULL to legacy API calls if no bufs are returned
> * add patch 8 fixing API documentation
>

Please include any Acked-by or Tested-by tags from previous versions.

Rgds,
Dave.
  
Lukasz Wojciechowski Sept. 23, 2020, 2:03 p.m. UTC | #3
W dniu 23.09.2020 o 10:46, David Hunt pisze:
> Hi Lukasz,
>
>
> On 23/9/2020 2:47 AM, Lukasz Wojciechowski wrote:
>> During review and verification of the patch created by Sarosh Arif:
>> "test_distributor: prevent memory leakages from the pool" I found out
>> that running distributor unit tests multiple times in a row causes 
>> fails.
>> So I investigated all the issues I found.
>>
>> There are few synchronization issues that might cause deadlocks
>> or corrupted data. They are fixed with this set of patches for both 
>> tests
>> and librte_distributor library.
>>
>> ---
>> v2:
>> * assign NULL to freed mbufs in distributor test
>> * fix handshake check on legacy single distributor
>>       rte_distributor_return_pkt_single()
>> * add patch 7 passing NULL to legacy API calls if no bufs are returned
>> * add patch 8 fixing API documentation
>>
>>
>
> Please include any Acked-by or Tested-by tags from previous versions.
I added them in v3. I'm very sorry for not including them in v2.
>
> Rgds,
> Dave.
>
Best regards

Lukasz

>
>
>