[ovs-dev] [PATCH 4/7] datapath: Fix conntrack_count related compilation errors

Yi-Hung Wei yihung.wei at gmail.com
Wed May 8 21:18:21 UTC 2019


On Wed, May 8, 2019 at 1:44 PM Gregory Rose <gvrose8192 at gmail.com> wrote:
> On 5/6/2019 2:56 PM, Yifeng Sun wrote:
> > This patch fixes the compilation errors of OVS on 4.19+ kernels.
> >
> > Signed-off-by: Yifeng Sun <pkusunyifeng at gmail.com>
> > ---
> >   datapath/linux/compat/include/net/netfilter/nf_conntrack_count.h | 4 ++--
> >   datapath/linux/compat/nf_conncount.c                             | 6 +++++-
> >   2 files changed, 7 insertions(+), 3 deletions(-)
> >
> > diff --git a/datapath/linux/compat/include/net/netfilter/nf_conntrack_count.h b/datapath/linux/compat/include/net/netfilter/nf_conntrack_count.h
> > index fd536f3e1854..614017309efe 100644
> > --- a/datapath/linux/compat/include/net/netfilter/nf_conntrack_count.h
> > +++ b/datapath/linux/compat/include/net/netfilter/nf_conntrack_count.h
> > @@ -2,6 +2,8 @@
> >   #define _NF_CONNTRACK_COUNT_WRAPPER_H
> >
> >   #include <linux/list.h>
> > +#include <net/netfilter/nf_conntrack_tuple.h>
> > +#include <net/netfilter/nf_conntrack_zones.h>
> >
> >   #ifdef HAVE_UPSTREAM_NF_CONNCOUNT
> >   #include_next <net/netfilter/nf_conntrack_count.h>
> > @@ -16,8 +18,6 @@ static inline void rpl_nf_conncount_modexit(void)
> >   }
> >
> >   #else
> > -#include <net/netfilter/nf_conntrack_tuple.h>
> > -#include <net/netfilter/nf_conntrack_zones.h>
> >   #define CONFIG_NETFILTER_CONNCOUNT 1
> >   struct nf_conncount_data;
> >
> > diff --git a/datapath/linux/compat/nf_conncount.c b/datapath/linux/compat/nf_conncount.c
> > index 0bee96274b00..eeae440f872d 100644
> > --- a/datapath/linux/compat/nf_conncount.c
> > +++ b/datapath/linux/compat/nf_conncount.c
> > @@ -13,6 +13,8 @@
> >    *          only ignore TIME_WAIT or gone connections
> >    *   (C) CC Computer Consultants GmbH, 2007
> >    */
> > +#ifndef HAVE_UPSTREAM_NF_CONNCOUNT
> > +
> >   #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
> >   #include <linux/in.h>
> >   #include <linux/in6.h>
> > @@ -138,7 +140,7 @@ static bool conn_free(struct nf_conncount_list *list,
> >
> >       if (list->count == 0) {
> >               spin_unlock(&list->list_lock);
> > -                return free_entry;
> > +             return free_entry;
> >       }
>
> Normally I don't like formatting fixups included with functional patches
> but since this is a backport I guess
> we can overlook it.  Unless someone else objects..
>
> - Greg
Other than what Greg pointed out (I am ok with the format fix, and I
am actually the one who put the extra space :p). In general, this
patch looks good to me.

Acked-by: Yi-Hung Wei <yihung.wei at gmail.com>


More information about the dev mailing list