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 0C4C6A034F for ; Wed, 13 May 2020 17:32:30 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 049F51D657; Wed, 13 May 2020 17:32:30 +0200 (CEST) Received: by dpdk.org (Postfix, from userid 1017) id 127FB1D658; Wed, 13 May 2020 17:32:29 +0200 (CEST) In-Reply-To: <20200513153111.37063-1-mb@smartsharesystems.com> References: <20200513153111.37063-1-mb@smartsharesystems.com> To: test-report@dpdk.org Cc: =?utf-8?q?Morten_Br=C3=B8rup?= Message-Id: <20200513153229.127FB1D658@dpdk.org> Date: Wed, 13 May 2020 17:32:29 +0200 (CEST) From: checkpatch@dpdk.org Subject: [dpdk-test-report] |WARNING| pw70189 [PATCH] ring: empty and count optimizations X-BeenThere: test-report@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: automatic DPDK test reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: test-report-bounces@dpdk.org Sender: "test-report" Test-Label: checkpatch Test-Status: WARNING http://dpdk.org/patch/70189 _coding style issues_ WARNING:COMMIT_LOG_LONG_LINE: Possible unwrapped commit description (prefer a maximum 75 chars per line) #49: Testing if the ring is empty is as simple as comparing the producer and consumer pointers. In theory, this optimization reduces the number of potential cache misses from 3 to 2 by not having to read r->mask in rte_ring_count(). It is not possible to enqueue more elements than the capacity of a ring, so the capacity comparison is a safeguard for observer threads only. Instead of completely removing the comparison, I have reorganized it to resemble the other trigrahps in the ring library and added a likely(). The modification of these two functions were discussed in the RFC here: https://mails.dpdk.org/archives/dev/2020-April/165752.html ERROR:SPACING: spaces required around that '+=' (ctx:VxV) #96: FILE: lib/librte_ring/rte_ring.h:202: + for (i = 0; i < (n & ((~(unsigned int)0x3))); i+=4, idx+=4) { \ ^ ERROR:SPACING: spaces required around that '+=' (ctx:VxV) #96: FILE: lib/librte_ring/rte_ring.h:202: + for (i = 0; i < (n & ((~(unsigned int)0x3))); i+=4, idx+=4) { \ ^ WARNING:TYPECAST_INT_CONSTANT: Unnecessary typecast of c90 int constant #96: FILE: lib/librte_ring/rte_ring.h:202: + for (i = 0; i < (n & ((~(unsigned int)0x3))); i+=4, idx+=4) { \ ERROR:SPACING: spaces required around that '+=' (ctx:VxV) #105: FILE: lib/librte_ring/rte_ring.h:233: + for (i = 0; i < (n & (~(unsigned int)0x3)); i+=4, idx+=4) {\ ^ ERROR:SPACING: spaces required around that '+=' (ctx:VxV) #105: FILE: lib/librte_ring/rte_ring.h:233: + for (i = 0; i < (n & (~(unsigned int)0x3)); i+=4, idx+=4) {\ ^ WARNING:TYPECAST_INT_CONSTANT: Unnecessary typecast of c90 int constant #105: FILE: lib/librte_ring/rte_ring.h:233: + for (i = 0; i < (n & (~(unsigned int)0x3)); i+=4, idx+=4) {\ total: 4 errors, 3 warnings, 125 lines checked