@@ -811,6 +811,10 @@ AC_DEFUN([OVS_CHECK_LINUX_COMPAT], [
OVS_GREP_IFELSE([$KSRC/include/linux/timekeeping.h],
[ktime_get_ns],
[OVS_DEFINE([HAVE_KTIME_GET_NS])])
+ OVS_GREP_IFELSE([$KSRC/include/net/inet_frag.h],
+ frag_percpu_counter_batch[],
+ [OVS_DEFINE([HAVE_FRAG_PERCPU_COUNTER_BATCH])])
+
if cmp -s datapath/linux/kcompat.h.new \
datapath/linux/kcompat.h >/dev/null 2>&1; then
@@ -30,7 +30,7 @@ static inline bool inet_frag_evicting(struct inet_frag_queue *q)
#endif
#ifndef HAVE_SUB_FRAG_MEM_LIMIT_ARG_STRUCT_NETNS_FRAGS
-#ifdef frag_percpu_counter_batch
+#ifdef HAVE_FRAG_PERCPU_COUNTER_BATCH
static inline void rpl_sub_frag_mem_limit(struct netns_frags *nf, int i)
{
__percpu_counter_add(&nf->mem, -i, frag_percpu_counter_batch);
frag_percpu_counter_batch is a variable, not a define, so checking if it is defined is an error and causes warning messages during compile on RHEL 7 (or other 3.10 based) builds. Use a compat #define from acinclude.m4 instead. Fixes: 64d8cb7295 ("compat:inet_frag.h: Check for frag_percpu_counter_batch") Signed-off-by: Greg Rose <gvrose8192@gmail.com> --- acinclude.m4 | 4 ++++ datapath/linux/compat/include/net/inet_frag.h | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-)