@@ -713,7 +713,9 @@ AC_DEFUN([OVS_CHECK_LINUX_COMPAT], [
OVS_GREP_IFELSE([$KSRC/include/net/netfilter/nf_nat.h], [nf_nat_range2])
OVS_GREP_IFELSE([$KSRC/include/net/netfilter/nf_conntrack_seqadj.h], [nf_ct_seq_adjust])
OVS_GREP_IFELSE([$KSRC/include/net/netfilter/nf_conntrack_count.h], [nf_conncount_gc_list],
- [OVS_DEFINE([HAVE_UPSTREAM_NF_CONNCOUNT])])
+ [OVS_GREP_IFELSE([$KSRC/include/net/netfilter/nf_conntrack_count.h],
+ [int nf_conncount_add],
+ [], [OVS_DEFINE([HAVE_UPSTREAM_NF_CONNCOUNT])])])
OVS_GREP_IFELSE([$KSRC/include/linux/random.h], [prandom_u32])
OVS_GREP_IFELSE([$KSRC/include/linux/random.h], [prandom_u32_max])
In upstream kernel, there are several critical bug fixes for nf_conncount between 5c789e1 ("netfilter: nf_conncount: Add list lock and gc worker, and RCU for init tree search") and c78e781 ("netfilter: nf_conncount: replace CONNCOUNT_LOCK_SLOTS with CONNCOUNT_SLOTS"). This fixes are already backported to OVS datapath. This patch helps OVS datapath to always choose bug-fixed nf_conncount code. If kernel already has these fixes, then kernel's nf_conncount is being used. Otherwise, OVS falls back to use compat nf_conncount functions. This patch is suggested by YiHung Wei. Signed-off-by: Yifeng Sun <pkusunyifeng@gmail.com> --- acinclude.m4 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)