[v2] net/ixgbe: fix issue for e-tag defination

Message ID 20200330063323.5371-1-wei.zhao1@intel.com (mailing list archive)
State Accepted, archived
Delegated to: xiaolong ye
Headers
Series [v2] net/ixgbe: fix issue for e-tag defination |

Checks

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

Commit Message

Zhao1, Wei March 30, 2020, 6:33 a.m. UTC
  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(-)
  

Comments

Xiaolong Ye March 30, 2020, 7:37 a.m. UTC | #1
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.
  

Patch

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 {