[ovs-dev] [PATCH 1/8] acinclude.m4: Support Linux kernel 4.12

Joe Stringer joe at ovn.org
Fri Jul 21 18:41:31 UTC 2017


On 19 July 2017 at 13:57, Greg Rose <gvrose8192 at gmail.com> wrote:
> Allow datapath kernel modules to be configured and built for kernels up
> to 4.12.
>
> Adds a new define for the kernel compatibility layer to indicate whether
> upstream commit cf124db566e6 ("net: Fix inconsistent teardown and release
> of private netdev state.") is present.
>
> Adds a new define for the kernel compatibility layer to indicate whether
> upstream commit dc5321d79697 ("vxlan: get rid of redundant vxlan_dev.flags")
> is present.
>
> Adds a new define for the kernel compatibility layer to indicate whether
> upstream commit d91fc59cd77c ("netfilter: introduce nf_conntrack_helper_put
> helper function") is present.
>
> Signed-off-by: Greg Rose <gvrose8192 at gmail.com>
> ---
>  acinclude.m4 | 11 ++++++++++-
>  1 file changed, 10 insertions(+), 1 deletion(-)
>
> diff --git a/acinclude.m4 b/acinclude.m4
> index e7affc5..0be7a63 100644
> --- a/acinclude.m4
> +++ b/acinclude.m4
> @@ -143,7 +143,7 @@ AC_DEFUN([OVS_CHECK_LINUX], [
>      AC_MSG_RESULT([$kversion])
>
>      if test "$version" -ge 4; then
> -       if test "$version" = 4 && test "$patchlevel" -le 11; then
> +       if test "$version" = 4 && test "$patchlevel" -le 12; then
>            : # Linux 4.x
>         else
>            AC_ERROR([Linux kernel in $KBUILD is version $kversion, but version newer than 4.11.x is not supported (please refer to the FAQ for advice)])
> @@ -748,6 +748,15 @@ AC_DEFUN([OVS_CHECK_LINUX_COMPAT], [
>                          [OVS_DEFINE([HAVE_DEFRAG_ENABLE_TAKES_NET])])
>    OVS_GREP_IFELSE([$KSRC/include/net/genetlink.h], [family_list],
>                          [OVS_DEFINE([HAVE_GENL_FAMILY_LIST])])
> +  OVS_FIND_FIELD_IFELSE([$KSRC/include/linux/netdevice.h], [net_device],
> +                        [needs_free_netdev],
> +                        [OVS_DEFINE([HAVE_NEEDS_FREE_NETDEV])])
> +  OVS_FIND_FIELD_IFELSE([$KSRC/include/net/vxlan.h], [vxlan_dev],
> +                        [cfg],
> +                        [OVS_DEFINE([HAVE_VXLAN_DEV_CFG])])
> +  OVS_GREP_IFELSE([$KSRC/include/net/netfilter/nf_conntrack_helper.h],
> +                  [nf_conntrack_helper_put],
> +                  [OVS_DEFINE([HAVE_NF_CONNTRACK_HELPER_PUT])])

Hi Greg, thanks for posting this series.

Usually we introduce these macros with the patch that uses the macro.
That way, in future if we need to delete them, it is easy to look at
the git logs and understand which commit introduced the usage and, for
instance, figure out which kernel patch (and therefore kernel version)
that it applies to.

As discussed offline, I had a couple of extra patches to add to this
series so I may as well apply this feedback. I'll post an updated
series from this, thanks.


More information about the dev mailing list