net/qede: fix build with gcc 11
PATCH 1/4 net/qede: fix build with gcc 11
Error observed with gcc 11 under development
gcc (GCC) 11.0.0 20200920 (experimental)
build error:../drivers/net/qede/qede_main.c: In function ‘qed_get_current_link’:../drivers/net/qede/qede_main.c:587:17:
warning: this ‘if’ clause does not guard...
[-Wmisleading-indentation]
587 | if (!ptt)
| ^~
../drivers/net/qede/qede_main.c:590:25:
note: ...this statement, but the latter is misleadingly indented
as if it were guarded by the ‘if’
590 | qed_fill_link(hwfn, ptt, if_link);
| ^~~~~~~~~~~~~---
I am not clear what the exact intention of the original code is, compiler warning is about wrong indentation of 'qed_fill_link(..)', I have updated the code to keep the behavior same but fix the indentation. Please send a proper fix if the existing behavior needs to be updated.
--- drivers/net/qede/qede_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/qede/qede_main.c +1 -1
@@ -587,7 +587,7 @@ qed_get_current_link(struct ecore_dev *edev, struct qed_link_output *if_link)if (!ptt)DP_NOTICE (hwfn, true,"Failed to fill link; No PTT\n" ); -qed_fill_link (hwfn, ptt, if_link); +qed_fill_link (hwfn, ptt, if_link);if (ptt)ecore_ptt_release (hwfn, ptt);
Signature · 1 line
2.26.2
PATCH 2/4 raw/dpaa2: fix build with gcc 11
Error observed with gcc 11 under development
gcc (GCC) 11.0.0 20200920 (experimental)
build error:../drivers/raw/dpaa2_qdma/dpaa2_qdma.c: In function ‘rte_qdma_reset’:../drivers/raw/dpaa2_qdma/dpaa2_qdma.c:454:17:
warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
454 | if (qdma_vqs[i].in_use && (qdma_vqs[i].num_enqueues !=
| ^~
../drivers/raw/dpaa2_qdma/dpaa2_qdma.c:457:25:
note: ...this statement, but the latter is misleadingly indented
as if it were guarded by the ‘if’
457 | return -EBUSY;
| ^~~~~~--- drivers/raw/dpaa2_qdma/dpaa2_qdma.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/raw/dpaa2_qdma/dpaa2_qdma.c +2 -1
@@ -452,9 +452,10 @@ rte_qdma_reset(void)/* In case there are pending jobs on any VQ, return -EBUSY */ for (i =0 ; i < qdma_dev.max_vqs; i++) {if (qdma_vqs[i].in_use && (qdma_vqs[i].num_enqueues != - qdma_vqs[i].num_dequeues)) + qdma_vqs[i].num_dequeues)) {DPAA2_QDMA_ERR ("Jobs are still pending on VQ: %d" , i);return -EBUSY ; + } }/* Reset HW queues */
Signature · 1 line
2.26.2
A message that is not in the archive (sent off-list or not yet received): CAJFAV8wAio=NF2eMMx9URkNinht2sPtBrE9k1c0uD+_GJcM4aw@mail.gmail.com
A message that is not in the archive (sent off-list or not yet received): CAJFAV8y9zFUAKoqhQxobdQDVPAOny4ie+Cm1fHneEX6g6zdtjw@mail.gmail.com
A message that is not in the archive (sent off-list or not yet received): AM5PR0401MB2593386BAB0C09ABE92F9D65E60B0@AM5PR0401MB2593.eurprd04.prod.outlook.com
Re: [dpdk-dev] [PATCH 2/4] raw/dpaa2: fix build with gcc 11
Quoted 5 lines · Nipun Gupta
Hi David,
https://patchwork.dpdk.org/patch/76983/ - this patch have same changes? Please check and let me know what shall be done.
Ok, I'll mark Ferruh patch as rejected.
Thank you.
Signature · 1 line
David Marchand
Re: [dpdk-dev] [PATCH 2/4] raw/dpaa2: fix build with gcc 11
Quoted 9 lines · David Marchand
Quoted 5 lines · Nipun Gupta
Hi David,
https://patchwork.dpdk.org/patch/76983/ - this patch have same changes? Please check and let me know what shall be done.
Ok, I'll mark Ferruh patch as rejected.
Yes looks like fixing same thing, good for me.
PATCH 3/4 app/testpmd: fix build with gcc 11
In reply to Ferruh YigitError observed with gcc 11 under development
gcc (GCC) 11.0.0 20200920 (experimental)
../app/test-pmd/config.c:1777:61:
warning: argument 3 of type ‘const uint32_t[n]’ {aka ‘const unsigned int[n]’} declared as a variable length array [-Wvla-parameter]
1777 | port_flow_list(portid_t port_id, uint32_t n,
const uint32_t group[n])
| ~~~~~~~~~~~~~~~^~~~~~~~
In file included from ../app/test-pmd/config.c:53:
../app/test-pmd/testpmd.h:764:67:
note: previously declared as a pointer ‘const uint32_t *’
{aka ‘const unsigned int *’}
764 | void port_flow_list(portid_t port_id, uint32_t n,
const uint32_t *group);
| ~~~~~~~~~~~~~~~~^~~~~--- app/test-pmd/config.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
app/test-pmd/config.c +1 -1
@@ -1774,7 +1774,7 @@ port_flow_aged(portid_t port_id, uint8_t destroy)/** List flow rules. */ void -port_flow_list (portid_t port_id,uint32_t n,const uint32_t group[n]) +port_flow_list (portid_t port_id,uint32_t n,const uint32_t *group) {struct rte_port *port;struct port_flow *pf;
Signature · 1 line
2.26.2
Re: [dpdk-dev] [PATCH 3/4] app/testpmd: fix build with gcc 11
Quoted 16 lines · Ferruh Yigit
Error observed with gcc 11 under development
gcc (GCC) 11.0.0 20200920 (experimental)
../app/test-pmd/config.c:1777:61:
warning: argument 3 of type ‘const uint32_t[n]’ {aka ‘const unsigned int[n]’} declared as a variable length array [-Wvla-parameter]
1777 | port_flow_list(portid_tport_id,uint32_tn,
constuint32_tgroup[n])
| ~~~~~~~~~~~~~~~^~~~~~~~
In file included from../app/test-pmd/config.c:53:../app/test-pmd/testpmd.h:764:67:
note: previously declared as a pointer ‘constuint32_t*’ {aka ‘const unsigned int *’}
764 | void port_flow_list(portid_tport_id,uint32_tn,
Quoted 3 lines
const uint32_t *group);
| ~~~~~~~~~~~~~~~~^~~~~It won't hurt to backport this.
Quoted 19 lines
Signed-off-by Ferruh Yigit <[email protected]>--- app/test-pmd/config.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)app/test-pmd/config.c +1
-2@@ -1774,7 +1774,7 @@ port_flow_aged(portid_t port_id, uint8_t destroy)/** List flow rules. */ void -port_flow_list (portid_t port_id,uint32_t n,const uint32_t group[n]) +port_flow_list (portid_t port_id,uint32_t n,const uint32_t *group) {struct rte_port *port;struct port_flow *pf; --
Quoted 2 lines
2.26.2
Signature · 1 line
David Marchand
Asaf Penso
Reviewed-byRe: [dpdk-dev] [PATCH 3/4] app/testpmd: fix build with gcc 11
Quoted 61 lines
-----Original Message-----
From: dev <[email protected]> On Behalf Of David Marchand
Sent: Thursday, September 24, 2020 12:31 PM
To: Ferruh Yigit <[email protected]>
Cc: Wenzhuo Lu <[email protected]>; Beilei Xing <[email protected]>; Bernard Iremonger <[email protected]>; dev <[email protected]>; NBU-Contact-Adrien Mazarguil <[email protected]>
Subject: Re: [dpdk-dev] [PATCH 3/4] app/testpmd: fix build with gcc 11Quoted 16 lines · Ferruh Yigit
Error observed with gcc 11 under development gcc (GCC) 11.0.0 20200920 (experimental)
../app/test-pmd/config.c:1777:61:
warning: argument 3 of type ‘const uint32_t[n]’ {aka ‘const unsigned int[n]’} declared as a variable length array [-Wvla-parameter]
1777 | port_flow_list(portid_tport_id,uint32_tn,
constuint32_tgroup[n])
| ~~~~~~~~~~~~~~~^~~~~~~~
In file included from../app/test-pmd/config.c:53:../app/test-pmd/testpmd.h:764:67:
note: previously declared as a pointer ‘constuint32_t*’ {aka ‘const unsigned int *’}
764 | void port_flow_list(portid_tport_id,uint32_tn,Quoted 3 lines
const uint32_t *group); | ~~~~~~~~~~~~~~~~^~~~~It won't hurt to backport this.
Fixes 938a184a1870 ("app/testpmd: implement basic support for flow API")Quoted 19 lines
Signed-off-by Ferruh Yigit <[email protected]>--- app/test-pmd/config.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)app/test-pmd/config.c index renamed from app/test-pmd/config.c +0
-0
b6eb2a57a..380f3b5f6100644app/test-pmd/config.c +1
-1@@ -1774,7 +1774,7 @@ port_flow_aged(portid_t port_id, uint8_t destroy)/** List flow rules. */ void -port_flow_list (portid_t port_id,uint32_t n,const uint32_t group[n]) +port_flow_list (portid_t port_id,uint32_t n,const uint32_t *group) {struct rte_port *port;struct port_flow *pf;Quoted 3 lines
--
2.26.2Reviewed-by David Marchand <[email protected]>
Quoted 2 lines
--
David Marchand
Re: [dpdk-dev] [PATCH 3/4] app/testpmd: fix build with gcc 11
In reply to Ferruh Yigit<snip>
Quoted 20 lines
Subject: [dpdk-dev] [PATCH 3/4] app/testpmd: fix build with gcc 11
Error observed with gcc 11 under development
gcc (GCC) 11.0.0 20200920 (experimental)
../app/test-pmd/config.c:1777:61:
warning: argument 3 of type ‘const uint32_t[n]’ {aka ‘const unsigned int[n]’} declared as a variable length array [-Wvla-parameter]
1777 | port_flow_list(portid_tport_id,uint32_tn,
constuint32_tgroup[n])| ~~~~~~~~~~~~~~~^~~~~~~~ In file included from ../app/test-pmd/config.c:53: ../app/test-pmd/testpmd.h:764:67: note: previously declared as a pointer ‘const uint32_t *’ {aka ‘const unsigned int *’} 764 | void port_flow_list(portid_t port_id, uint32_t n, const uint32_t *group); | ~~~~~~~~~~~~~~~~^~~~~
Quoted 1 line
Signed-off-by Ferruh Yigit <[email protected]>
Verified with gcc version 11.0.0 20200920 (experimental).
Quoted 19 lines
--- app/test-pmd/config.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)app/test-pmd/config.c +1
-2@@ -1774,7 +1774,7 @@ port_flow_aged(portid_t port_id, uint8_t destroy)/** List flow rules. */ void -port_flow_list (portid_t port_id,uint32_t n,const uint32_t group[n]) +port_flow_list (portid_t port_id,uint32_t n,const uint32_t *group) {struct rte_port *port;struct port_flow *pf; --2.26.2
Re: [dpdk-dev] [PATCH 3/4] app/testpmd: fix build with gcc 11
In reply to Ferruh YigitQuoted 16 lines · Ferruh Yigit
Error observed with gcc 11 under development
gcc (GCC) 11.0.0 20200920 (experimental)
../app/test-pmd/config.c:1777:61:
warning: argument 3 of type ‘const uint32_t[n]’ {aka ‘const unsigned int[n]’} declared as a variable length array [-Wvla-parameter]
1777 | port_flow_list(portid_tport_id,uint32_tn,
constuint32_tgroup[n])
| ~~~~~~~~~~~~~~~^~~~~~~~
In file included from../app/test-pmd/config.c:53:../app/test-pmd/testpmd.h:764:67:
note: previously declared as a pointer ‘constuint32_t*’ {aka ‘const unsigned int *’}
764 | void port_flow_list(portid_tport_id,uint32_tn,
Quoted 3 lines
const uint32_t *group);
| ~~~~~~~~~~~~~~~~^~~~~Quoted 1 line
Signed-off-by Ferruh Yigit <[email protected]>
Applied, thanks.
Signature · 1 line
David Marchand
PATCH 4/4 pmdinfogen: fix build with gcc 11
In reply to Ferruh YigitError observed with gcc 11 under development
gcc (GCC) 11.0.0 20200920 (experimental)
build error:
In file included from ../buildtools/pmdinfogen/pmdinfogen.c:17:../buildtools/pmdinfogen/pmdinfogen.c: In function ‘parse_elf’:../buildtools/pmdinfogen/pmdinfogen.h:78:1:
warning: this ‘else’ clause does not guard... [-Wmisleading-indentation]
78 | else \
| ^~~~
../buildtools/pmdinfogen/pmdinfogen.h:83:35:
note: in expansion of macro ‘CONVERT_NATIVE’
83 | #define TO_NATIVE(fend, width, x) CONVERT_NATIVE(fend, width, x)
| ^~~~~~~~~~~~~~
../buildtools/pmdinfogen/pmdinfogen.c:152:28:
note: in expansion of macro ‘TO_NATIVE’
152 | hdr->e_type = TO_NATIVE(endian, 16, hdr->e_type);
| ^~~~~~~~~
../buildtools/pmdinfogen/pmdinfogen.h:80:9:
note: ...this statement, but the latter is misleadingly indented
as if it were guarded by the ‘else’
80 | ___x; \
| ^~~~--- buildtools/pmdinfogen/pmdinfogen.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
buildtools/pmdinfogen/pmdinfogen.h +1 -1
@@ -77,7 +77,7 @@ if ((fend) == ELFDATA2LSB) \ ___x = le##width##toh(x); \ else \ ___x = be##width##toh(x); \ - ___x; \ +___x; \ })#define TO_NATIVE (fend, width, x) CONVERT_NATIVE(fend, width, x)
Signature · 1 line
2.26.2
Re: [dpdk-dev] [PATCH 4/4] pmdinfogen: fix build with gcc 11
Quoted 10 lines · Ferruh Yigit
Error observed with gcc 11 under development
gcc (GCC) 11.0.0 20200920 (experimental)build error:
In file included from../buildtools/pmdinfogen/pmdinfogen.c:17:../buildtools/pmdinfogen/pmdinfogen.c: In function ‘parse_elf’:../buildtools/pmdinfogen/pmdinfogen.h:78:1:
warning: this ‘else’ clause does not guard... [-Wmisleading-indentation]
Quoted 16 lines
78 | else \
| ^~~~
../buildtools/pmdinfogen/pmdinfogen.h:83:35:
note: in expansion of macro ‘CONVERT_NATIVE’
83 | #define TO_NATIVE(fend, width, x) CONVERT_NATIVE(fend, width, x)
| ^~~~~~~~~~~~~~
../buildtools/pmdinfogen/pmdinfogen.c:152:28:
note: in expansion of macro ‘TO_NATIVE’
152 | hdr->e_type = TO_NATIVE(endian, 16, hdr->e_type);
| ^~~~~~~~~
../buildtools/pmdinfogen/pmdinfogen.h:80:9:
note: ...this statement, but the latter is misleadingly indented
as if it were guarded by the ‘else’
80 | ___x; \
| ^~~~Quoted 19 lines
Signed-off-by Ferruh Yigit <[email protected]>--- buildtools/pmdinfogen/pmdinfogen.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)buildtools/pmdinfogen/pmdinfogen.h +1
-2@@ -77,7 +77,7 @@ if ((fend) == ELFDATA2LSB) \ ___x = le##width##toh(x); \ else \ ___x = be##width##toh(x); \ - ___x; \ +___x; \ })#define TO_NATIVE (fend, width, x) CONVERT_NATIVE(fend, width, x) --
Quoted 2 lines
2.26.2
Signature · 1 line
David Marchand
David Marchand
AppliedRe: [dpdk-dev] [PATCH 4/4] pmdinfogen: fix build with gcc 11
Quoted 29 lines · David Marchand
Quoted 10 lines · Ferruh Yigit
Error observed with gcc 11 under development
gcc (GCC) 11.0.0 20200920 (experimental)build error:
In file included from../buildtools/pmdinfogen/pmdinfogen.c:17:../buildtools/pmdinfogen/pmdinfogen.c: In function ‘parse_elf’:../buildtools/pmdinfogen/pmdinfogen.h:78:1:
warning: this ‘else’ clause does not guard... [-Wmisleading-indentation]Quoted 16 lines
78 | else \ | ^~~~ ../buildtools/pmdinfogen/pmdinfogen.h:83:35: note: in expansion of macro ‘CONVERT_NATIVE’ 83 | #define TO_NATIVE(fend, width, x) CONVERT_NATIVE(fend, width, x) | ^~~~~~~~~~~~~~ ../buildtools/pmdinfogen/pmdinfogen.c:152:28: note: in expansion of macro ‘TO_NATIVE’ 152 | hdr->e_type = TO_NATIVE(endian, 16, hdr->e_type); | ^~~~~~~~~ ../buildtools/pmdinfogen/pmdinfogen.h:80:9: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘else’ 80 | ___x; \ | ^~~~
Quoted 5 lines
Fixes 98b0fdb0ffc6 ("pmdinfogen: add buildtools and pmdinfogen utility")Quoted 1 line
Signed-off-by Ferruh Yigit <[email protected]>Reviewed-by David Marchand <[email protected]>
Applied, thanks.
Signature · 1 line
David Marchand
Hi Ferruh,
Quoted 19 lines
From: Ferruh Yigit <[email protected]>
Sent: Monday, September 21, 2020 6:38 AMError observed with gcc 11 under development gcc (GCC) 11.0.0 20200920 (experimental)
build error:
../drivers/net/qede/qede_main.c: In function ‘qed_get_current_link’:../drivers/net/qede/qede_main.c:587:17:
warning: this ‘if’ clause does not guard...
[-Wmisleading-indentation]587 | if (!ptt) | ^~ ../drivers/net/qede/qede_main.c:590:25: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’ 590 | qed_fill_link(hwfn, ptt, if_link); | ^~~~~~~~~~~~~
Quoted 6 lines
Signed-off-by Ferruh Yigit <[email protected]>---
I am not clear what the exact intention of the original code is, compiler warning is about wrong indentation of 'qed_fill_link(..)', I have updated the code to keep the behavior same but fix the indentation.
Please send a proper fix if the existing behavior needs to be updated.
The existing behavior needs to be fixed, I'll send a proper fix for 20.11.
Thanks!
-Rasesh
Quoted 19 lines · Rasesh Mody
Quoted 19 lines
From: Ferruh Yigit <[email protected]>
Sent: Monday, September 21, 2020 6:38 AMError observed with gcc 11 under development gcc (GCC) 11.0.0 20200920 (experimental)
build error:
../drivers/net/qede/qede_main.c: In function ‘qed_get_current_link’:../drivers/net/qede/qede_main.c:587:17:
warning: this ‘if’ clause does not guard...
[-Wmisleading-indentation]587 | if (!ptt) | ^~ ../drivers/net/qede/qede_main.c:590:25: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’ 590 | qed_fill_link(hwfn, ptt, if_link); | ^~~~~~~~~~~~~
Quoted 8 lines
Quoted 6 lines
Signed-off-by Ferruh Yigit <[email protected]>---
I am not clear what the exact intention of the original code is, compiler warning is about wrong indentation of 'qed_fill_link(..)', I have updated the code to keep the behavior same but fix the indentation.
Please send a proper fix if the existing behavior needs to be updated.The existing behavior needs to be fixed, I'll send a proper fix for 20.11.
I suppose this is fixed with:
https://patchwork.dpdk.org/patch/79562/
I'll mark Ferruh patch as rejected.
Signature · 1 line
David Marchand