[prev in list] [next in list] [prev in thread] [next in thread]
List: dpdk-users
Subject: [dpdk-users] rte_ring_dequeue returns 0 but pointer is null
From: Filip Janiszewski <contact () filipjaniszewski ! com>
Date: 2020-12-04 10:20:23
Message-ID: 6ba0e4d5-675f-213a-751d-d9f010e04e9d () filipjaniszewski ! com
[Download RAW message or body]
Hi,
Given this sample code, running on DPDK 20.08:
if( rte_ring_dequeue( master->buffers,
( void** )&data ) )
{
// Handle situation
}
else
{
// do stuff with data
}
We're encountering a situation where data is null but the function
rte_ring_dequeue does not return an error code (returns 0) - This seems
to happen at random times, but always at least after few minutes of
execution.
the ring seems to be correctly configured in MT mode and another
thread/worker from time to time enqueue items into the ring, dumping the
GDB output so maybe someone can spot issues:
.
$4 = {name = "bufm_7572335744434674_fr\000\000\000\000\000\000\000",
flags = 0, memzone = 0x1000056c0, size = 64, mask = 63, capacity = 63,
pad0 = 0 '\000', {prod = {
head = 124, tail = 124, {sync_type = RTE_RING_SYNC_MT, single =
0}}, hts_prod = {ht = {raw = 532575944828, pos = {head = 124, tail = 124}},
sync_type = RTE_RING_SYNC_MT}, rts_prod = {tail = {raw =
532575944828, val = {cnt = 124, pos = 124}}, sync_type =
RTE_RING_SYNC_MT, htd_max = 0, head = {raw = 0,
val = {cnt = 0, pos = 0}}}}, pad1 = 0 '\000', {cons = {head =
63, tail = 63, {sync_type = RTE_RING_SYNC_MT, single = 0}}, hts_cons =
{ht = {raw = 270582939711,
pos = {head = 63, tail = 63}}, sync_type = RTE_RING_SYNC_MT},
rts_cons = {tail = {raw = 270582939711, val = {cnt = 63, pos = 63}},
sync_type = RTE_RING_SYNC_MT,
htd_max = 0, head = {raw = 0, val = {cnt = 0, pos = 0}}}}, pad2 =
0 '\000'}
.
How this is possible? I would expect rte_ring_dequeue to return 0 only
if the provided pointer is valid.. Any suggestion on what I can
investigate to understand the problem and fix it?
Thanks
--
BR, Filip
+48 666 369 823
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic