DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] net/cnxk: fix error when compiled for x86
@ 2022-03-04 14:23 Rakesh Kudurumalla
  2022-03-07  6:51 ` Gao, DaxueX
  2022-03-10  1:35 ` Jiang, YuX
  0 siblings, 2 replies; 7+ messages in thread
From: Rakesh Kudurumalla @ 2022-03-04 14:23 UTC (permalink / raw)
  To: Nithin Dabilpuram, Kiran Kumar K, Sunil Kumar Kori, Satha Rao
  Cc: dev, jerinj, Rakesh Kudurumalla, stable, Ferruh Yigit

fix error when compiled for x86 platform when compiled
with optimization flag enabled
error: ‘str’ may be used uninitialized in this function
error: ‘frag_ptr’ may be used uninitialized in this function

Bugzilla ID: 939
Fixes: b526599020ef ("net/cnxk: fix build with GCC 12")
Cc: stable@dpdk.org

Reported-by: Ferruh Yigit <ferruh.yigit@intel.com>
Signed-off-by: Rakesh Kudurumalla <rkudurumalla@marvell.com>
---
 drivers/net/cnxk/cn10k_rx.h        | 5 +++--
 drivers/net/cnxk/cnxk_ethdev_mtr.c | 2 +-
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/net/cnxk/cn10k_rx.h b/drivers/net/cnxk/cn10k_rx.h
index 7f219e5ddd..e4f5a553a6 100644
--- a/drivers/net/cnxk/cn10k_rx.h
+++ b/drivers/net/cnxk/cn10k_rx.h
@@ -146,7 +146,8 @@ nix_sec_attach_frags(const struct cpt_parse_hdr_s *hdr,
 	uint32_t offset = hdr->w2.fi_offset;
 	union nix_rx_parse_u *frag_rx;
 	struct cpt_frag_info_s *finfo;
-	uint64_t *frag_ptr, ol_flags;
+	uint64_t *frag_ptr = NULL;
+	uint64_t ol_flags;
 	uint16_t frag_size;
 	uint16_t rlen;
 	uint64_t *wqe;
@@ -276,8 +277,8 @@ nix_sec_reassemble_frags(const struct cpt_parse_hdr_s *hdr, uint64_t cq_w1,
 	union nix_rx_parse_u *frag_rx;
 	struct cpt_frag_info_s *finfo;
 	struct rte_mbuf *head, *mbuf;
+	uint64_t *frag_ptr = NULL;
 	rte_iova_t *inner_iova;
-	uint64_t *frag_ptr;
 	uint16_t frag_size;
 	uint64_t *wqe;
 
diff --git a/drivers/net/cnxk/cnxk_ethdev_mtr.c b/drivers/net/cnxk/cnxk_ethdev_mtr.c
index c8183aa12d..02803bdf75 100644
--- a/drivers/net/cnxk/cnxk_ethdev_mtr.c
+++ b/drivers/net/cnxk/cnxk_ethdev_mtr.c
@@ -288,7 +288,7 @@ cnxk_nix_mtr_profile_delete(struct rte_eth_dev *eth_dev, uint32_t profile_id,
 static int
 update_mtr_err(uint32_t act_color, struct rte_mtr_error *error, bool action)
 {
-	const char *str;
+	const char *str = NULL;
 	switch (act_color) {
 	case RTE_COLOR_GREEN:
 		if (action) {
-- 
2.25.1


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

* RE: [PATCH] net/cnxk: fix error when compiled for x86
  2022-03-04 14:23 [PATCH] net/cnxk: fix error when compiled for x86 Rakesh Kudurumalla
@ 2022-03-07  6:51 ` Gao, DaxueX
  2022-03-10  1:35 ` Jiang, YuX
  1 sibling, 0 replies; 7+ messages in thread
From: Gao, DaxueX @ 2022-03-07  6:51 UTC (permalink / raw)
  To: Rakesh Kudurumalla, Nithin Dabilpuram, Kiran Kumar K,
	Sunil Kumar Kori, Satha Rao
  Cc: dev, jerinj, stable, Yigit, Ferruh

> -----Original Message-----
> From: Rakesh Kudurumalla <rkudurumalla@marvell.com>
> Sent: 2022年3月4日 22:24
> To: Nithin Dabilpuram <ndabilpuram@marvell.com>; Kiran Kumar K
> <kirankumark@marvell.com>; Sunil Kumar Kori <skori@marvell.com>; Satha
> Rao <skoteshwar@marvell.com>
> Cc: dev@dpdk.org; jerinj@marvell.com; Rakesh Kudurumalla
> <rkudurumalla@marvell.com>; stable@dpdk.org; Yigit, Ferruh
> <ferruh.yigit@intel.com>
> Subject: [PATCH] net/cnxk: fix error when compiled for x86
> 
> fix error when compiled for x86 platform when compiled with optimization flag
> enabled
> error: ‘str’ may be used uninitialized in this function
> error: ‘frag_ptr’ may be used uninitialized in this function
> 
> Bugzilla ID: 939
> Fixes: b526599020ef ("net/cnxk: fix build with GCC 12")
> Cc: stable@dpdk.org
> 
> Reported-by: Ferruh Yigit <ferruh.yigit@intel.com>
> Signed-off-by: Rakesh Kudurumalla <rkudurumalla@marvell.com>
> ---

Tested-by: Daxue Gao <daxuex.gao@intel.com>

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

* RE: [PATCH] net/cnxk: fix error when compiled for x86
  2022-03-04 14:23 [PATCH] net/cnxk: fix error when compiled for x86 Rakesh Kudurumalla
  2022-03-07  6:51 ` Gao, DaxueX
@ 2022-03-10  1:35 ` Jiang, YuX
  2022-03-10  8:48   ` Jerin Jacob
  1 sibling, 1 reply; 7+ messages in thread
From: Jiang, YuX @ 2022-03-10  1:35 UTC (permalink / raw)
  To: Rakesh Kudurumalla, Nithin Dabilpuram, Kiran Kumar K,
	Sunil Kumar Kori, Satha Rao
  Cc: dev, jerinj, stable, Yigit, Ferruh

Hi maintainers,

Who can give acked-by for this patch?
May I know this patch can be merged into 22.03 or not?

> -----Original Message-----
> From: Rakesh Kudurumalla <rkudurumalla@marvell.com>
> Sent: 2022年3月4日 22:24
> To: Nithin Dabilpuram <ndabilpuram@marvell.com>; Kiran Kumar K
> <kirankumark@marvell.com>; Sunil Kumar Kori <skori@marvell.com>; Satha
> Rao <skoteshwar@marvell.com>
> Cc: dev@dpdk.org; jerinj@marvell.com; Rakesh Kudurumalla
> <rkudurumalla@marvell.com>; stable@dpdk.org; Yigit, Ferruh
> <ferruh.yigit@intel.com>
> Subject: [PATCH] net/cnxk: fix error when compiled for x86
> 
> fix error when compiled for x86 platform when compiled with optimization
> flag enabled
> error: ‘str’ may be used uninitialized in this function
> error: ‘frag_ptr’ may be used uninitialized in this function
> 
> Bugzilla ID: 939
> Fixes: b526599020ef ("net/cnxk: fix build with GCC 12")
> Cc: stable@dpdk.org
> 
> Reported-by: Ferruh Yigit <ferruh.yigit@intel.com>
> Signed-off-by: Rakesh Kudurumalla <rkudurumalla@marvell.com>
> ---

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

* Re: [PATCH] net/cnxk: fix error when compiled for x86
  2022-03-10  1:35 ` Jiang, YuX
@ 2022-03-10  8:48   ` Jerin Jacob
  2022-03-16  3:32     ` Gao, DaxueX
  0 siblings, 1 reply; 7+ messages in thread
From: Jerin Jacob @ 2022-03-10  8:48 UTC (permalink / raw)
  To: Jiang, YuX
  Cc: Rakesh Kudurumalla, Nithin Dabilpuram, Kiran Kumar K,
	Sunil Kumar Kori, Satha Rao, dev, jerinj, stable, Yigit, Ferruh

On Thu, Mar 10, 2022 at 7:06 AM Jiang, YuX <yux.jiang@intel.com> wrote:
>
> Hi maintainers,
>
> Who can give acked-by for this patch?
> May I know this patch can be merged into 22.03 or not?


Acked-by: Jerin Jacob <jerinj@marvell.com>
Updated the git commit as follows and applied to
dpdk-next-net-mrvl/for-next-net. Thanks

    net/cnxk: fix build error with optimization

    Fix the following build error seen with --optimization=1 and
    GCC 10.3.0.

    ../drivers/net/cnxk/cnxk_ethdev_mtr.c: In function
    ‘cnxk_nix_mtr_policy_validate’:
    ../lib/ethdev/rte_mtr_driver.h:188:10: error: ‘str’ may be used
    uninitialized in this function [-Werror=maybe-uninitialized]

    ../drivers/net/cnxk/cn10k_rx.h:149:2 error: ‘frag_ptr’ may be
    used uninitialized in this function

    Bugzilla ID: 939
    Fixes: b526599020ef ("net/cnxk: fix build with GCC 12")
    Cc: stable@dpdk.org

    Reported-by: Ferruh Yigit <ferruh.yigit@intel.com>
    Signed-off-by: Rakesh Kudurumalla <rkudurumalla@marvell.com>
    Tested-by: Daxue Gao <daxuex.gao@intel.com>
    Acked-by: Jerin Jacob <jerinj@marvell.com>


>
> > -----Original Message-----
> > From: Rakesh Kudurumalla <rkudurumalla@marvell.com>
> > Sent: 2022年3月4日 22:24
> > To: Nithin Dabilpuram <ndabilpuram@marvell.com>; Kiran Kumar K
> > <kirankumark@marvell.com>; Sunil Kumar Kori <skori@marvell.com>; Satha
> > Rao <skoteshwar@marvell.com>
> > Cc: dev@dpdk.org; jerinj@marvell.com; Rakesh Kudurumalla
> > <rkudurumalla@marvell.com>; stable@dpdk.org; Yigit, Ferruh
> > <ferruh.yigit@intel.com>
> > Subject: [PATCH] net/cnxk: fix error when compiled for x86
> >
> > fix error when compiled for x86 platform when compiled with optimization
> > flag enabled
> > error: ‘str’ may be used uninitialized in this function
> > error: ‘frag_ptr’ may be used uninitialized in this function
> >
> > Bugzilla ID: 939
> > Fixes: b526599020ef ("net/cnxk: fix build with GCC 12")
> > Cc: stable@dpdk.org
> >
> > Reported-by: Ferruh Yigit <ferruh.yigit@intel.com>
> > Signed-off-by: Rakesh Kudurumalla <rkudurumalla@marvell.com>
> > ---

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

* RE: [PATCH] net/cnxk: fix error when compiled for x86
  2022-03-10  8:48   ` Jerin Jacob
@ 2022-03-16  3:32     ` Gao, DaxueX
  2022-03-16  4:42       ` Jerin Jacob
  2022-03-16 12:41       ` Kevin Traynor
  0 siblings, 2 replies; 7+ messages in thread
From: Gao, DaxueX @ 2022-03-16  3:32 UTC (permalink / raw)
  To: Rakesh Kudurumalla, Jerin Jacob, Jiang, YuX, Yigit, Ferruh, thomas
  Cc: Rakesh Kudurumalla, Nithin Dabilpuram, Kiran Kumar K,
	Sunil Kumar Kori, Satha Rao, dev, jerinj, stable, Tu, Lijuan,
	Sun, QingX

> -----Original Message-----
> From: Jerin Jacob <jerinjacobk@gmail.com>
> Sent: 2022年3月10日 16:49
> To: Jiang, YuX <yux.jiang@intel.com>
> Cc: Rakesh Kudurumalla <rkudurumalla@marvell.com>; Nithin Dabilpuram
> <ndabilpuram@marvell.com>; Kiran Kumar K <kirankumark@marvell.com>;
> Sunil Kumar Kori <skori@marvell.com>; Satha Rao <skoteshwar@marvell.com>;
> dev@dpdk.org; jerinj@marvell.com; stable@dpdk.org; Yigit, Ferruh
> <ferruh.yigit@intel.com>
> Subject: Re: [PATCH] net/cnxk: fix error when compiled for x86
> 
> On Thu, Mar 10, 2022 at 7:06 AM Jiang, YuX <yux.jiang@intel.com> wrote:
> >
> > Hi maintainers,
> >
> > Who can give acked-by for this patch?
> > May I know this patch can be merged into 22.03 or not?
> 
> 
> Acked-by: Jerin Jacob <jerinj@marvell.com> Updated the git commit as follows
> and applied to dpdk-next-net-mrvl/for-next-net. Thanks
> 
>     net/cnxk: fix build error with optimization
> 
>     Fix the following build error seen with --optimization=1 and
>     GCC 10.3.0.
> 
>     ../drivers/net/cnxk/cnxk_ethdev_mtr.c: In function
>     ‘cnxk_nix_mtr_policy_validate’:
>     ../lib/ethdev/rte_mtr_driver.h:188:10: error: ‘str’ may be used
>     uninitialized in this function [-Werror=maybe-uninitialized]
> 
>     ../drivers/net/cnxk/cn10k_rx.h:149:2 error: ‘frag_ptr’ may be
>     used uninitialized in this function
> 
>     Bugzilla ID: 939
>     Fixes: b526599020ef ("net/cnxk: fix build with GCC 12")
>     Cc: stable@dpdk.org
> 
>     Reported-by: Ferruh Yigit <ferruh.yigit@intel.com>
>     Signed-off-by: Rakesh Kudurumalla <rkudurumalla@marvell.com>
>     Tested-by: Daxue Gao <daxuex.gao@intel.com>
>     Acked-by: Jerin Jacob <jerinj@marvell.com>
> 
> 
> >
> > > -----Original Message-----
> > > From: Rakesh Kudurumalla <rkudurumalla@marvell.com>
> > > Sent: 2022年3月4日 22:24
> > > To: Nithin Dabilpuram <ndabilpuram@marvell.com>; Kiran Kumar K
> > > <kirankumark@marvell.com>; Sunil Kumar Kori <skori@marvell.com>;
> > > Satha Rao <skoteshwar@marvell.com>
> > > Cc: dev@dpdk.org; jerinj@marvell.com; Rakesh Kudurumalla
> > > <rkudurumalla@marvell.com>; stable@dpdk.org; Yigit, Ferruh
> > > <ferruh.yigit@intel.com>
> > > Subject: [PATCH] net/cnxk: fix error when compiled for x86
> > >
> > > fix error when compiled for x86 platform when compiled with
> > > optimization flag enabled
> > > error: ‘str’ may be used uninitialized in this function
> > > error: ‘frag_ptr’ may be used uninitialized in this function
> > >
> > > Bugzilla ID: 939
> > > Fixes: b526599020ef ("net/cnxk: fix build with GCC 12")
> > > Cc: stable@dpdk.org
> > >
> > > Reported-by: Ferruh Yigit <ferruh.yigit@intel.com>
> > > Signed-off-by: Rakesh Kudurumalla <rkudurumalla@marvell.com>
> > > ---
[Gao, DaxueX] 

Hi Rakesh, Jacob and All,

This patch http://patchwork.dpdk.org/project/dpdk/patch/20220304142337.911828-1-rkudurumalla@marvell.com/ has been merged to DPDK 22.03 latest main branch.
It can resolve old problem, but introduce new problem, please check your code, thanks.
Notes: RHEL8.4 passed, Ubuntu20.04 failed.

Bad commit: http://git.dpdk.org/dpdk/commit/?id=68f8a52a6b0ad6b77772d4564928aebb21c2ca66
OS: Ubuntu20.04/5.8.0-48-generic
Compiler: gcc (Ubuntu 10.3.0-1ubuntu1~20.04) 10.3.0

Error info: 
[2302/3456] Compiling C object drivers/libtmp_rte_raw_ifpga.a.p/raw_ifpga_ifpga_rawdev.c.o
FAILED: drivers/libtmp_rte_raw_ifpga.a.p/raw_ifpga_ifpga_rawdev.c.o
gcc -Idrivers/libtmp_rte_raw_ifpga.a.p -Idrivers -I../drivers -Idrivers/raw/ifpga -I../drivers/raw/ifpga -Idrivers/raw/ifpga/base -I../drivers/raw/ifpga/base -Idrivers/net/ipn3ke -I../drivers/net/ipn3ke -Idrivers/net/i40e -I../drivers/net/i40e -Ilib/rawdev -I../lib/rawdev -I. -I.. -Iconfig -I../config -Ilib/eal/include -I../lib/eal/include -Ilib/eal/linux/include -I../lib/eal/linux/include -Ilib/eal/x86/include -I../lib/eal/x86/include -Ilib/eal/common -I../lib/eal/common -Ilib/eal -I../lib/eal -Ilib/kvargs -I../lib/kvargs -Ilib/metrics -I../lib/metrics -Ilib/telemetry -I../lib/telemetry -Ilib/ethdev -I../lib/ethdev -Ilib/net -I../lib/net -Ilib/mbuf -I../lib/mbuf -Ilib/mempool -I../lib/mempool -Ilib/ring -I../lib/ring -Ilib/meter -I../lib/meter -Ilib/pci -I../lib/pci -Idrivers/bus/pci -I../drivers/bus/pci -I../drivers/bus/pci/linux -Idrivers/bus/vdev -I../drivers/bus/vdev -Idrivers/bus/ifpga -I../drivers/bus/ifpga -Idrivers/net/i40e/base -I../drivers/net/i40e/base -Ilib/hash -I../lib/hash -Ilib/rcu -I../lib/rcu -Ilib/sched -I../lib/sched -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -Werror -O1 -include rte_config.h -Wcast-qual -Wdeprecated -Wformat -Wformat-nonliteral -Wformat-security -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wold-style-definition -Wpointer-arith -Wsign-compare -Wstrict-prototypes -Wundef -Wwrite-strings -Wno-address-of-packed-member -Wno-packed-not-aligned -Wno-missing-field-initializers -Wno-zero-length-bounds -D_GNU_SOURCE -fPIC -march=native -DALLOW_EXPERIMENTAL_API -DALLOW_INTERNAL_API -Wno-format-truncation -DRTE_LOG_DEFAULT_LOGTYPE=pmd.raw.ifpga -MD -MQ drivers/libtmp_rte_raw_ifpga.a.p/raw_ifpga_ifpga_rawdev.c.o -MF drivers/libtmp_rte_raw_ifpga.a.p/raw_ifpga_ifpga_rawdev.c.o.d -o drivers/libtmp_rte_raw_ifpga.a.p/raw_ifpga_ifpga_rawdev.c.o -c ../drivers/raw/ifpga/ifpga_rawdev.c
../drivers/raw/ifpga/ifpga_rawdev.c: In function ‘ifpga_rawdev_fill_info’:
../drivers/raw/ifpga/ifpga_rawdev.c:314:8: error: ‘vendor_id’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
  314 |     if (vendor_id == 0x8086 &&
      |        ^
../drivers/raw/ifpga/ifpga_rawdev.c:316:23: error: ‘dev_id’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
  315 |      (dev_id == 0x0CF8 ||
      |      ~~~~~~~~~~~~~~~~~~~~
  316 |      dev_id == 0x0D58 ||
      |      ~~~~~~~~~~~~~~~~~^~
  317 |      dev_id == 0x1580)) {
      |      ~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
[2311/3456] Compiling C object drivers/libtmp_rte_raw_ntb.a.p/raw_ntb_ntb.c.o
ninja: build stopped: subcommand failed.

Best regards,
Daxue Gao

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

* Re: [PATCH] net/cnxk: fix error when compiled for x86
  2022-03-16  3:32     ` Gao, DaxueX
@ 2022-03-16  4:42       ` Jerin Jacob
  2022-03-16 12:41       ` Kevin Traynor
  1 sibling, 0 replies; 7+ messages in thread
From: Jerin Jacob @ 2022-03-16  4:42 UTC (permalink / raw)
  To: Gao, DaxueX
  Cc: Rakesh Kudurumalla, Jiang, YuX, Yigit, Ferruh, thomas,
	Nithin Dabilpuram, Kiran Kumar K, Sunil Kumar Kori, Satha Rao,
	dev, jerinj, stable, Tu, Lijuan, Sun, QingX, Rosen Xu

On Wed, Mar 16, 2022 at 9:02 AM Gao, DaxueX <daxuex.gao@intel.com> wrote:
>
> > -----Original Message-----
> > From: Jerin Jacob <jerinjacobk@gmail.com>
> > Sent: 2022年3月10日 16:49
> > To: Jiang, YuX <yux.jiang@intel.com>
> > Cc: Rakesh Kudurumalla <rkudurumalla@marvell.com>; Nithin Dabilpuram
> > <ndabilpuram@marvell.com>; Kiran Kumar K <kirankumark@marvell.com>;
> > Sunil Kumar Kori <skori@marvell.com>; Satha Rao <skoteshwar@marvell.com>;
> > dev@dpdk.org; jerinj@marvell.com; stable@dpdk.org; Yigit, Ferruh
> > <ferruh.yigit@intel.com>
> > Subject: Re: [PATCH] net/cnxk: fix error when compiled for x86
> >
> > On Thu, Mar 10, 2022 at 7:06 AM Jiang, YuX <yux.jiang@intel.com> wrote:
> > >
> > > Hi maintainers,
> > >
> > > Who can give acked-by for this patch?
> > > May I know this patch can be merged into 22.03 or not?
> >
> >
> > Acked-by: Jerin Jacob <jerinj@marvell.com> Updated the git commit as follows
> > and applied to dpdk-next-net-mrvl/for-next-net. Thanks
> >
> >     net/cnxk: fix build error with optimization
> >
> >     Fix the following build error seen with --optimization=1 and
> >     GCC 10.3.0.
> >
> >     ../drivers/net/cnxk/cnxk_ethdev_mtr.c: In function
> >     ‘cnxk_nix_mtr_policy_validate’:
> >     ../lib/ethdev/rte_mtr_driver.h:188:10: error: ‘str’ may be used
> >     uninitialized in this function [-Werror=maybe-uninitialized]
> >
> >     ../drivers/net/cnxk/cn10k_rx.h:149:2 error: ‘frag_ptr’ may be
> >     used uninitialized in this function
> >
> >     Bugzilla ID: 939
> >     Fixes: b526599020ef ("net/cnxk: fix build with GCC 12")
> >     Cc: stable@dpdk.org
> >
> >     Reported-by: Ferruh Yigit <ferruh.yigit@intel.com>
> >     Signed-off-by: Rakesh Kudurumalla <rkudurumalla@marvell.com>
> >     Tested-by: Daxue Gao <daxuex.gao@intel.com>
> >     Acked-by: Jerin Jacob <jerinj@marvell.com>
> >
> >
> > >
> > > > -----Original Message-----
> > > > From: Rakesh Kudurumalla <rkudurumalla@marvell.com>
> > > > Sent: 2022年3月4日 22:24
> > > > To: Nithin Dabilpuram <ndabilpuram@marvell.com>; Kiran Kumar K
> > > > <kirankumark@marvell.com>; Sunil Kumar Kori <skori@marvell.com>;
> > > > Satha Rao <skoteshwar@marvell.com>
> > > > Cc: dev@dpdk.org; jerinj@marvell.com; Rakesh Kudurumalla
> > > > <rkudurumalla@marvell.com>; stable@dpdk.org; Yigit, Ferruh
> > > > <ferruh.yigit@intel.com>
> > > > Subject: [PATCH] net/cnxk: fix error when compiled for x86
> > > >
> > > > fix error when compiled for x86 platform when compiled with
> > > > optimization flag enabled
> > > > error: ‘str’ may be used uninitialized in this function
> > > > error: ‘frag_ptr’ may be used uninitialized in this function
> > > >
> > > > Bugzilla ID: 939
> > > > Fixes: b526599020ef ("net/cnxk: fix build with GCC 12")
> > > > Cc: stable@dpdk.org
> > > >
> > > > Reported-by: Ferruh Yigit <ferruh.yigit@intel.com>
> > > > Signed-off-by: Rakesh Kudurumalla <rkudurumalla@marvell.com>
> > > > ---
> [Gao, DaxueX]
>
> Hi Rakesh, Jacob and All,
>
> This patch http://patchwork.dpdk.org/project/dpdk/patch/20220304142337.911828-1-rkudurumalla@marvell.com/ has been merged to DPDK 22.03 latest main branch.
> It can resolve old problem, but introduce new problem, please check your code, thanks.
> Notes: RHEL8.4 passed, Ubuntu20.04 failed.

The error is coming from drivers/raw/ifpga/ifpga_rawdev.c:
+  rosen.xu@intel.com


>
> Bad commit: http://git.dpdk.org/dpdk/commit/?id=68f8a52a6b0ad6b77772d4564928aebb21c2ca66
> OS: Ubuntu20.04/5.8.0-48-generic
> Compiler: gcc (Ubuntu 10.3.0-1ubuntu1~20.04) 10.3.0
>
> Error info:
> [2302/3456] Compiling C object drivers/libtmp_rte_raw_ifpga.a.p/raw_ifpga_ifpga_rawdev.c.o
> FAILED: drivers/libtmp_rte_raw_ifpga.a.p/raw_ifpga_ifpga_rawdev.c.o
> gcc -Idrivers/libtmp_rte_raw_ifpga.a.p -Idrivers -I../drivers -Idrivers/raw/ifpga -I../drivers/raw/ifpga -Idrivers/raw/ifpga/base -I../drivers/raw/ifpga/base -Idrivers/net/ipn3ke -I../drivers/net/ipn3ke -Idrivers/net/i40e -I../drivers/net/i40e -Ilib/rawdev -I../lib/rawdev -I. -I.. -Iconfig -I../config -Ilib/eal/include -I../lib/eal/include -Ilib/eal/linux/include -I../lib/eal/linux/include -Ilib/eal/x86/include -I../lib/eal/x86/include -Ilib/eal/common -I../lib/eal/common -Ilib/eal -I../lib/eal -Ilib/kvargs -I../lib/kvargs -Ilib/metrics -I../lib/metrics -Ilib/telemetry -I../lib/telemetry -Ilib/ethdev -I../lib/ethdev -Ilib/net -I../lib/net -Ilib/mbuf -I../lib/mbuf -Ilib/mempool -I../lib/mempool -Ilib/ring -I../lib/ring -Ilib/meter -I../lib/meter -Ilib/pci -I../lib/pci -Idrivers/bus/pci -I../drivers/bus/pci -I../drivers/bus/pci/linux -Idrivers/bus/vdev -I../drivers/bus/vdev -Idrivers/bus/ifpga -I../drivers/bus/ifpga -Idrivers/net/i40e/base -I../drivers/net/i40e/base -Ilib/hash -I../lib/hash -Ilib/rcu -I../lib/rcu -Ilib/sched -I../lib/sched -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -Werror -O1 -include rte_config.h -Wcast-qual -Wdeprecated -Wformat -Wformat-nonliteral -Wformat-security -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wold-style-definition -Wpointer-arith -Wsign-compare -Wstrict-prototypes -Wundef -Wwrite-strings -Wno-address-of-packed-member -Wno-packed-not-aligned -Wno-missing-field-initializers -Wno-zero-length-bounds -D_GNU_SOURCE -fPIC -march=native -DALLOW_EXPERIMENTAL_API -DALLOW_INTERNAL_API -Wno-format-truncation -DRTE_LOG_DEFAULT_LOGTYPE=pmd.raw.ifpga -MD -MQ drivers/libtmp_rte_raw_ifpga.a.p/raw_ifpga_ifpga_rawdev.c.o -MF drivers/libtmp_rte_raw_ifpga.a.p/raw_ifpga_ifpga_rawdev.c.o.d -o drivers/libtmp_rte_raw_ifpga.a.p/raw_ifpga_ifpga_rawdev.c.o -c ../drivers/raw/ifpga/ifpga_rawdev.c
> ../drivers/raw/ifpga/ifpga_rawdev.c: In function ‘ifpga_rawdev_fill_info’:
> ../drivers/raw/ifpga/ifpga_rawdev.c:314:8: error: ‘vendor_id’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
>   314 |     if (vendor_id == 0x8086 &&
>       |        ^
> ../drivers/raw/ifpga/ifpga_rawdev.c:316:23: error: ‘dev_id’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
>   315 |      (dev_id == 0x0CF8 ||
>       |      ~~~~~~~~~~~~~~~~~~~~
>   316 |      dev_id == 0x0D58 ||
>       |      ~~~~~~~~~~~~~~~~~^~
>   317 |      dev_id == 0x1580)) {
>       |      ~~~~~~~~~~~~~~~~~
> cc1: all warnings being treated as errors
> [2311/3456] Compiling C object drivers/libtmp_rte_raw_ntb.a.p/raw_ntb_ntb.c.o
> ninja: build stopped: subcommand failed.
>
> Best regards,
> Daxue Gao

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

* Re: [PATCH] net/cnxk: fix error when compiled for x86
  2022-03-16  3:32     ` Gao, DaxueX
  2022-03-16  4:42       ` Jerin Jacob
@ 2022-03-16 12:41       ` Kevin Traynor
  1 sibling, 0 replies; 7+ messages in thread
From: Kevin Traynor @ 2022-03-16 12:41 UTC (permalink / raw)
  To: Gao, DaxueX, Rakesh Kudurumalla, Jerin Jacob, Jiang, YuX, Yigit,
	Ferruh, thomas
  Cc: Nithin Dabilpuram, Kiran Kumar K, Sunil Kumar Kori, Satha Rao,
	dev, jerinj, stable, Tu, Lijuan, Sun, QingX

On 16/03/2022 03:32, Gao, DaxueX wrote:
>> -----Original Message-----
>> From: Jerin Jacob <jerinjacobk@gmail.com>
>> Sent: 2022年3月10日 16:49
>> To: Jiang, YuX <yux.jiang@intel.com>
>> Cc: Rakesh Kudurumalla <rkudurumalla@marvell.com>; Nithin Dabilpuram
>> <ndabilpuram@marvell.com>; Kiran Kumar K <kirankumark@marvell.com>;
>> Sunil Kumar Kori <skori@marvell.com>; Satha Rao <skoteshwar@marvell.com>;
>> dev@dpdk.org; jerinj@marvell.com; stable@dpdk.org; Yigit, Ferruh
>> <ferruh.yigit@intel.com>
>> Subject: Re: [PATCH] net/cnxk: fix error when compiled for x86
>>
>> On Thu, Mar 10, 2022 at 7:06 AM Jiang, YuX <yux.jiang@intel.com> wrote:
>>>
>>> Hi maintainers,
>>>
>>> Who can give acked-by for this patch?
>>> May I know this patch can be merged into 22.03 or not?
>>
>>
>> Acked-by: Jerin Jacob <jerinj@marvell.com> Updated the git commit as follows
>> and applied to dpdk-next-net-mrvl/for-next-net. Thanks
>>
>>      net/cnxk: fix build error with optimization
>>
>>      Fix the following build error seen with --optimization=1 and
>>      GCC 10.3.0.
>>
>>      ../drivers/net/cnxk/cnxk_ethdev_mtr.c: In function
>>      ‘cnxk_nix_mtr_policy_validate’:
>>      ../lib/ethdev/rte_mtr_driver.h:188:10: error: ‘str’ may be used
>>      uninitialized in this function [-Werror=maybe-uninitialized]
>>
>>      ../drivers/net/cnxk/cn10k_rx.h:149:2 error: ‘frag_ptr’ may be
>>      used uninitialized in this function
>>
>>      Bugzilla ID: 939
>>      Fixes: b526599020ef ("net/cnxk: fix build with GCC 12")
>>      Cc: stable@dpdk.org
>>
>>      Reported-by: Ferruh Yigit <ferruh.yigit@intel.com>
>>      Signed-off-by: Rakesh Kudurumalla <rkudurumalla@marvell.com>
>>      Tested-by: Daxue Gao <daxuex.gao@intel.com>
>>      Acked-by: Jerin Jacob <jerinj@marvell.com>
>>
>>
>>>
>>>> -----Original Message-----
>>>> From: Rakesh Kudurumalla <rkudurumalla@marvell.com>
>>>> Sent: 2022年3月4日 22:24
>>>> To: Nithin Dabilpuram <ndabilpuram@marvell.com>; Kiran Kumar K
>>>> <kirankumark@marvell.com>; Sunil Kumar Kori <skori@marvell.com>;
>>>> Satha Rao <skoteshwar@marvell.com>
>>>> Cc: dev@dpdk.org; jerinj@marvell.com; Rakesh Kudurumalla
>>>> <rkudurumalla@marvell.com>; stable@dpdk.org; Yigit, Ferruh
>>>> <ferruh.yigit@intel.com>
>>>> Subject: [PATCH] net/cnxk: fix error when compiled for x86
>>>>
>>>> fix error when compiled for x86 platform when compiled with
>>>> optimization flag enabled
>>>> error: ‘str’ may be used uninitialized in this function
>>>> error: ‘frag_ptr’ may be used uninitialized in this function
>>>>
>>>> Bugzilla ID: 939
>>>> Fixes: b526599020ef ("net/cnxk: fix build with GCC 12")
>>>> Cc: stable@dpdk.org
>>>>
>>>> Reported-by: Ferruh Yigit <ferruh.yigit@intel.com>
>>>> Signed-off-by: Rakesh Kudurumalla <rkudurumalla@marvell.com>
>>>> ---
> [Gao, DaxueX]
> 
> Hi Rakesh, Jacob and All,
> 
> This patch http://patchwork.dpdk.org/project/dpdk/patch/20220304142337.911828-1-rkudurumalla@marvell.com/ has been merged to DPDK 22.03 latest main branch.
> It can resolve old problem, but introduce new problem, please check your code, thanks.
> Notes: RHEL8.4 passed, Ubuntu20.04 failed.
> 

I am not taking this patch for 21.11 as it seems to cause other issues 
and i don't trust that the fixes tag is correct, but there is so much 
churn in cnxk it is hard to quickly tell. If this series of fixes is 
needed for 21.11 please send a backport with correct 'Fixes' and '[PATCH 
21.11]' subject-prefix to stable branch. Thanks, Kevin.

> Bad commit: http://git.dpdk.org/dpdk/commit/?id=68f8a52a6b0ad6b77772d4564928aebb21c2ca66
> OS: Ubuntu20.04/5.8.0-48-generic
> Compiler: gcc (Ubuntu 10.3.0-1ubuntu1~20.04) 10.3.0
> 
> Error info:
> [2302/3456] Compiling C object drivers/libtmp_rte_raw_ifpga.a.p/raw_ifpga_ifpga_rawdev.c.o
> FAILED: drivers/libtmp_rte_raw_ifpga.a.p/raw_ifpga_ifpga_rawdev.c.o
> gcc -Idrivers/libtmp_rte_raw_ifpga.a.p -Idrivers -I../drivers -Idrivers/raw/ifpga -I../drivers/raw/ifpga -Idrivers/raw/ifpga/base -I../drivers/raw/ifpga/base -Idrivers/net/ipn3ke -I../drivers/net/ipn3ke -Idrivers/net/i40e -I../drivers/net/i40e -Ilib/rawdev -I../lib/rawdev -I. -I.. -Iconfig -I../config -Ilib/eal/include -I../lib/eal/include -Ilib/eal/linux/include -I../lib/eal/linux/include -Ilib/eal/x86/include -I../lib/eal/x86/include -Ilib/eal/common -I../lib/eal/common -Ilib/eal -I../lib/eal -Ilib/kvargs -I../lib/kvargs -Ilib/metrics -I../lib/metrics -Ilib/telemetry -I../lib/telemetry -Ilib/ethdev -I../lib/ethdev -Ilib/net -I../lib/net -Ilib/mbuf -I../lib/mbuf -Ilib/mempool -I../lib/mempool -Ilib/ring -I../lib/ring -Ilib/meter -I../lib/meter -Ilib/pci -I../lib/pci -Idrivers/bus/pci -I../drivers/bus/pci -I../drivers/bus/pci/linux -Idrivers/bus/vdev -I../drivers/bus/vdev -Idrivers/bus/ifpga -I../drivers/bus/ifpga -Idrivers/net/i40e/base -I../drivers/net/i40e/base -Ilib/hash -I../lib/hash -Ilib/rcu -I../lib/rcu -Ilib/sched -I../lib/sched -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -Werror -O1 -include rte_config.h -Wcast-qual -Wdeprecated -Wformat -Wformat-nonliteral -Wformat-security -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wold-style-definition -Wpointer-arith -Wsign-compare -Wstrict-prototypes -Wundef -Wwrite-strings -Wno-address-of-packed-member -Wno-packed-not-aligned -Wno-missing-field-initializers -Wno-zero-length-bounds -D_GNU_SOURCE -fPIC -march=native -DALLOW_EXPERIMENTAL_API -DALLOW_INTERNAL_API -Wno-format-truncation -DRTE_LOG_DEFAULT_LOGTYPE=pmd.raw.ifpga -MD -MQ drivers/libtmp_rte_raw_ifpga.a.p/raw_ifpga_ifpga_rawdev.c.o -MF drivers/libtmp_rte_raw_ifpga.a.p/raw_ifpga_ifpga_rawdev.c.o.d -o drivers/libtmp_rte_raw_ifpga.a.p/raw_ifpga_ifpga_rawdev.c.o -c ../drivers/raw/ifpga/ifpga_rawdev.c
> ../drivers/raw/ifpga/ifpga_rawdev.c: In function ‘ifpga_rawdev_fill_info’:
> ../drivers/raw/ifpga/ifpga_rawdev.c:314:8: error: ‘vendor_id’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
>    314 |     if (vendor_id == 0x8086 &&
>        |        ^
> ../drivers/raw/ifpga/ifpga_rawdev.c:316:23: error: ‘dev_id’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
>    315 |      (dev_id == 0x0CF8 ||
>        |      ~~~~~~~~~~~~~~~~~~~~
>    316 |      dev_id == 0x0D58 ||
>        |      ~~~~~~~~~~~~~~~~~^~
>    317 |      dev_id == 0x1580)) {
>        |      ~~~~~~~~~~~~~~~~~
> cc1: all warnings being treated as errors
> [2311/3456] Compiling C object drivers/libtmp_rte_raw_ntb.a.p/raw_ntb_ntb.c.o
> ninja: build stopped: subcommand failed.
> 
> Best regards,
> Daxue Gao


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

end of thread, other threads:[~2022-03-16 12:41 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-04 14:23 [PATCH] net/cnxk: fix error when compiled for x86 Rakesh Kudurumalla
2022-03-07  6:51 ` Gao, DaxueX
2022-03-10  1:35 ` Jiang, YuX
2022-03-10  8:48   ` Jerin Jacob
2022-03-16  3:32     ` Gao, DaxueX
2022-03-16  4:42       ` Jerin Jacob
2022-03-16 12:41       ` Kevin Traynor

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).