DPDK patches and discussions
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Ed Czeck <ed.czeck@atomicrules.com>
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH v3 2/7] net/ark: HW API part 1 of 3
Date: Tue, 21 Mar 2017 15:15:52 -0700	[thread overview]
Message-ID: <20170321151552.2d172477@xeon-e3> (raw)
In-Reply-To: <1490132621-7851-2-git-send-email-ed.czeck@atomicrules.com>

On Tue, 21 Mar 2017 17:43:36 -0400
Ed Czeck <ed.czeck@atomicrules.com> wrote:

> +	volatile uint32_t ctrl;
> +	volatile uint32_t stats_clear;
> +	volatile uint32_t cplh_max;

You are using a lot of 'volatile' in this driver.
In general volatile should be reserved for known software shared data structures
rather than every device register and statistics. I.e volatile is an inefficient
replacement for proper use of barriers. The DPDK is not as stringent as Linux
kernel (the kernel community considers almost all use of volatile a bug).
See kernel document. process/volatile-considered-harmful.rst

Do you understand that volatile requires compiler to generate the most paranoid code possible.
Basically every reference turns into a barrier.

  reply	other threads:[~2017-03-21 22:15 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-21 21:43 [dpdk-dev] [PATCH v3 1/7] net/ark: PMD for Atomic Rules Arkville driver stub Ed Czeck
2017-03-21 21:43 ` [dpdk-dev] [PATCH v3 2/7] net/ark: HW API part 1 of 3 Ed Czeck
2017-03-21 22:15   ` Stephen Hemminger [this message]
2017-03-22  0:13     ` Ed Czeck
2017-03-22  0:30       ` Stephen Hemminger
2017-03-22 14:36         ` Ed Czeck
2017-03-21 21:43 ` [dpdk-dev] [PATCH v3 3/7] net/ark: HW API part 2 " Ed Czeck
2017-03-21 21:43 ` [dpdk-dev] [PATCH v3 4/7] net/ark: HW API part 3 " Ed Czeck
2017-03-21 21:43 ` [dpdk-dev] [PATCH v3 5/7] net/ark: Packet TX support initial version Ed Czeck
2017-03-21 21:43 ` [dpdk-dev] [PATCH v3 6/7] net/ark: Packet RX " Ed Czeck
2017-03-21 21:43 ` [dpdk-dev] [PATCH v3 7/7] net/ark: Arkville PMD component integration Ed Czeck
2017-03-22 18:16 ` [dpdk-dev] [PATCH v3 1/7] net/ark: PMD for Atomic Rules Arkville driver stub Ferruh Yigit
2017-03-23  1:09   ` Ed Czeck

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=20170321151552.2d172477@xeon-e3 \
    --to=stephen@networkplumber.org \
    --cc=dev@dpdk.org \
    --cc=ed.czeck@atomicrules.com \
    /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).