dev.dpdk.org archive mirror
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] net/ixgbe: fix issue for change definitions of bool
@ 2020-02-26 23:44 Wei Zhao
  2020-02-27  1:57 ` Ye Xiaolong
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Wei Zhao @ 2020-02-26 23:44 UTC (permalink / raw)
  To: dev; +Cc: stable, xiaolong.ye, Wei Zhao

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

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


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

* Re: [dpdk-dev] [PATCH] net/ixgbe: fix issue for change definitions of bool
  2020-02-26 23:44 [dpdk-dev] [PATCH] net/ixgbe: fix issue for change definitions of bool Wei Zhao
@ 2020-02-27  1:57 ` Ye Xiaolong
  2020-02-27  3:09 ` Ye Xiaolong
  2020-03-30  6:33 ` [dpdk-dev] [PATCH v2] net/ixgbe: fix issue for e-tag defination Wei Zhao
  2 siblings, 0 replies; 6+ messages in thread
From: Ye Xiaolong @ 2020-02-27  1:57 UTC (permalink / raw)
  To: Wei Zhao; +Cc: dev, stable

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
>

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

* Re: [dpdk-dev] [PATCH] net/ixgbe: fix issue for change definitions of bool
  2020-02-26 23:44 [dpdk-dev] [PATCH] net/ixgbe: fix issue for change definitions of bool Wei Zhao
  2020-02-27  1:57 ` Ye Xiaolong
@ 2020-02-27  3:09 ` Ye Xiaolong
  2020-02-27  3:13   ` Zhao1, Wei
  2020-03-30  6:33 ` [dpdk-dev] [PATCH v2] net/ixgbe: fix issue for e-tag defination Wei Zhao
  2 siblings, 1 reply; 6+ messages in thread
From: Ye Xiaolong @ 2020-02-27  3:09 UTC (permalink / raw)
  To: Wei Zhao; +Cc: dev, stable

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
>

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

* Re: [dpdk-dev] [PATCH] net/ixgbe: fix issue for change definitions of bool
  2020-02-27  3:09 ` Ye Xiaolong
@ 2020-02-27  3:13   ` Zhao1, Wei
  0 siblings, 0 replies; 6+ messages in thread
From: Zhao1, Wei @ 2020-02-27  3:13 UTC (permalink / raw)
  To: Ye, Xiaolong; +Cc: dev, stable

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

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

* [dpdk-dev] [PATCH v2] net/ixgbe: fix issue for e-tag defination
  2020-02-26 23:44 [dpdk-dev] [PATCH] net/ixgbe: fix issue for change definitions of bool Wei Zhao
  2020-02-27  1:57 ` Ye Xiaolong
  2020-02-27  3:09 ` Ye Xiaolong
@ 2020-03-30  6:33 ` Wei Zhao
  2020-03-30  7:37   ` Ye Xiaolong
  2 siblings, 1 reply; 6+ messages in thread
From: Wei Zhao @ 2020-03-30  6:33 UTC (permalink / raw)
  To: dev; +Cc: stable, xiaolong.ye, Wei Zhao

An issue has been caused after change definations of bool,
we had better use uint16_t to define e-tag ethertype, not 8
bits length bool, that patch will change bool bits length, which
introduce a bug for etag/etag_strip for x550 NIC. So change
to the 16 bits defination.

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

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>

v2:
-add more info and find root cause for this issue
---
 drivers/net/ixgbe/ixgbe_ethdev.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ixgbe/ixgbe_ethdev.h b/drivers/net/ixgbe/ixgbe_ethdev.h
index e1cd8fd16..c5d0e0912 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.h
+++ b/drivers/net/ixgbe/ixgbe_ethdev.h
@@ -358,7 +358,7 @@ struct ixgbe_l2_tn_info {
 	struct rte_hash                    *hash_handle;
 	bool e_tag_en; /* e-tag enabled */
 	bool e_tag_fwd_en; /* e-tag based forwarding enabled */
-	bool e_tag_ether_type; /* ether type for e-tag */
+	uint16_t e_tag_ether_type; /* ether type for e-tag */
 };
 
 struct rte_flow {
-- 
2.19.1


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

* Re: [dpdk-dev] [PATCH v2] net/ixgbe: fix issue for e-tag defination
  2020-03-30  6:33 ` [dpdk-dev] [PATCH v2] net/ixgbe: fix issue for e-tag defination Wei Zhao
@ 2020-03-30  7:37   ` Ye Xiaolong
  0 siblings, 0 replies; 6+ messages in thread
From: Ye Xiaolong @ 2020-03-30  7:37 UTC (permalink / raw)
  To: Wei Zhao; +Cc: dev, stable

Hi, Wei

Thanks for identifying the root cause.

On 03/30, Wei Zhao wrote:
>An issue has been caused after change definations of bool,
>we had better use uint16_t to define e-tag ethertype, not 8
>bits length bool, that patch will change bool bits length, which
>introduce a bug for etag/etag_strip for x550 NIC. So change
>to the 16 bits defination.
>
>Cc: stable@dpdk.org
>Fixes: ad43b7bce95b ("net/ixgbe: avoid multiple definitions of bool")
>
>Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
>
>v2:
>-add more info and find root cause for this issue
>---
> drivers/net/ixgbe/ixgbe_ethdev.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>diff --git a/drivers/net/ixgbe/ixgbe_ethdev.h b/drivers/net/ixgbe/ixgbe_ethdev.h
>index e1cd8fd16..c5d0e0912 100644
>--- a/drivers/net/ixgbe/ixgbe_ethdev.h
>+++ b/drivers/net/ixgbe/ixgbe_ethdev.h
>@@ -358,7 +358,7 @@ struct ixgbe_l2_tn_info {
> 	struct rte_hash                    *hash_handle;
> 	bool e_tag_en; /* e-tag enabled */
> 	bool e_tag_fwd_en; /* e-tag based forwarding enabled */
>-	bool e_tag_ether_type; /* ether type for e-tag */
>+	uint16_t e_tag_ether_type; /* ether type for e-tag */
> };
> 
> struct rte_flow {
>-- 
>2.19.1
>

Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>

Applied to dpdk-next-net-intel, Thanks.

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

end of thread, other threads:[~2020-03-30  7:40 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-26 23:44 [dpdk-dev] [PATCH] net/ixgbe: fix issue for change definitions of bool Wei Zhao
2020-02-27  1:57 ` Ye Xiaolong
2020-02-27  3:09 ` Ye Xiaolong
2020-02-27  3:13   ` Zhao1, Wei
2020-03-30  6:33 ` [dpdk-dev] [PATCH v2] net/ixgbe: fix issue for e-tag defination Wei Zhao
2020-03-30  7:37   ` Ye Xiaolong

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