[PATCH v9 3/5] net/enetfec: support queue configuration
Ferruh Yigit
ferruh.yigit at intel.com
Mon Nov 15 11:23:43 CET 2021
On 11/15/2021 10:06 AM, Ferruh Yigit wrote:
> On 11/10/2021 1:54 PM, Ferruh Yigit wrote:
>> On 11/10/2021 7:48 AM, Apeksha Gupta wrote:
>>> This patch adds Rx/Tx queue configuration setup operations.
>>> On packet reception the respective BD Ring status bit is set
>>> which is then used for packet processing.
>>>
>>> Signed-off-by: Sachin Saxena <sachin.saxena at nxp.com>
>>> Signed-off-by: Apeksha Gupta <apeksha.gupta at nxp.com>
>>
>> <...>
>>
>>> +
>>> + rte_write32(rte_cpu_to_le_32(fep->bd_addr_p_t[queue_idx]),
>>
>> Isn't 'fep->bd_addr_p_t[]' a 64-bit value?
>>
>> <...>
>>
>>> +
>>> + rte_write32(rte_cpu_to_le_32(fep->bd_addr_p_r[queue_idx]),
>>
>> Isn't 'fep->bd_addr_p_r[]' a 64-bit address, why doing endianness operation
>> only on 32-bit and writing only 32-bit of it to register?
>
> Hi Apeksha,
>
> Above comments seems not addressed in v10 & v11, unfortunately this keep happening
> in this set.
>
My bad, sorry. The variables seems updated as 'uint32_t' in the v10 & v11.
So I am not sure about the reason of the below build error, can you help to understand it.
> Above lines are causing a build error for gcc12, can you please check:
> ../drivers/net/enetfec/enet_ethdev.c:482:9: error: array subscript 1 is above array bounds of ‘uint32_t[1]’ {aka ‘unsigned int[1]’} [-Werror=array-bounds]
> 482 | rte_write32(rte_cpu_to_le_32(fep->bd_addr_p_r[queue_idx]),
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 483 | (uint8_t *)fep->hw_baseaddr_v + ENETFEC_RD_START(queue_idx));
> | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> In file included from ../drivers/net/enetfec/enet_ethdev.c:18:
> ../drivers/net/enetfec/enet_ethdev.h:114:33: note: while referencing ‘bd_addr_p_r’
> 114 | uint32_t bd_addr_p_r[ENETFEC_MAX_Q];
> | ^~~~~~~~~~~
> ../drivers/net/enetfec/enet_ethdev.c:482:9: error: array subscript 2 is above array bounds of ‘uint32_t[1]’ {aka ‘unsigned int[1]’} [-Werror=array-bounds]
> 482 | rte_write32(rte_cpu_to_le_32(fep->bd_addr_p_r[queue_idx]),
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 483 | (uint8_t *)fep->hw_baseaddr_v + ENETFEC_RD_START(queue_idx));
> | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> In file included from ../drivers/net/enetfec/enet_ethdev.c:18:
> ../drivers/net/enetfec/enet_ethdev.h:114:33: note: while referencing ‘bd_addr_p_r’
> 114 | uint32_t bd_addr_p_r[ENETFEC_MAX_Q];
> | ^~~~~~~~~~~
>
>
More information about the dev
mailing list