From d613fe10b3dbd9bd6d63f4e540291c9491726797 Mon Sep 17 00:00:00 2001 From: David Marchand Date: Wed, 23 Oct 2019 15:40:00 +0200 Subject: [PATCH] net: add rte prefix to MPLS structure Add 'rte_' prefix to structures: - rename struct mpls_hdr as struct rte_mpls_hdr. Cc: stable@dpdk.org Signed-off-by: David Marchand Reviewed-by: Ferruh Yigit --- doc/guides/rel_notes/release_19_11.rst | 2 ++ lib/librte_net/rte_mpls.h | 2 +- lib/librte_net/rte_net.c | 4 ++-- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/doc/guides/rel_notes/release_19_11.rst b/doc/guides/rel_notes/release_19_11.rst index 0e7613c85b..ceca95d0bf 100644 --- a/doc/guides/rel_notes/release_19_11.rst +++ b/doc/guides/rel_notes/release_19_11.rst @@ -278,6 +278,8 @@ API Changes * The network definitions of PPPoE ethertypes have been prefixed by ``RTE_``. +* The network structure for MPLS has been prefixed by ``rte_``. + * ethdev: changed ``rte_eth_dev_infos_get`` return value from ``void`` to ``int`` to provide a way to report various error conditions. diff --git a/lib/librte_net/rte_mpls.h b/lib/librte_net/rte_mpls.h index 11d26ba35d..32b6431219 100644 --- a/lib/librte_net/rte_mpls.h +++ b/lib/librte_net/rte_mpls.h @@ -21,7 +21,7 @@ extern "C" { /** * MPLS header. */ -struct mpls_hdr { +struct rte_mpls_hdr { uint16_t tag_msb; /**< Label(msb). */ #if RTE_BYTE_ORDER == RTE_BIG_ENDIAN uint8_t tag_lsb:4; /**< Label(lsb). */ diff --git a/lib/librte_net/rte_net.c b/lib/librte_net/rte_net.c index dfccbbf2ac..6f45b1339e 100644 --- a/lib/librte_net/rte_net.c +++ b/lib/librte_net/rte_net.c @@ -278,8 +278,8 @@ uint32_t rte_net_get_ptype(const struct rte_mbuf *m, } else if ((proto == rte_cpu_to_be_16(RTE_ETHER_TYPE_MPLS)) || (proto == rte_cpu_to_be_16(RTE_ETHER_TYPE_MPLSM))) { unsigned int i; - const struct mpls_hdr *mh; - struct mpls_hdr mh_copy; + const struct rte_mpls_hdr *mh; + struct rte_mpls_hdr mh_copy; #define MAX_MPLS_HDR 5 for (i = 0; i < MAX_MPLS_HDR; i++) { -- 2.20.1