automatic DPDK test reports
 help / color / mirror / Atom feed
From: checkpatch@dpdk.org
To: test-report@dpdk.org
Cc: "Morten Brørup" <mb@smartsharesystems.com>
Subject: [dpdk-test-report] |WARNING| pw70189 [PATCH] ring: empty and count optimizations
Date: Wed, 13 May 2020 17:32:29 +0200 (CEST)	[thread overview]
Message-ID: <20200513153229.127FB1D658@dpdk.org> (raw)
In-Reply-To: <20200513153111.37063-1-mb@smartsharesystems.com>

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

       reply	other threads:[~2020-05-13 15:32 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20200513153111.37063-1-mb@smartsharesystems.com>
2020-05-13 15:32 ` checkpatch [this message]
2020-05-14  0:16 ` [dpdk-test-report] |WARNING| pw70189 " 0-day Robot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200513153229.127FB1D658@dpdk.org \
    --to=checkpatch@dpdk.org \
    --cc=mb@smartsharesystems.com \
    --cc=test-report@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).