net/ixgbe: fix issue for change definitions of bool

Message ID 1582760662-9263-1-git-send-email-wei.zhao1@intel.com (mailing list archive)
State Superseded, archived
Delegated to: xiaolong ye
Headers
Series net/ixgbe: fix issue for change definitions of bool |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/iol-mellanox-Performance success Performance Testing PASS
ci/Intel-compilation success Compilation OK
ci/iol-testing success Testing PASS
ci/travis-robot success Travis build: passed

Commit Message

Zhao1, Wei Feb. 26, 2020, 11:44 p.m. UTC
  We had better not to change code in base folder, that patch will
introduce a bug for etag/etag_strip for x550 NIC. So change back
to the aboriginal definition.

Cc: stable@dpdk.org
Fixes: ad43b7bce95b ("net/ixgbe: avoid multiple definitions of bool")

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
---
 drivers/net/ixgbe/base/ixgbe_osdep.h | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
  

Comments

Xiaolong Ye Feb. 27, 2020, 1:57 a.m. UTC | #1
Hi, Wei

On 02/27, Wei Zhao wrote:
>We had better not to change code in base folder, that patch will
>introduce a bug for etag/etag_strip for x550 NIC. So change back

Could you elaborate the details of this bug?

Thanks,
Xiaolong

>to the aboriginal definition.
>
>Cc: stable@dpdk.org
>Fixes: ad43b7bce95b ("net/ixgbe: avoid multiple definitions of bool")
>
>Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
>---
> drivers/net/ixgbe/base/ixgbe_osdep.h | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
>diff --git a/drivers/net/ixgbe/base/ixgbe_osdep.h b/drivers/net/ixgbe/base/ixgbe_osdep.h
>index 844d1701f..19ce2d1c8 100644
>--- a/drivers/net/ixgbe/base/ixgbe_osdep.h
>+++ b/drivers/net/ixgbe/base/ixgbe_osdep.h
>@@ -9,7 +9,6 @@
> #include <stdint.h>
> #include <stdio.h>
> #include <stdarg.h>
>-#include <stdbool.h>
> #include <rte_common.h>
> #include <rte_debug.h>
> #include <rte_cycles.h>
>@@ -84,6 +83,10 @@ typedef uint32_t	u32;
> typedef int32_t		s32;
> typedef uint64_t	u64;
> 
>+#ifndef __cplusplus
>+typedef int		bool;
>+#endif
>+
> #define mb()	rte_mb()
> #define wmb()	rte_wmb()
> #define rmb()	rte_rmb()
>-- 
>2.17.1
>
  
Xiaolong Ye Feb. 27, 2020, 3:09 a.m. UTC | #2
Hi,

On 02/27, Wei Zhao wrote:
>We had better not to change code in base folder, that patch will
>introduce a bug for etag/etag_strip for x550 NIC. So change back
>to the aboriginal definition.
>
>Cc: stable@dpdk.org
>Fixes: ad43b7bce95b ("net/ixgbe: avoid multiple definitions of bool")

I think this patch makes sense to remove local bool type to avoid possible
multiple definitions of 'bool', could you try to investigate the root cause
of the bug that this patch revealed?

Thanks,
Xiaolong

>
>Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
>---
> drivers/net/ixgbe/base/ixgbe_osdep.h | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
>diff --git a/drivers/net/ixgbe/base/ixgbe_osdep.h b/drivers/net/ixgbe/base/ixgbe_osdep.h
>index 844d1701f..19ce2d1c8 100644
>--- a/drivers/net/ixgbe/base/ixgbe_osdep.h
>+++ b/drivers/net/ixgbe/base/ixgbe_osdep.h
>@@ -9,7 +9,6 @@
> #include <stdint.h>
> #include <stdio.h>
> #include <stdarg.h>
>-#include <stdbool.h>
> #include <rte_common.h>
> #include <rte_debug.h>
> #include <rte_cycles.h>
>@@ -84,6 +83,10 @@ typedef uint32_t	u32;
> typedef int32_t		s32;
> typedef uint64_t	u64;
> 
>+#ifndef __cplusplus
>+typedef int		bool;
>+#endif
>+
> #define mb()	rte_mb()
> #define wmb()	rte_wmb()
> #define rmb()	rte_rmb()
>-- 
>2.17.1
>
  
Zhao1, Wei Feb. 27, 2020, 3:13 a.m. UTC | #3
Ok,more info will be update to this patch

> -----Original Message-----
> From: Ye, Xiaolong <xiaolong.ye@intel.com>
> Sent: Thursday, February 27, 2020 11:09 AM
> To: Zhao1, Wei <wei.zhao1@intel.com>
> Cc: dev@dpdk.org; stable@dpdk.org
> Subject: Re: [PATCH] net/ixgbe: fix issue for change definitions of bool
> 
> Hi,
> 
> On 02/27, Wei Zhao wrote:
> >We had better not to change code in base folder, that patch will
> >introduce a bug for etag/etag_strip for x550 NIC. So change back to the
> >aboriginal definition.
> >
> >Cc: stable@dpdk.org
> >Fixes: ad43b7bce95b ("net/ixgbe: avoid multiple definitions of bool")
> 
> I think this patch makes sense to remove local bool type to avoid possible
> multiple definitions of 'bool', could you try to investigate the root cause of the
> bug that this patch revealed?
> 
> Thanks,
> Xiaolong
> 
> >
> >Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
> >---
> > drivers/net/ixgbe/base/ixgbe_osdep.h | 5 ++++-
> > 1 file changed, 4 insertions(+), 1 deletion(-)
> >
> >diff --git a/drivers/net/ixgbe/base/ixgbe_osdep.h
> >b/drivers/net/ixgbe/base/ixgbe_osdep.h
> >index 844d1701f..19ce2d1c8 100644
> >--- a/drivers/net/ixgbe/base/ixgbe_osdep.h
> >+++ b/drivers/net/ixgbe/base/ixgbe_osdep.h
> >@@ -9,7 +9,6 @@
> > #include <stdint.h>
> > #include <stdio.h>
> > #include <stdarg.h>
> >-#include <stdbool.h>
> > #include <rte_common.h>
> > #include <rte_debug.h>
> > #include <rte_cycles.h>
> >@@ -84,6 +83,10 @@ typedef uint32_t	u32;
> > typedef int32_t		s32;
> > typedef uint64_t	u64;
> >
> >+#ifndef __cplusplus
> >+typedef int		bool;
> >+#endif
> >+
> > #define mb()	rte_mb()
> > #define wmb()	rte_wmb()
> > #define rmb()	rte_rmb()
> >--
> >2.17.1
> >
  

Patch

diff --git a/drivers/net/ixgbe/base/ixgbe_osdep.h b/drivers/net/ixgbe/base/ixgbe_osdep.h
index 844d1701f..19ce2d1c8 100644
--- a/drivers/net/ixgbe/base/ixgbe_osdep.h
+++ b/drivers/net/ixgbe/base/ixgbe_osdep.h
@@ -9,7 +9,6 @@ 
 #include <stdint.h>
 #include <stdio.h>
 #include <stdarg.h>
-#include <stdbool.h>
 #include <rte_common.h>
 #include <rte_debug.h>
 #include <rte_cycles.h>
@@ -84,6 +83,10 @@  typedef uint32_t	u32;
 typedef int32_t		s32;
 typedef uint64_t	u64;
 
+#ifndef __cplusplus
+typedef int		bool;
+#endif
+
 #define mb()	rte_mb()
 #define wmb()	rte_wmb()
 #define rmb()	rte_rmb()