Skip to content

Commit

Permalink
datapath: Fix compiling error for 4.14.111+ kernel
Browse files Browse the repository at this point in the history
Acked-by: Yi-Hung Wei <yihung.wei@gmail.com>
Tested-by: Greg Rose <gvrose8192@gmail.com>
Reviewed-by: Greg Rose <gvrose8192@gmail.com>
Fixes: f724694 ("datapath: meter: Use struct_size() in kzalloc()")
Signed-off-by: Yifeng Sun <pkusunyifeng@gmail.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
  • Loading branch information
yifsun authored and blp committed Apr 28, 2019
1 parent b0b950c commit 8f6d230
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions acinclude.m4
Expand Up @@ -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],
Expand Down
4 changes: 2 additions & 2 deletions 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
Expand Down Expand Up @@ -310,4 +310,4 @@ static inline __must_check size_t __ab_c_size(size_t n, size_t size, size_t c)
sizeof(*(p)))

#endif /* __LINUX_OVERFLOW_H */
#endif /* HAVE_OVERFLOW_H */
#endif /* defined(HAVE_OVERFLOW_H) && defined(HAVE_STRUCT_SIZE) */
1 change: 1 addition & 0 deletions datapath/meter.c
Expand Up @@ -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>

Expand Down

0 comments on commit 8f6d230

Please sign in to comment.