[Pkg-dpdk-devel] Build error of OVS 2.8.1 on new DPDK 17.11
Luca Boccassi
luca.boccassi at gmail.com
Mon Nov 20 11:24:08 UTC 2017
On Mon, 2017-11-20 at 11:51 +0100, Christian Ehrhardt wrote:
> On Mon, Nov 20, 2017 at 11:18 AM, Christian Ehrhardt
> <christian.ehrhardt at canonical.com> wrote:
> [...]
> >
> > As a side note we might need [2] for DPDK 17.11 there which isn't
> > released yet.
> > Setting James on CC for that one FYI.
>
> While git tag --contains didn't show it it is already applied in
> 2.8.1
> so forget this part - sorry for the noise.
> But the type changes are still something to fix.
>
>
> > [1]: https://github.com/openvswitch/ovs/commit/bb37956ac0067beaa338
> > 282d34bd6654b4cdde7c
> > [2]: https://github.com/openvswitch/ovs/commit/fc56f5e0f5fa2e185430
> > a2c90df06d06b677bbd5
> > [3]: http://dpdk.org/browse/dpdk/commit/?id=f8244c6399d9fae6afab677
> > 0ae367aef38742ea5
Hi,
Yes that API change was a bit of a pain. I use this autoconf snippet in
our application, feel free to nick it:
CFLAGS_BACK=$CFLAGS
CFLAGS+=" $DPDK_CFLAGS -Werror"
AC_MSG_CHECKING([whether DPDK's port IDs are uint16_t])
AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM(
[[
#include <rte_ethdev.h>
int foo(uint16_t a, enum rte_eth_event_type b, void *c, void *d)
{
return 0;
}
]],
[[
rte_eth_dev_callback_register(0, 0, foo, NULL);
]])
],[
AC_MSG_RESULT([yes])
AC_DEFINE(HAVE_RTE_PORT_ID_16_BITS, [1],
[whether DPDK's port IDs are uint16_t])
],[
AC_MSG_RESULT([no])
])
CFLAGS=$CFLAGS_BACK
And then you can ifdef based on HAVE_RTE_PORT_ID_16_BITS in the code
and set the type accordingly
Other changes that might hit you are the need to include rte_bus_pci.h
when using the rte_pci_device struct, which moved there, I use this
autoconf check:
CFLAGS_BACK=$CFLAGS
CFLAGS+=" $DPDK_CFLAGS -Werror"
AC_CHECK_HEADERS(rte_bus_pci.h)
CFLAGS=$CFLAGS_BACK
And then ifdef HAVE_RTE_BUS_PCI_H
--
Kind regards,
Luca Boccassi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: This is a digitally signed message part
URL: <http://lists.alioth.debian.org/pipermail/pkg-dpdk-devel/attachments/20171120/4b30e76a/attachment.sig>
More information about the Pkg-dpdk-devel
mailing list