mbuf: fix C++ compatibility by making sched struct visible
authorHarry van Haaren <harry.van.haaren@intel.com>
Fri, 11 Jan 2019 11:32:39 +0000 (11:32 +0000)
committerThomas Monjalon <thomas@monjalon.net>
Mon, 14 Jan 2019 15:03:28 +0000 (16:03 +0100)
commit6af649a44c4ccc6a830bab2d6c928776b99b934c
tree859e9d6265829e09987ba32a2a6825ef3549475b
parentba07193e0343680ae5665efd45ecc41c0ec0059d
mbuf: fix C++ compatibility by making sched struct visible

Although C compilation works with the struct rte_mbuf_sched
declared inside the struct rte_mbuf namespace, C++ fails to
compile. This fix moves the rte_mbuf_sched struct up to the
global namespace, instead of declaring it inside the struct
mbuf namespace.

The struct rte_mbuf_sched is being used on the stack in
rte_mbuf_sched_get() and as a cast in _set(). For this
reason, it must be exposed as an available type.

Fixes: 5d3f72100904 ("mbuf: implement generic format for sched field")

Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
lib/librte_mbuf/rte_mbuf.h