Thanks for the patch. It fixes an issue where overflow.h is there but the struct_size marco is not available.
Some minor comment. For the patch title, instead of having "Fix compiling error for latest Linux 4.14 kernel", maybe we can specify the minor version number say "4.14.111+ kernel) so that it is more clear on which kernel version this commit fix? In ./datapath/linux/compat/include/linux/overflow.h, there is a paring #endif. Should we update the comment over there as well? #endif /* HAVE_OVERFLOW_H */ Thanks, -Yi-Hung On Fri, Apr 26, 2019 at 1:39 PM Yifeng Sun <[email protected]> wrote: > > CC: Greg Rose <[email protected]> > Fixes: f72469405eec9 ("datapath: meter: Use struct_size() in kzalloc()") > Signed-off-by: Yifeng Sun <[email protected]> > --- > v1->v2: update 4.14.111 in travis by Greg's suggestion, thanks! > .travis.yml | 2 +- > acinclude.m4 | 2 ++ > datapath/linux/compat/include/linux/overflow.h | 2 +- > datapath/meter.c | 1 + > 4 files changed, 5 insertions(+), 2 deletions(-) > > diff --git a/.travis.yml b/.travis.yml > index 32d5f1918495..468c39ecd505 100644 > --- a/.travis.yml > +++ b/.travis.yml > @@ -39,7 +39,7 @@ env: > - KERNEL=4.17.19 > - KERNEL=4.16.18 > - KERNEL=4.15.18 > - - KERNEL=4.14.63 > + - KERNEL=4.14.111 > - KERNEL=4.9.149 > - KERNEL=4.4.148 > - KERNEL=3.19.8 > diff --git a/acinclude.m4 b/acinclude.m4 > index 301aeb70d82a..b532a4579266 100644 > --- a/acinclude.m4 > +++ b/acinclude.m4 > @@ -920,6 +920,8 @@ AC_DEFUN([OVS_CHECK_LINUX_COMPAT], [ > [OVS_DEFINE([HAVE_INET_FRAGS_RND])]) > OVS_GREP_IFELSE([$KSRC/include/linux/overflow.h], [__LINUX_OVERFLOW_H], > [OVS_DEFINE([HAVE_OVERFLOW_H])]) > + OVS_GREP_IFELSE([$KSRC/include/linux/overflow.h], [struct_size], > + [OVS_DEFINE([HAVE_STRUCT_SIZE])]) > OVS_GREP_IFELSE([$KSRC/include/linux/mm.h], [kvmalloc_array], > [OVS_DEFINE([HAVE_KVMALLOC_ARRAY])]) > OVS_GREP_IFELSE([$KSRC/include/linux/mm.h], [kvmalloc_node], > diff --git a/datapath/linux/compat/include/linux/overflow.h > b/datapath/linux/compat/include/linux/overflow.h > index ff84356db16c..8f1b5b005491 100644 > --- a/datapath/linux/compat/include/linux/overflow.h > +++ b/datapath/linux/compat/include/linux/overflow.h > @@ -1,5 +1,5 @@ > /* SPDX-License-Identifier: GPL-2.0 OR MIT */ > -#ifdef HAVE_OVERFLOW_H > +#if defined(HAVE_OVERFLOW_H) && defined(HAVE_STRUCT_SIZE) > #include_next <linux/overflow.h> > #else > #ifndef __LINUX_OVERFLOW_H > diff --git a/datapath/meter.c b/datapath/meter.c > index 51ec1495033a..eda14682fb96 100644 > --- a/datapath/meter.c > +++ b/datapath/meter.c > @@ -13,6 +13,7 @@ > #include <linux/ip.h> > #include <linux/kernel.h> > #include <linux/openvswitch.h> > +#include <linux/overflow.h> > #include <linux/netlink.h> > #include <linux/rculist.h> > > -- > 2.7.4 > > _______________________________________________ > dev mailing list > [email protected] > https://mail.openvswitch.org/mailman/listinfo/ovs-dev _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
