[dpdk-test-report] |WARNING| pw70189 [PATCH] ring: empty and count optimizations

checkpatch at dpdk.org checkpatch at dpdk.org
Wed May 13 17:32:29 CEST 2020


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


More information about the test-report mailing list