patches for DPDK stable branches
 help / color / mirror / Atom feed
* [PATCH] net/qede: fix build with GCC 13
@ 2022-06-16 17:02 Ferruh Yigit
  2022-06-17 12:03 ` Jerin Jacob
  2022-06-20  9:33 ` [EXT] " Devendra Singh Rawat
  0 siblings, 2 replies; 4+ messages in thread
From: Ferruh Yigit @ 2022-06-16 17:02 UTC (permalink / raw)
  To: Rasesh Mody, Devendra Singh Rawat, Igor Russkikh
  Cc: dev, Jerin Jacob Kollanukkaran, stable

Reproduced with "gcc (GCC) 13.0.0 20220616 (experimental)"

Build error:
In file included from ../drivers/net/qede/qede_debug.c:9:
../drivers/net/qede/qede_debug.c: In function ‘qed_grc_dump_addr_range’:
../drivers/net/qede/base/ecore.h:95:17:
	warning: overflow in conversion from ‘int’ to ‘u8’
	{aka ‘unsigned char’} changes value from ‘(int)vf_id << 8 | 128’
	to ‘128’ [-Woverflow]
   95 |                 ((_value & _name##_MASK) << _name##_SHIFT)
      |                 ^
../drivers/net/qede/qede_debug.c:1907:31:
	note: in expansion of macro ‘FIELD_VALUE’
 1907 |         fid = FIELD_VALUE(PXP_PRETEND_CONCRETE_FID_VFVALID, 1)
      |               ^~~~~~~~~~~

To prevent overflow converting 'fib' to uint16_t,
while updating it also updated 'vf_id' to 16 bit too.

Fixes: ec55c118792b ("net/qede: add infrastructure for debug data collection")
Cc: stable@dpdk.org

Signed-off-by: Ferruh Yigit <ferruh.yigit@xilinx.com>
---
Cc: rmody@marvell.com
---
 drivers/net/qede/qede_debug.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/qede/qede_debug.c b/drivers/net/qede/qede_debug.c
index 9383a6d67714..18f2d988fb88 100644
--- a/drivers/net/qede/qede_debug.c
+++ b/drivers/net/qede/qede_debug.c
@@ -1809,7 +1809,8 @@ static u32 qed_grc_dump_addr_range(struct ecore_hwfn *p_hwfn,
 				   u8 split_id)
 {
 	struct dbg_tools_data *dev_data = &p_hwfn->dbg_info;
-	u8 port_id = 0, pf_id = 0, vf_id = 0, fid = 0;
+	u8 port_id = 0, pf_id = 0;
+	u16 vf_id = 0, fid = 0;
 	bool read_using_dmae = false;
 	u32 thresh;
 
-- 
2.27.0


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] net/qede: fix build with GCC 13
  2022-06-16 17:02 [PATCH] net/qede: fix build with GCC 13 Ferruh Yigit
@ 2022-06-17 12:03 ` Jerin Jacob
  2022-06-20  9:33 ` [EXT] " Devendra Singh Rawat
  1 sibling, 0 replies; 4+ messages in thread
From: Jerin Jacob @ 2022-06-17 12:03 UTC (permalink / raw)
  To: Ferruh Yigit
  Cc: Rasesh Mody, Devendra Singh Rawat, Igor Russkikh, dpdk-dev,
	Jerin Jacob Kollanukkaran, dpdk stable

On Thu, Jun 16, 2022 at 10:32 PM Ferruh Yigit <ferruh.yigit@xilinx.com> wrote:
>
> Reproduced with "gcc (GCC) 13.0.0 20220616 (experimental)"
>
> Build error:
> In file included from ../drivers/net/qede/qede_debug.c:9:
> ../drivers/net/qede/qede_debug.c: In function ‘qed_grc_dump_addr_range’:
> ../drivers/net/qede/base/ecore.h:95:17:
>         warning: overflow in conversion from ‘int’ to ‘u8’
>         {aka ‘unsigned char’} changes value from ‘(int)vf_id << 8 | 128’
>         to ‘128’ [-Woverflow]
>    95 |                 ((_value & _name##_MASK) << _name##_SHIFT)
>       |                 ^
> ../drivers/net/qede/qede_debug.c:1907:31:
>         note: in expansion of macro ‘FIELD_VALUE’
>  1907 |         fid = FIELD_VALUE(PXP_PRETEND_CONCRETE_FID_VFVALID, 1)
>       |               ^~~~~~~~~~~
>
> To prevent overflow converting 'fib' to uint16_t,
> while updating it also updated 'vf_id' to 16 bit too.
>
> Fixes: ec55c118792b ("net/qede: add infrastructure for debug data collection")
> Cc: stable@dpdk.org
>
> Signed-off-by: Ferruh Yigit <ferruh.yigit@xilinx.com>
> ---
> Cc: rmody@marvell.com

Please Ack this patch.

> ---
>  drivers/net/qede/qede_debug.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/qede/qede_debug.c b/drivers/net/qede/qede_debug.c
> index 9383a6d67714..18f2d988fb88 100644
> --- a/drivers/net/qede/qede_debug.c
> +++ b/drivers/net/qede/qede_debug.c
> @@ -1809,7 +1809,8 @@ static u32 qed_grc_dump_addr_range(struct ecore_hwfn *p_hwfn,
>                                    u8 split_id)
>  {
>         struct dbg_tools_data *dev_data = &p_hwfn->dbg_info;
> -       u8 port_id = 0, pf_id = 0, vf_id = 0, fid = 0;
> +       u8 port_id = 0, pf_id = 0;
> +       u16 vf_id = 0, fid = 0;
>         bool read_using_dmae = false;
>         u32 thresh;
>
> --
> 2.27.0
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: [EXT] [PATCH] net/qede: fix build with GCC 13
  2022-06-16 17:02 [PATCH] net/qede: fix build with GCC 13 Ferruh Yigit
  2022-06-17 12:03 ` Jerin Jacob
@ 2022-06-20  9:33 ` Devendra Singh Rawat
  2022-06-20 17:46   ` Jerin Jacob
  1 sibling, 1 reply; 4+ messages in thread
From: Devendra Singh Rawat @ 2022-06-20  9:33 UTC (permalink / raw)
  To: Ferruh Yigit, Rasesh Mody, Igor Russkikh
  Cc: dev, Jerin Jacob Kollanukkaran, stable



> -----Original Message-----
> From: Ferruh Yigit <ferruh.yigit@xilinx.com>
> Sent: Thursday, June 16, 2022 10:32 PM
> To: Rasesh Mody <rmody@marvell.com>; Devendra Singh Rawat
> <dsinghrawat@marvell.com>; Igor Russkikh <irusskikh@marvell.com>
> Cc: dev@dpdk.org; Jerin Jacob Kollanukkaran <jerinj@marvell.com>;
> stable@dpdk.org
> Subject: [EXT] [PATCH] net/qede: fix build with GCC 13
> 
> External Email
> 
> ----------------------------------------------------------------------
> Reproduced with "gcc (GCC) 13.0.0 20220616 (experimental)"
> 
> Build error:
> In file included from ../drivers/net/qede/qede_debug.c:9:
> ../drivers/net/qede/qede_debug.c: In function ‘qed_grc_dump_addr_range’:
> ../drivers/net/qede/base/ecore.h:95:17:
> 	warning: overflow in conversion from ‘int’ to ‘u8’
> 	{aka ‘unsigned char’} changes value from ‘(int)vf_id << 8 | 128’
> 	to ‘128’ [-Woverflow]
>    95 |                 ((_value & _name##_MASK) << _name##_SHIFT)
>       |                 ^
> ../drivers/net/qede/qede_debug.c:1907:31:
> 	note: in expansion of macro ‘FIELD_VALUE’
>  1907 |         fid = FIELD_VALUE(PXP_PRETEND_CONCRETE_FID_VFVALID, 1)
>       |               ^~~~~~~~~~~
> 
> To prevent overflow converting 'fib' to uint16_t, while updating it also
> updated 'vf_id' to 16 bit too.
> 
> Fixes: ec55c118792b ("net/qede: add infrastructure for debug data collection")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Ferruh Yigit <ferruh.yigit@xilinx.com>
> ---
> Cc: rmody@marvell.com
> ---
>  drivers/net/qede/qede_debug.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/qede/qede_debug.c b/drivers/net/qede/qede_debug.c
> index 9383a6d67714..18f2d988fb88 100644
> --- a/drivers/net/qede/qede_debug.c
> +++ b/drivers/net/qede/qede_debug.c
> @@ -1809,7 +1809,8 @@ static u32 qed_grc_dump_addr_range(struct
> ecore_hwfn *p_hwfn,
>  				   u8 split_id)
>  {
>  	struct dbg_tools_data *dev_data = &p_hwfn->dbg_info;
> -	u8 port_id = 0, pf_id = 0, vf_id = 0, fid = 0;
> +	u8 port_id = 0, pf_id = 0;
> +	u16 vf_id = 0, fid = 0;
>  	bool read_using_dmae = false;
>  	u32 thresh;
> 
> --
> 2.27.0

Acked.
Acked-by: Devendra Singh Rawat <dsinghrawat@marvell.com>

Thanks.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [EXT] [PATCH] net/qede: fix build with GCC 13
  2022-06-20  9:33 ` [EXT] " Devendra Singh Rawat
@ 2022-06-20 17:46   ` Jerin Jacob
  0 siblings, 0 replies; 4+ messages in thread
From: Jerin Jacob @ 2022-06-20 17:46 UTC (permalink / raw)
  To: Devendra Singh Rawat
  Cc: Ferruh Yigit, Rasesh Mody, Igor Russkikh, dev,
	Jerin Jacob Kollanukkaran, stable

On Mon, Jun 20, 2022 at 3:03 PM Devendra Singh Rawat
<dsinghrawat@marvell.com> wrote:
>
>
>
> > -----Original Message-----
> > From: Ferruh Yigit <ferruh.yigit@xilinx.com>
> > Sent: Thursday, June 16, 2022 10:32 PM
> > To: Rasesh Mody <rmody@marvell.com>; Devendra Singh Rawat
> > <dsinghrawat@marvell.com>; Igor Russkikh <irusskikh@marvell.com>
> > Cc: dev@dpdk.org; Jerin Jacob Kollanukkaran <jerinj@marvell.com>;
> > stable@dpdk.org
> > Subject: [EXT] [PATCH] net/qede: fix build with GCC 13
> >
> > External Email
> >
> > ----------------------------------------------------------------------
> > Reproduced with "gcc (GCC) 13.0.0 20220616 (experimental)"
> >
> > Build error:
> > In file included from ../drivers/net/qede/qede_debug.c:9:
> > ../drivers/net/qede/qede_debug.c: In function ‘qed_grc_dump_addr_range’:
> > ../drivers/net/qede/base/ecore.h:95:17:
> >       warning: overflow in conversion from ‘int’ to ‘u8’
> >       {aka ‘unsigned char’} changes value from ‘(int)vf_id << 8 | 128’
> >       to ‘128’ [-Woverflow]
> >    95 |                 ((_value & _name##_MASK) << _name##_SHIFT)
> >       |                 ^
> > ../drivers/net/qede/qede_debug.c:1907:31:
> >       note: in expansion of macro ‘FIELD_VALUE’
> >  1907 |         fid = FIELD_VALUE(PXP_PRETEND_CONCRETE_FID_VFVALID, 1)
> >       |               ^~~~~~~~~~~
> >
> > To prevent overflow converting 'fib' to uint16_t, while updating it also
> > updated 'vf_id' to 16 bit too.
> >
> > Fixes: ec55c118792b ("net/qede: add infrastructure for debug data collection")
> > Cc: stable@dpdk.org
> >
> > Signed-off-by: Ferruh Yigit <ferruh.yigit@xilinx.com>
> > ---

> > 2.27.0
>
> Acked.
> Acked-by: Devendra Singh Rawat <dsinghrawat@marvell.com>


Applied to dpdk-next-net-mrvl/for-next-net. Thanks


>
> Thanks.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-06-20 17:47 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-16 17:02 [PATCH] net/qede: fix build with GCC 13 Ferruh Yigit
2022-06-17 12:03 ` Jerin Jacob
2022-06-20  9:33 ` [EXT] " Devendra Singh Rawat
2022-06-20 17:46   ` Jerin Jacob

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).