Message ID | 1500497833-30066-2-git-send-email-gvrose8192@gmail.com |
---|---|
State | Superseded |
Delegated to: | Joe Stringer |
Headers | show |
On 19 July 2017 at 13:57, Greg Rose <gvrose8192@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@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.
Sure thing. Thanks Joe! On Fri, Jul 21, 2017 at 11:41 AM, Joe Stringer <joe@ovn.org> wrote: > On 19 July 2017 at 13:57, Greg Rose <gvrose8192@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@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.
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])]) if cmp -s datapath/linux/kcompat.h.new \ datapath/linux/kcompat.h >/dev/null 2>&1; then
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@gmail.com> --- acinclude.m4 | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-)