* [dpdk-dev] [PATCH] ethdev: fix compilation issue with strict flags
@ 2017-04-13 5:29 Shahaf Shuler
2017-04-13 8:29 ` Gaëtan Rivet
2017-04-13 9:36 ` Van Haaren, Harry
0 siblings, 2 replies; 5+ messages in thread
From: Shahaf Shuler @ 2017-04-13 5:29 UTC (permalink / raw)
To: thomas.monjalon; +Cc: adrien.mazarguil, nelio.laranjeiro, dev
Compilation error seen while compiling mlx5 in debug mode
under RHEL 7.3:
rte_ethdev.h:1670:7: error: type of bit-field 'state' is a GCC extension
[-Werror=pedantic]
Address it by removing the unnecessary bit-field width limitation.
Fixes: d52268a8b24b ("ethdev: expose device states")
Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
---
lib/librte_ether/rte_ethdev.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/librte_ether/rte_ethdev.h b/lib/librte_ether/rte_ethdev.h
index d07253874..2d1bc12aa 100644
--- a/lib/librte_ether/rte_ethdev.h
+++ b/lib/librte_ether/rte_ethdev.h
@@ -1667,7 +1667,7 @@ struct rte_eth_dev {
* received packets before passing them to the driver for transmission.
*/
struct rte_eth_rxtx_callback *pre_tx_burst_cbs[RTE_MAX_QUEUES_PER_PORT];
- enum rte_eth_dev_state state:8; /**< Flag indicating the port state */
+ enum rte_eth_dev_state state; /**< Flag indicating the port state */
} __rte_cache_aligned;
struct rte_eth_dev_sriov {
--
2.12.0
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dpdk-dev] [PATCH] ethdev: fix compilation issue with strict flags
2017-04-13 5:29 [dpdk-dev] [PATCH] ethdev: fix compilation issue with strict flags Shahaf Shuler
@ 2017-04-13 8:29 ` Gaëtan Rivet
2017-04-13 9:36 ` Van Haaren, Harry
1 sibling, 0 replies; 5+ messages in thread
From: Gaëtan Rivet @ 2017-04-13 8:29 UTC (permalink / raw)
To: Shahaf Shuler; +Cc: thomas.monjalon, dev
Yes, with the __rte_cache_aligned, the :8 should be useless anyway.
On Thu, Apr 13, 2017 at 08:29:27AM +0300, Shahaf Shuler wrote:
>Compilation error seen while compiling mlx5 in debug mode
>under RHEL 7.3:
>
>rte_ethdev.h:1670:7: error: type of bit-field 'state' is a GCC extension
> [-Werror=pedantic]
>
>Address it by removing the unnecessary bit-field width limitation.
>
>Fixes: d52268a8b24b ("ethdev: expose device states")
>
>Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Gaetan Rivet <gaetan.rivet@6wind.com>
>---
> lib/librte_ether/rte_ethdev.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>diff --git a/lib/librte_ether/rte_ethdev.h b/lib/librte_ether/rte_ethdev.h
>index d07253874..2d1bc12aa 100644
>--- a/lib/librte_ether/rte_ethdev.h
>+++ b/lib/librte_ether/rte_ethdev.h
>@@ -1667,7 +1667,7 @@ struct rte_eth_dev {
> * received packets before passing them to the driver for transmission.
> */
> struct rte_eth_rxtx_callback *pre_tx_burst_cbs[RTE_MAX_QUEUES_PER_PORT];
>- enum rte_eth_dev_state state:8; /**< Flag indicating the port state */
>+ enum rte_eth_dev_state state; /**< Flag indicating the port state */
> } __rte_cache_aligned;
>
> struct rte_eth_dev_sriov {
>--
>2.12.0
>
--
Gaëtan Rivet
6WIND
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dpdk-dev] [PATCH] ethdev: fix compilation issue with strict flags
2017-04-13 5:29 [dpdk-dev] [PATCH] ethdev: fix compilation issue with strict flags Shahaf Shuler
2017-04-13 8:29 ` Gaëtan Rivet
@ 2017-04-13 9:36 ` Van Haaren, Harry
2017-04-19 5:22 ` Shahaf Shuler
1 sibling, 1 reply; 5+ messages in thread
From: Van Haaren, Harry @ 2017-04-13 9:36 UTC (permalink / raw)
To: Shahaf Shuler, thomas.monjalon; +Cc: adrien.mazarguil, nelio.laranjeiro, dev
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Shahaf Shuler
> Sent: Thursday, April 13, 2017 6:29 AM
> To: thomas.monjalon@6wind.com
> Cc: adrien.mazarguil@6wind.com; nelio.laranjeiro@6wind.com; dev@dpdk.org
> Subject: [dpdk-dev] [PATCH] ethdev: fix compilation issue with strict flags
>
> Compilation error seen while compiling mlx5 in debug mode
> under RHEL 7.3:
>
> rte_ethdev.h:1670:7: error: type of bit-field 'state' is a GCC extension
> [-Werror=pedantic]
>
> Address it by removing the unnecessary bit-field width limitation.
>
> Fixes: d52268a8b24b ("ethdev: expose device states")
>
> Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
> ---
> lib/librte_ether/rte_ethdev.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/lib/librte_ether/rte_ethdev.h b/lib/librte_ether/rte_ethdev.h
> index d07253874..2d1bc12aa 100644
> --- a/lib/librte_ether/rte_ethdev.h
> +++ b/lib/librte_ether/rte_ethdev.h
> @@ -1667,7 +1667,7 @@ struct rte_eth_dev {
> * received packets before passing them to the driver for transmission.
> */
> struct rte_eth_rxtx_callback *pre_tx_burst_cbs[RTE_MAX_QUEUES_PER_PORT];
> - enum rte_eth_dev_state state:8; /**< Flag indicating the port state */
> + enum rte_eth_dev_state state; /**< Flag indicating the port state */
> } __rte_cache_aligned;
>
> struct rte_eth_dev_sriov {
What is the guidelines of changing ABI of an @internal structure?
If I understand correctly, this @internal structure shouldn't be allocated in the app - so we can extend it at the end without breaking ABI.
Since the state is at the end of the struct, I think this change is safe.
ABI Validate tool with GCC 5.4.0 says ABI compatible, so
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dpdk-dev] [PATCH] ethdev: fix compilation issue with strict flags
2017-04-13 9:36 ` Van Haaren, Harry
@ 2017-04-19 5:22 ` Shahaf Shuler
2017-04-19 13:35 ` Thomas Monjalon
0 siblings, 1 reply; 5+ messages in thread
From: Shahaf Shuler @ 2017-04-19 5:22 UTC (permalink / raw)
To: Van Haaren, Harry, thomas.monjalon, thomas
Cc: Adrien Mazarguil, Nélio Laranjeiro, dev, Gaetan Rivet
Hi,
Any more comments on this commit? Could it be merged? Compilation is still failing..
Thursday, April 13, 2017 12:36 PM, Van Haaren, Harry:
> > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Shahaf Shuler
> > Sent: Thursday, April 13, 2017 6:29 AM
> > To: thomas.monjalon@6wind.com
> > Cc: adrien.mazarguil@6wind.com; nelio.laranjeiro@6wind.com;
> > dev@dpdk.org
> > Subject: [dpdk-dev] [PATCH] ethdev: fix compilation issue with strict
> > flags
> >
> > Compilation error seen while compiling mlx5 in debug mode under RHEL
> > 7.3:
> >
> > rte_ethdev.h:1670:7: error: type of bit-field 'state' is a GCC extension
> > [-Werror=pedantic]
> >
> > Address it by removing the unnecessary bit-field width limitation.
> >
> > Fixes: d52268a8b24b ("ethdev: expose device states")
> >
> > Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Gaetan Rivet <gaetan.rivet@6wind.com>
> > ---
> > lib/librte_ether/rte_ethdev.h | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/lib/librte_ether/rte_ethdev.h
> > b/lib/librte_ether/rte_ethdev.h index d07253874..2d1bc12aa 100644
> > --- a/lib/librte_ether/rte_ethdev.h
> > +++ b/lib/librte_ether/rte_ethdev.h
> > @@ -1667,7 +1667,7 @@ struct rte_eth_dev {
> > * received packets before passing them to the driver for
> transmission.
> > */
> > struct rte_eth_rxtx_callback
> *pre_tx_burst_cbs[RTE_MAX_QUEUES_PER_PORT];
> > - enum rte_eth_dev_state state:8; /**< Flag indicating the port state
> */
> > + enum rte_eth_dev_state state; /**< Flag indicating the port state */
> > } __rte_cache_aligned;
> >
> > struct rte_eth_dev_sriov {
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dpdk-dev] [PATCH] ethdev: fix compilation issue with strict flags
2017-04-19 5:22 ` Shahaf Shuler
@ 2017-04-19 13:35 ` Thomas Monjalon
0 siblings, 0 replies; 5+ messages in thread
From: Thomas Monjalon @ 2017-04-19 13:35 UTC (permalink / raw)
To: Shahaf Shuler
Cc: dev, Van Haaren, Harry, Adrien Mazarguil, Nélio Laranjeiro,
Gaetan Rivet
19/04/2017 07:22, Shahaf Shuler:
> Hi,
> Any more comments on this commit? Could it be merged? Compilation is still
> failing..
> Thursday, April 13, 2017 12:36 PM, Van Haaren, Harry:
> > > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Shahaf Shuler
> > > Sent: Thursday, April 13, 2017 6:29 AM
> > > To: thomas.monjalon@6wind.com
> > > Cc: adrien.mazarguil@6wind.com; nelio.laranjeiro@6wind.com;
> > > dev@dpdk.org
> > > Subject: [dpdk-dev] [PATCH] ethdev: fix compilation issue with strict
> > > flags
> > >
> > > Compilation error seen while compiling mlx5 in debug mode under RHEL
> > > 7.3:
> > >
> > > rte_ethdev.h:1670:7: error: type of bit-field 'state' is a GCC extension
> > >
> > > [-Werror=pedantic]
> > >
> > > Address it by removing the unnecessary bit-field width limitation.
> > >
> > > Fixes: d52268a8b24b ("ethdev: expose device states")
> > >
> > > Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
>
> Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
> Acked-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Applied, thanks
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2017-04-19 13:35 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-13 5:29 [dpdk-dev] [PATCH] ethdev: fix compilation issue with strict flags Shahaf Shuler
2017-04-13 8:29 ` Gaëtan Rivet
2017-04-13 9:36 ` Van Haaren, Harry
2017-04-19 5:22 ` Shahaf Shuler
2017-04-19 13:35 ` Thomas Monjalon
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).