From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 1D5F2F947 for ; Fri, 13 Jan 2017 12:42:34 +0100 (CET) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga103.jf.intel.com with ESMTP; 13 Jan 2017 03:41:33 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,221,1477983600"; d="scan'208";a="808423824" Received: from fyigit-mobl1.ger.corp.intel.com (HELO [10.237.220.38]) ([10.237.220.38]) by FMSMGA003.fm.intel.com with ESMTP; 13 Jan 2017 03:41:31 -0800 To: Jerin Jacob 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> <20170113083715.GC19741@localhost.localdomain> Cc: dev@dpdk.org, 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: <407b69c0-5eab-a7bb-80b0-bd10f54439da@intel.com> Date: Fri, 13 Jan 2017 11:41:30 +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: <20170113083715.GC19741@localhost.localdomain> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit 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: Fri, 13 Jan 2017 11:42:35 -0000 On 1/13/2017 8:37 AM, Jerin Jacob wrote: > On Thu, Jan 12, 2017 at 07:12:33PM +0000, Ferruh Yigit wrote: >> 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? > > Arguments order has been taken from Linux kernel readl/writel syntax. > >> What do you think reverting argument order? > > OMG :-). If it worth it then we can consider. IMHO, let it be in kernel > syntax so that it will easy to port drivers from Linux kernel. Fair enough. > >> >> As a similar example, dpdk ether_addr_copy(src, dst) function argument >> order is revers according common usage, and keeps confusing people. >> >> <...> >>