From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 85B2FA04B0 for ; Fri, 4 Dec 2020 11:20:38 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id C165B375B; Fri, 4 Dec 2020 11:20:36 +0100 (CET) Received: from delivery.mailspamprotection.com (delivery.mailspamprotection.com [146.66.121.62]) by dpdk.org (Postfix) with ESMTP id 9F04434F3 for ; Fri, 4 Dec 2020 11:20:34 +0100 (CET) Received: from 72.204.214.35.bc.googleusercontent.com ([35.214.204.72] helo=es18.siteground.eu) by se18.mailspamprotection.com with esmtps (TLSv1.2:AES128-GCM-SHA256:128) (Exim 4.92) (envelope-from ) id 1kl8CP-0007wi-4v for users@dpdk.org; Fri, 04 Dec 2020 04:20:32 -0600 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=filipjaniszewski.com; s=default; h=Content-Transfer-Encoding:Content-Type: MIME-Version:Date:Message-ID:Subject:From:To:Sender:Reply-To:Cc:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=nJcF+LpYvUSfbprA0NodtBiqpkVznEgKpVEby9CvaQU=; b=gVfEhZXFttpPNVl0vApHp+oVjH MorD9ztoRZevL3vfhPsEu4VUykT/33kbPJaU9HkG7ScsRiu45v4Rl0//O+Gix3ZqgrO/V1nKN5Mwj sezDIU2dTRnh5ebmevDbE3/wiz9ppJ84vvzJY7MdW0pYM95jyr+UA31wcZc8LxR476HGB2QhAfdLW QIk4t3iTJ9skfjRzdVP0PdtsR/X1LVAEXjcfD/9br4+5R2C1OJKzvjRKLEr7kpjp4jKOxv97QXdVo aLcc8Z9/fzG1Y41pBnvzJdA6tLcIDpNE97tkyUhrCovcSJ0hDAPhVubtzZkA9x32bLIQf7z89G9pa tx+omkaw==; Received: from [89.64.148.179] (port=37258 helo=localhost.localdomain) by es18.siteground.eu with esmtpsa tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.90devstart-1178-b07e68e5-XX) (envelope-from ) id 1kl8CN-0006FH-PS for users@dpdk.org; Fri, 04 Dec 2020 11:20:23 +0100 To: "users@dpdk.org" From: Filip Janiszewski Message-ID: <6ba0e4d5-675f-213a-751d-d9f010e04e9d@filipjaniszewski.com> Date: Fri, 4 Dec 2020 11:20:23 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.9.0 MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: 35.214.204.72 X-SpamExperts-Domain: es18.siteground.eu X-SpamExperts-Username: 35.214.204.72 Authentication-Results: mailspamprotection.com; auth=pass smtp.auth=35.214.204.72@es18.siteground.eu X-SpamExperts-Outgoing-Class: ham X-SpamExperts-Outgoing-Evidence: Combined (0.24) X-Recommended-Action: accept X-Filter-ID: Mvzo4OR0dZXEDF/gcnlw0ecN11dQIc3aKzz9DU5dqGmpSDasLI4SayDByyq9LIhVBhUQRG18eEoK pL5r3TAZd0TNWdUk1Ol2OGx3IfrIJKywOmJyM1qr8uRnWBrbSAGDD2INR93SD/E4J4SmlGqUQJj9 EvBvwu01uVCaGVBWGquWlmvEw4/qTzue+iPG+B/p2rBNMmEsKEibQwSU1xBeOJAOlFzwHtO3tdTI bTgMNQv76lrauuQC+i1JEwUYTHqC/KisXy3mzcJy0aWTpFFLNXH1Vkqfg/Bwz3JmU10ZbHbSu4V0 uFdos+XyMRrtb4AGSMvMdpIXZzuUtn5D8wUyziXAqEAQZXCFCwvZK9SRAKVBzalHVM1JpkHfzn92 fNdT/5EjVskN5+f0tv7Hu6cPCJ0JqmC43RBCDitrzLQ3DiL+rMKsIGECb4imOf5DWk2muT5KoqPl i/MiyR9weBu6pHB7LxY2nsmQSlY+LOS2RBvyvYF41YKwtUHAIHcwkMwU8oNztlS2lk2MAJxthbEB J810xzT60uub84zZk03vFUr5sGqoT7aL6zfnTlK0ipRl2eMaYoDpLQqel3M9drX4xT3dKxLhoxcm aInYbR5vlqF1h44QsltTBia8XHjaZSjOKdvTyBjtn1YZtaf24ZD2cb6KNuraKjP0e8EWfxt1Dw4k sVlXZWxasRfFjM8m8h7IISdVKyA8/8yCpIYzH3apf78hv/eAPXF2/g6Nh7EU3uLJIKHlAjOKHNYx AwBGWsbu+qB/KKOB3dPBXgel4Alp+RnEoNVItKpxQTRB4L6KqGZQwEgfLqIEIXVDc2FPtCThRpCG sDz6/VGqNK7iYjQXo4C+sWeyWjzErdamhuvmQyERFZ4oobg8BBg3Jq+ntzj0RjqJTqmP7qmkih2W Etl2+yZV6Mmzr63y5YBK2yRTwl9i4tCyDgzykDt8bmYH4T8IJUhJj7u6UTGo0/iVKu5Zc3J/0EZ3 t4B315HeG+Thnmchu1/rdU1t/SWu+yxj6TsAjct3ncL3kd+5uibOsA1mRZHzWMmvk0UHbhiG5Vg3 xxgzQuBfn58kEG80HSa5ea3iPJChQi88au4TLaCV6H19S4w9wpL5D/yF8BAAxodc2tT3K7c+w3qs 5s7L8fDiSW7Ie1Huf6ZU9LftxXX6dQt7i59wtAGMZ+Nn0VCKuV8S95daFBQqd4niPDvaBSB5Qmy0 cGrPtNGJYX3VT+yZ12sm8Q== X-Report-Abuse-To: spam@quarantine1.mailspamprotection.com Subject: [dpdk-users] rte_ring_dequeue returns 0 but pointer is null X-BeenThere: users@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK usage discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: users-bounces@dpdk.org Sender: "users" 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