net/mlx5: fix bit field compiling error
PATCH 1/1 net/mlx5: fix bit field compiling error
Some old compilers and old specification will not support bit field with other types except integer or unsigned integer. Since the next and previous items are 64b and/or 32b aligned, bit field with "unsigned char" type will not save any space and the compiler will complain.
Changing it to "unsigned int" type bit field will solve the issue.
--- drivers/net/mlx5/mlx5.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/mlx5/mlx5.h +1 -1
@@ -733,7 +733,7 @@ struct mlx5_ind_table_obj { struct mlx5_hrxq { ILIST_ENTRY(uint32_t)next; /* Index to the next element. */ rte_atomic32_t refcnt; /* Reference counter. */ - uint8_t shared:1; /* This object used in shared action. */ + uint32_t shared:1; /* This object used in shared action. */ struct mlx5_ind_table_obj *ind_table; /* Indirection table. */ RTE_STD_C11 union {
Signature · 1 line
1.8.3.1
Hi,
Quoted 37 lines
-----Original Message-----
From: Bing Zhao <[email protected]>
Sent: Monday, October 26, 2020 7:25 PM
To: [email protected]; [email protected]
Cc: [email protected]; Ori Kam <[email protected]>; Raslan Darawsheh <[email protected]>; Andrey Vesnovaty <[email protected]>
Subject: [PATCH] net/mlx5: fix bit field compiling errorSome old compilers and old specification will not support bit field with other types except integer or unsigned integer. Since the next and previous items are 64b and/or 32b aligned, bit field with "unsigned char" type will not save any space and the compiler will complain.
Changing it to "unsigned int" type bit field will solve the issue.Fixes f711b60d400b ("net/mlx5: modify hash Rx queue objects")Signed-off-by Bing Zhao <[email protected]>--- drivers/net/mlx5/mlx5.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/net/mlx5/mlx5.h +1
-2@@ -733,7 +733,7 @@ struct mlx5_ind_table_obj { struct mlx5_hrxq { ILIST_ENTRY(uint32_t)next; /* Index to the next element. */ rte_atomic32_t refcnt; /* Reference counter. */ - uint8_t shared:1; /* This object used in shared action. */ + uint32_t shared:1; /* This object used in shared action. */ struct mlx5_ind_table_obj *ind_table; /* Indirection table. */ RTE_STD_C11 union { --
Quoted 1 line
1.8.3.1
Patch squashed into relevant commit in next-net-mlx,
Kindest regards
Raslan Darawsheh
Quoted 35 lines · Raslan Darawsheh
Hi,
Quoted 32 lines
-----Original Message-----
From: Bing Zhao <[email protected]>
Sent: Monday, October 26, 2020 7:25 PM
To: [email protected]; [email protected]
Cc: [email protected]; Ori Kam <[email protected]>; Raslan Darawsheh <[email protected]>; Andrey Vesnovaty <[email protected]>
Subject: [PATCH] net/mlx5: fix bit field compiling errorSome old compilers and old specification will not support bit field with other types except integer or unsigned integer. Since the next and previous items are 64b and/or 32b aligned, bit field with "unsigned char" type will not save any space and the compiler will complain.
Changing it to "unsigned int" type bit field will solve the issue.Fixes f711b60d400b ("net/mlx5: modify hash Rx queue objects")Signed-off-by Bing Zhao <[email protected]>--- drivers/net/mlx5/mlx5.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/net/mlx5/mlx5.h +0
-1@@ -733,7 +733,7 @@ struct mlx5_ind_table_obj {struct mlx5_hrxq {ILIST_ENTRY (uint32_t )next;/* Index to the next element. */ rte_atomic32_t refcnt;/* Reference counter. */ -uint8_t shared:1 ;/* This object used in shared action. */
Quoted 9 lines
Quoted 6 lines
drivers/net/mlx5/mlx5.h +1
-1+ uint32_t shared:1; /* This object used in shared action. */struct mlx5_ind_table_obj *ind_table;/* Indirection table. */ RTE_STD_C11 union { --1.8.3.1
Patch squashed into relevant commit in next-net-mlx,
Hi Raslan,
Updating patches that has been pulled by next-net makes very hard to pull your tree.
Can you please squash only ones that are still only in the mlx tree, for others I can update in the next-net which is easier than resolving conflicts on merge.
Thanks,
ferruh
Hi,
Quoted 55 lines
-----Original Message-----
From: Ferruh Yigit <[email protected]>
Sent: Thursday, October 29, 2020 4:28 PM
To: Raslan Darawsheh <[email protected]>; Bing Zhao <[email protected]>; [email protected]; [email protected]
Cc: [email protected]; Ori Kam <[email protected]>; Andrey Vesnovaty <[email protected]>
Subject: Re: [dpdk-dev] [PATCH] net/mlx5: fix bit field compiling errorQuoted 35 lines · Raslan Darawsheh
Hi,
Quoted 32 lines
-----Original Message-----
From: Bing Zhao <[email protected]>
Sent: Monday, October 26, 2020 7:25 PM
To: [email protected]; [email protected]
Cc: [email protected]; Ori Kam <[email protected]>; Raslan Darawsheh <[email protected]>; Andrey Vesnovaty <[email protected]>
Subject: [PATCH] net/mlx5: fix bit field compiling errorSome old compilers and old specification will not support bit field with other types except integer or unsigned integer. Since the next and previous items are 64b and/or 32b aligned, bit field with "unsigned char" type will not save any space and the compiler will complain.
Changing it to "unsigned int" type bit field will solve the issue.Fixes f711b60d400b ("net/mlx5: modify hash Rx queue objects")Signed-off-by Bing Zhao <[email protected]>--- drivers/net/mlx5/mlx5.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/net/mlx5/mlx5.h +0
-1@@ -733,7 +733,7 @@ struct mlx5_ind_table_obj {struct mlx5_hrxq {ILIST_ENTRY (uint32_t )next;/* Index to the next element. */ rte_atomic32_t refcnt;/* Reference counter. */ -uint8_t shared:1 ;/* This object used in shared action. */ Quoted 9 lines
Quoted 6 lines
drivers/net/mlx5/mlx5.h +1
-1+ uint32_t shared:1; /* This object used in shared action. */struct mlx5_ind_table_obj *ind_table;/* Indirection table. */ RTE_STD_C11 union { --1.8.3.1
Patch squashed into relevant commit in next-net-mlx,
Quoted 8 lines
Hi Raslan,
Updating patches that has been pulled by next-net makes very hard to pull your tree.
Can you please squash only ones that are still only in the mlx tree, for others I can update in the next-net which is easier than resolving conflicts on merge.
Sure, and that's what I usually do not sure what happened and caused a squash for some pulled patches already.
Quoted 2 lines
Thanks,
Ferruh
Kindest regards
Raslan Darawsheh