From patchwork Tue Dec 2 06:58:30 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Qiu X-Patchwork-Id: 1722 Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id 4CDB57F50; Tue, 2 Dec 2014 08:04:35 +0100 (CET) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 3542D7EB0 for ; Tue, 2 Dec 2014 08:04:33 +0100 (CET) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga101.fm.intel.com with ESMTP; 01 Dec 2014 23:01:42 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.07,499,1413270000"; d="scan'208";a="631190892" Received: from pgsmsx102.gar.corp.intel.com ([10.221.44.80]) by fmsmga001.fm.intel.com with ESMTP; 01 Dec 2014 23:01:39 -0800 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by PGSMSX102.gar.corp.intel.com (10.221.44.80) with Microsoft SMTP Server (TLS) id 14.3.195.1; Tue, 2 Dec 2014 14:58:36 +0800 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.110]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.86]) with mapi id 14.03.0195.001; Tue, 2 Dec 2014 14:58:31 +0800 From: "Qiu, Michael" To: "Zhang, Helin" , Thomas Monjalon Thread-Topic: [dpdk-dev] [PATCH] i40e: bug fix of compile error Thread-Index: AQHQDTlYIrgbkTVoBky9G/lz1blIYw== Date: Tue, 2 Dec 2014 06:58:30 +0000 Message-ID: <533710CFB86FA344BFBF2D6802E60286C9BECF@SHSMSX101.ccr.corp.intel.com> References: <1417419227-21465-1-git-send-email-helin.zhang@intel.com> <2036571.ijmOSAQnXA@xps13> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: yes X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Cc: "dev@dpdk.org" Subject: Re: [dpdk-dev] [PATCH] i40e: bug fix of compile error 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 12/2/2014 8:36 AM, Zhang, Helin wrote: > >> -----Original Message----- >> From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com] >> Sent: Monday, December 1, 2014 7:13 PM >> To: Zhang, Helin >> Cc: dev@dpdk.org >> Subject: Re: [dpdk-dev] [PATCH] i40e: bug fix of compile error >> >> 2014-12-01 15:33, Helin Zhang: >>> The compile error will occur as below when set >> 'RTE_LIBRTE_I40E_16BYTE_RX_DESC=y'. >>> The changes is just to fix it. >>> >>> lib/librte_pmd_i40e/i40e_rxtx.c: In function i40e_rxd_build_fdir: >>> lib/librte_pmd_i40e/i40e_rxtx.c:431:28: error: volatile union >>> has no member named fd >>> lib/librte_pmd_i40e/i40e_rxtx.c:427:19: error: unused variable flexbl >>> [-Werror=unused-variable] >>> lib/librte_pmd_i40e/i40e_rxtx.c:427:11: error: unused variable flexbh >>> [-Werror=unused-variable] >> It would be nice to reference the commit which introduced the error and explain >> it a bit. >> >>> - rte_le_to_cpu_32(rxdp->wb.qword3.hi_dword.flex_bytes_hi); >>> + rte_le_to_cpu_32( >>> + rxdp->wb.qword3.hi_dword.flex_bytes_hi); >> [...] >>> - rte_le_to_cpu_32(rxdp->wb.qword3.lo_dword.flex_bytes_lo); >>> + rte_le_to_cpu_32( >>> + rxdp->wb.qword3.lo_dword.flex_bytes_lo); >> Why are you wrapping these lines (with wrong indentation)? >> It makes the fix confuse. > Sorry, it is a code style fix, as the length of the line should not be more than 80. > Do I need to split the patch or add more commit logs? I think this coding style fix is not good enough, mb->hash.fdir.hi = rte_le_to_cpu_32(rxdp->wb.qword3 .hi_dword.fd_id); This would be better :) See the attached diff file, so sorry I indeed do not know how to add diff file in the email(except git send-email), So I just attached it. > >> -- >> Thomas > Regards, > Helin > diff --git a/lib/librte_pmd_i40e/i40e_rxtx.c b/lib/librte_pmd_i40e/i40e_rxtx.c index 2d2ef04..e0264fc 100644 --- a/lib/librte_pmd_i40e/i40e_rxtx.c +++ b/lib/librte_pmd_i40e/i40e_rxtx.c @@ -427,8 +427,7 @@ i40e_rxd_build_fdir(volatile union i40e_rx_desc *rxdp, struct rte_mbuf *mb) uint16_t flexbh, flexbl; #ifdef RTE_LIBRTE_I40E_16BYTE_RX_DESC - mb->hash.fdir.hi = - rte_le_to_cpu_32(rxdp->wb.qword0.hi_dword.fd); + mb->hash.fdir.hi = rte_le_to_cpu_32(rxdp->wb.qword0.hi_dword.fd); flags |= PKT_RX_FDIR_ID; #else flexbh = (rte_le_to_cpu_32(rxdp->wb.qword2.ext_status) >> @@ -440,17 +439,17 @@ i40e_rxd_build_fdir(volatile union i40e_rx_desc *rxdp, struct rte_mbuf *mb) if (flexbh == I40E_RX_DESC_EXT_STATUS_FLEXBH_FD_ID) { - mb->hash.fdir.hi = - rte_le_to_cpu_32(rxdp->wb.qword3.hi_dword.fd_id); + mb->hash.fdir.hi = rte_le_to_cpu_32(rxdp->wb.qword3 + .hi_dword.fd_id); flags |= PKT_RX_FDIR_ID; } else if (flexbh == I40E_RX_DESC_EXT_STATUS_FLEXBH_FLEX) { - mb->hash.fdir.hi = - rte_le_to_cpu_32(rxdp->wb.qword3.hi_dword.flex_bytes_hi); + mb->hash.fdir.hi = rte_le_to_cpu_32(rxdp->wb.qword3 + .hi_dword.flex_bytes_hi); flags |= PKT_RX_FDIR_FLX; } if (flexbl == I40E_RX_DESC_EXT_STATUS_FLEXBL_FLEX) { - mb->hash.fdir.lo = - rte_le_to_cpu_32(rxdp->wb.qword3.lo_dword.flex_bytes_lo); + mb->hash.fdir.lo = rte_le_to_cpu_32(rxdp->wb.qword3 + .lo_dword.flex_bytes_lo); flags |= PKT_RX_FDIR_FLX; } #endif