[dpdk-dev] [PATCH] i40e: bug fix of compile error

Qiu, Michael michael.qiu at intel.com
Tue Dec 2 07:58:30 CET 2014


On 12/2/2014 8:36 AM, Zhang, Helin wrote:
>
>> -----Original Message-----
>> From: Thomas Monjalon [mailto:thomas.monjalon at 6wind.com]
>> Sent: Monday, December 1, 2014 7:13 PM
>> To: Zhang, Helin
>> Cc: dev at 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
>>> <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
>

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: diff_code_style_fix
URL: <http://dpdk.org/ml/archives/dev/attachments/20141202/4ef56489/attachment.ksh>


More information about the dev mailing list