patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [PATCH] net: fix compilation with pedantic enabled
@ 2020-07-16 12:12 Raslan Darawsheh
  2020-07-21  0:05 ` [dpdk-stable] [dpdk-dev] " Ferruh Yigit
  2020-07-21  8:31 ` [dpdk-stable] [PATCH v2] " Raslan Darawsheh
  0 siblings, 2 replies; 8+ messages in thread
From: Raslan Darawsheh @ 2020-07-16 12:12 UTC (permalink / raw)
  To: dev; +Cc: olivier.matz, stable

when trying to compile rte_mpls with pedantic enabled,
it will complain about bit field defintion.
error: type of bit-field 'bs' is a GCC extension [-Werror=pedantic]
error: type of bit-field 'tc' is a GCC extension [-Werror=pedantic]
error: type of bit-field 'tag_lsb' is a GCC extension [-Werror=pedantic]

This fixes the compilation error.

Fixes: e480cf487a0d ("net: add MPLS header structure")
Cc: olivier.matz@6wind.com
Cc: stable@dpdk.org

Signed-off-by: Raslan Darawsheh <rasland@mellanox.com>
---
 lib/librte_net/rte_mpls.h | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/lib/librte_net/rte_mpls.h b/lib/librte_net/rte_mpls.h
index db91707..ecd1f64 100644
--- a/lib/librte_net/rte_mpls.h
+++ b/lib/librte_net/rte_mpls.h
@@ -24,13 +24,13 @@ extern "C" {
 struct rte_mpls_hdr {
 	uint16_t tag_msb;   /**< Label(msb). */
 #if RTE_BYTE_ORDER == RTE_BIG_ENDIAN
-	uint8_t tag_lsb:4;  /**< Label(lsb). */
-	uint8_t tc:3;       /**< Traffic class. */
-	uint8_t bs:1;       /**< Bottom of stack. */
+	uint32_t tag_lsb:4;  /**< Label(lsb). */
+	uint32_t tc:3;       /**< Traffic class. */
+	uint32_t bs:1;       /**< Bottom of stack. */
 #else
-	uint8_t bs:1;       /**< Bottom of stack. */
-	uint8_t tc:3;       /**< Traffic class. */
-	uint8_t tag_lsb:4;  /**< label(lsb) */
+	uint32_t bs:1;       /**< Bottom of stack. */
+	uint32_t tc:3;       /**< Traffic class. */
+	uint32_t tag_lsb:4;  /**< label(lsb) */
 #endif
 	uint8_t  ttl;       /**< Time to live. */
 } __rte_packed;
-- 
2.7.4


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

end of thread, other threads:[~2020-07-21 15:43 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-16 12:12 [dpdk-stable] [PATCH] net: fix compilation with pedantic enabled Raslan Darawsheh
2020-07-21  0:05 ` [dpdk-stable] [dpdk-dev] " Ferruh Yigit
2020-07-21  7:09   ` Olivier Matz
2020-07-21  7:37     ` Raslan Darawsheh
2020-07-21  7:50       ` Olivier Matz
2020-07-21  8:11         ` Raslan Darawsheh
2020-07-21  8:31 ` [dpdk-stable] [PATCH v2] " Raslan Darawsheh
2020-07-21 15:43   ` Ferruh Yigit

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