From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf0-f181.google.com (mail-pf0-f181.google.com [209.85.192.181]) by dpdk.org (Postfix) with ESMTP id B406311C5 for ; Tue, 21 Mar 2017 23:15:59 +0100 (CET) Received: by mail-pf0-f181.google.com with SMTP id 20so37464780pfk.2 for ; Tue, 21 Mar 2017 15:15:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=kIaryl57cS4NyaQZMzqKFmcDQoXU/xE8yKIbphO3iFE=; b=WtsElBm39f1vhCilBfiihpP+aoqVX41MyHuGeLYLkJfCDg6VYoPEW25oiU/9HP1LDb Rtlp0muvgsogKo9wmEpSHaBsaftIA6mSiaMrijPAn3wDSHrNvt9SOjNxWQP/sRtKzu5n 8UTG85OkU4ZAYrMo1MrKTZmHfEILRo7XLuYfSBhOv5RxSVtPM6Q+8plepz+Y3915dp15 R1wnDGZSdOSY3UZN7kP49wOYdI26mAl7+hsZasbLI97tgBR/vyptge8C5redIH0GJ78k UW+gon8qbuYlDSWMukB0Z8WyC4lzfazG8nPF4JVJczG4SELwsaZYOXDSW38s3nNApLR7 m03Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=kIaryl57cS4NyaQZMzqKFmcDQoXU/xE8yKIbphO3iFE=; b=YRz8rH7hRMQoQ5PowrBIK8GL122QoSVP/JThzzqk9bhDKUit7mLRQBO1YfFjCr8kOM BE0zwkqBJOPG9R9neS0MiOdn1aAoUwrFPz2XZpGlqhrpoYr6XmYI2ZDcesr7PWINlUoq A948bCElZ+hGnA6nVcXB7zg9nKef6LjmegaMl9/KPFZzfCOplEg+p03Pwp3fudGIFQ6L VZg26TxVNKJlScIvKqOFQKqeCs3pOsduOJevUwPTLIl41Os+10PjNflehrJOrr3AIXrc XbmevpAdY612cVxispbzU2Jv3FTMIQxz7rcbKsP9xhuZo3t5gobyha6JitowK7iZN5Gh ZdLA== X-Gm-Message-State: AFeK/H2XjF8JP0aARa1p/PA9VzByJQXCyaJLdQh0L6KNAnVBmuWivYfcPf0xQDZmxTg0tw== X-Received: by 10.98.196.221 with SMTP id h90mr42034989pfk.149.1490134558867; Tue, 21 Mar 2017 15:15:58 -0700 (PDT) Received: from xeon-e3 (204-195-18-65.wavecable.com. [204.195.18.65]) by smtp.gmail.com with ESMTPSA id a78sm41433549pfc.25.2017.03.21.15.15.58 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 21 Mar 2017 15:15:58 -0700 (PDT) Date: Tue, 21 Mar 2017 15:15:52 -0700 From: Stephen Hemminger To: Ed Czeck Cc: dev@dpdk.org Message-ID: <20170321151552.2d172477@xeon-e3> In-Reply-To: <1490132621-7851-2-git-send-email-ed.czeck@atomicrules.com> References: <1490132621-7851-1-git-send-email-ed.czeck@atomicrules.com> <1490132621-7851-2-git-send-email-ed.czeck@atomicrules.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v3 2/7] net/ark: HW API part 1 of 3 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Mar 2017 22:16:00 -0000 On Tue, 21 Mar 2017 17:43:36 -0400 Ed Czeck 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.