All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Qiu, Michael" <michael.qiu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
To: "Zhang,
	Helin" <helin.zhang-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
	Thomas Monjalon
	<thomas.monjalon-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
Cc: "dev-VfR2kkLFssw@public.gmane.org" <dev-VfR2kkLFssw@public.gmane.org>
Subject: Re: [PATCH] i40e: bug fix of compile error
Date: Tue, 2 Dec 2014 06:58:30 +0000	[thread overview]
Message-ID: <533710CFB86FA344BFBF2D6802E60286C9BECF@SHSMSX101.ccr.corp.intel.com> (raw)
In-Reply-To: F35DEAC7BCE34641BA9FAC6BCA4A12E70A7CD380@SHSMSX104.ccr.corp.intel.com

[-- Attachment #1: Type: text/plain, Size: 1898 bytes --]

On 12/2/2014 8:36 AM, Zhang, Helin wrote:
>
>> -----Original Message-----
>> From: Thomas Monjalon [mailto:thomas.monjalon-pdR9zngts4EAvxtiuMwx3w@public.gmane.org]
>> Sent: Monday, December 1, 2014 7:13 PM
>> To: Zhang, Helin
>> Cc: dev-VfR2kkLFssw@public.gmane.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
>>> <anonymous> 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
>


[-- Attachment #2: diff_code_style_fix --]
[-- Type: text/plain, Size: 1471 bytes --]

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

  reply	other threads:[~2014-12-02  6:58 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-01  7:33 [PATCH] i40e: bug fix of compile error Helin Zhang
     [not found] ` <1417419227-21465-1-git-send-email-helin.zhang-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2014-12-01 11:12   ` Thomas Monjalon
2014-12-02  0:35     ` Zhang, Helin
2014-12-02  6:58       ` Qiu, Michael [this message]
2014-12-03  1:13   ` [PATCH v2] i40e: " Helin Zhang
     [not found]     ` <1417569207-30139-1-git-send-email-helin.zhang-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2014-12-03  7:47       ` Wu, Jingjing
     [not found]         ` <9BB6961774997848B5B42BEC655768F8B5A5AE-0J0gbvR4kTg/UvCtAeCM4rfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2014-12-03 10:03           ` Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=533710CFB86FA344BFBF2D6802E60286C9BECF@SHSMSX101.ccr.corp.intel.com \
    --to=michael.qiu-ral2jqcrhueavxtiumwx3w@public.gmane.org \
    --cc=dev-VfR2kkLFssw@public.gmane.org \
    --cc=helin.zhang-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=thomas.monjalon-pdR9zngts4EAvxtiuMwx3w@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.