The RTPROT_OVN value has been merged to the net-next tree [1]. Until it is available on all systems ovs forward declares this value.
This allows us to drop the definition of the value from OVN. [1]: https://web.git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git/commit/?id=6002850fdfe0b4343136670a9895b6ba4ee3285b Signed-off-by: Felix Huettner <felix.huettner@stackit.cloud> --- controller/route-exchange-netlink.h | 10 +++++----- m4/ovn.m4 | 6 ++++++ ovs | 2 +- 4 files changed, 12 insertions(+), 6 deletions(-) diff --git a/controller/route-exchange-netlink.h b/controller/route-exchange-netlink.h index 1eadde491..aa472b5f8 100644 --- a/controller/route-exchange-netlink.h +++ b/controller/route-exchange-netlink.h @@ -22,12 +22,12 @@ #include "openvswitch/list.h" #include <netinet/in.h> #include <net/if.h> +#include <linux/rtnetlink.h> -/* This value is arbitrary but currently unused. - * See the kernel rtnetlink UAPI at - * https://github.com/torvalds/linux/blob/master/include/uapi/linux/rtnetlink.h - * */ -#define RTPROT_OVN 84 +/* RTPROT_OVN is defined in the kernel rtnetlink.h and forward declared in the + * OVS submodule. While the value should always be 84 we validate this here as + * tests will fail if that value ever changes. */ +BUILD_ASSERT_DECL(RTPROT_OVN == 84); struct in6_addr; struct hmap; diff --git a/m4/ovn.m4 b/m4/ovn.m4 index 8ccc1629e..afa042f53 100644 --- a/m4/ovn.m4 +++ b/m4/ovn.m4 @@ -584,4 +584,10 @@ AC_DEFUN([OVS_CHECK_LINUX_NETLINK], [ ])], [AC_DEFINE([HAVE_NLA_BITFIELD32], [1], [Define to 1 if struct nla_bitfield32 is available.])]) + AC_COMPILE_IFELSE([ + AC_LANG_PROGRAM([#include <linux/rtnetlink.h>], [ + int x = RTPROT_OVN; + ])], + [AC_DEFINE([HAVE_RTPROT_OVN], [1], + [Define to 1 if RTPROT_OVN is available.])]) ]) diff --git a/ovs b/ovs index 400db9746..db49289d0 160000 --- a/ovs +++ b/ovs @@ -1 +1 @@ -Subproject commit 400db974617abe5330a726c2c1e15f9a9efd849a +Subproject commit db49289d044bbfc4ad869bf2f1a43d8604f8f701 -- 2.48.1 _______________________________________________ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev