patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Raslan Darawsheh <>
Subject: [dpdk-stable] [PATCH v2] net: fix compilation with pedantic enabled
Date: Tue, 21 Jul 2020 11:31:55 +0300
Message-ID: <> (raw)
In-Reply-To: <>

when trying to compile rte_mpls with pedantic enabled,
on old compilers like 4.8 it will complain about bit field definition.

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 by adding extension to the header

Fixes: e480cf487a0d ("net: add MPLS header structure")

Signed-off-by: Raslan Darawsheh <>
v2: fixed commit log spelling issue
    added reference to old compilers where it fail.
    change the implementation from changing the type of the bit fields
    to adding __extension__ to the header definition
 lib/librte_net/rte_mpls.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/librte_net/rte_mpls.h b/lib/librte_net/rte_mpls.h
index db91707..3e8cb90 100644
--- a/lib/librte_net/rte_mpls.h
+++ b/lib/librte_net/rte_mpls.h
@@ -21,6 +21,7 @@ extern "C" {
  * MPLS header.
 struct rte_mpls_hdr {
 	uint16_t tag_msb;   /**< Label(msb). */

  parent reply	other threads:[~2020-07-21  8:32 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-16 12:12 [dpdk-stable] [PATCH] " 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 ` Raslan Darawsheh [this message]
2020-07-21 15:43   ` [dpdk-stable] [PATCH v2] " Ferruh Yigit

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

patches for DPDK stable branches

This inbox may be cloned and mirrored by anyone:

	git clone --mirror stable/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 stable stable/ \
	public-inbox-index stable

Example config snippet for mirrors.
Newsgroup available over NNTP:

AGPL code for this site: git clone