From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from e23smtp07.au.ibm.com (e23smtp07.au.ibm.com [202.81.31.140]) by dpdk.org (Postfix) with ESMTP id 322F4BDC2 for ; Fri, 17 Jul 2015 10:20:52 +0200 (CEST) Received: from /spool/local by e23smtp07.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 17 Jul 2015 18:10:39 +1000 Received: from d23dlp03.au.ibm.com (202.81.31.214) by e23smtp07.au.ibm.com (202.81.31.204) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Fri, 17 Jul 2015 18:10:38 +1000 X-Helo: d23dlp03.au.ibm.com X-MailFrom: chaozhu@linux.vnet.ibm.com X-RcptTo: dev@dpdk.org Received: from d23relay10.au.ibm.com (d23relay10.au.ibm.com [9.190.26.77]) by d23dlp03.au.ibm.com (Postfix) with ESMTP id D9B493578052 for ; Fri, 17 Jul 2015 18:10:37 +1000 (EST) Received: from d23av01.au.ibm.com (d23av01.au.ibm.com [9.190.234.96]) by d23relay10.au.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id t6H8ASDr41681028 for ; Fri, 17 Jul 2015 18:10:37 +1000 Received: from d23av01.au.ibm.com (localhost [127.0.0.1]) by d23av01.au.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id t6H8A4aG022023 for ; Fri, 17 Jul 2015 18:10:04 +1000 Received: from [9.186.50.243] ([9.186.50.243]) by d23av01.au.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id t6H8A2Sq021580; Fri, 17 Jul 2015 18:10:03 +1000 Message-ID: <55A8B84B.8070004@linux.vnet.ibm.com> Date: Fri, 17 Jul 2015 16:09:47 +0800 From: Chao Zhu User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Zhe Tao , dev@dpdk.org References: <1437104817-13578-1-git-send-email-zhe.tao@intel.com> <1437117940-7849-1-git-send-email-zhe.tao@intel.com> In-Reply-To: <1437117940-7849-1-git-send-email-zhe.tao@intel.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 15071708-0025-0000-0000-000001D147E6 Subject: Re: [dpdk-dev] [PATCH v3] i40e: Fix the endian issue for the i40e read&write registers functions X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Jul 2015 08:20:54 -0000 Acked-by: Chao Zhu On 2015/7/17 15:25, Zhe Tao wrote: > Signed-off-by: Zhe Tao > --- > PATCH v3: Edit the subject make it more clear > > PATCH v2: Edit the comments make it more clear > > PATCH v1: Add the endian conversion for registers operations. > > drivers/net/i40e/base/i40e_osdep.h | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/net/i40e/base/i40e_osdep.h b/drivers/net/i40e/base/i40e_osdep.h > index 3ce8057..70d2721 100644 > --- a/drivers/net/i40e/base/i40e_osdep.h > +++ b/drivers/net/i40e/base/i40e_osdep.h > @@ -122,10 +122,10 @@ do { \ > ((volatile uint32_t *)((char *)(a)->hw_addr + (reg))) > static inline uint32_t i40e_read_addr(volatile void *addr) > { > - return I40E_PCI_REG(addr); > + return rte_le_to_cpu_32(I40E_PCI_REG(addr)); > } > #define I40E_PCI_REG_WRITE(reg, value) \ > - do {I40E_PCI_REG((reg)) = (value);} while(0) > + do { I40E_PCI_REG((reg)) = rte_cpu_to_le_32(value); } while (0) > > #define I40E_WRITE_FLUSH(a) I40E_READ_REG(a, I40E_GLGEN_STAT) > #define I40EVF_WRITE_FLUSH(a) I40E_READ_REG(a, I40E_VFGEN_RSTAT)