From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 02C37F618 for ; Thu, 12 Jan 2017 20:13:13 +0100 (CET) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga103.fm.intel.com with ESMTP; 12 Jan 2017 11:12:35 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,219,1477983600"; d="scan'208";a="29644957" Received: from fyigit-mobl1.ger.corp.intel.com (HELO [10.237.220.38]) ([10.237.220.38]) by orsmga002.jf.intel.com with ESMTP; 12 Jan 2017 11:12:33 -0800 To: Jerin Jacob , dev@dpdk.org References: <1482832175-27199-1-git-send-email-jerin.jacob@caviumnetworks.com> <1484212646-10338-1-git-send-email-jerin.jacob@caviumnetworks.com> <1484212646-10338-19-git-send-email-jerin.jacob@caviumnetworks.com> Cc: konstantin.ananyev@intel.com, thomas.monjalon@6wind.com, bruce.richardson@intel.com, jianbo.liu@linaro.org, viktorin@rehivetech.com, santosh.shukla@caviumnetworks.com, Rahul Lakkireddy From: Ferruh Yigit Message-ID: Date: Thu, 12 Jan 2017 19:12:33 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 MIME-Version: 1.0 In-Reply-To: <1484212646-10338-19-git-send-email-jerin.jacob@caviumnetworks.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit Subject: Re: [dpdk-dev] [PATCH v3 18/29] net/cxgbe: use eal I/O device memory read/write API 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: Thu, 12 Jan 2017 19:13:14 -0000 On 1/12/2017 9:17 AM, Jerin Jacob wrote: <...> > > -#define CXGBE_PCI_REG_WRITE(reg, value) ({ \ > - CXGBE_PCI_REG((reg)) = (value); }) > +#define CXGBE_PCI_REG_WRITE(reg, value) rte_write32((value), (reg)) Almost all (if not all) PMD write macros' argument order is like write(address, value), but rte_writeX has rte_writex(value, address) What is the common usage for this kind of function? What do you think reverting argument order? As a similar example, dpdk ether_addr_copy(src, dst) function argument order is revers according common usage, and keeps confusing people. <...>