[ovs-dev] [PATCH] datapath: Print friendly error message when conntrack fails to init

Yifeng Sun pkusunyifeng at gmail.com
Fri Jul 19 17:55:11 UTC 2019


Ok, I will do that. Thanks for reviewing.
Yifeng

On Fri, Jul 19, 2019 at 9:10 AM Gregory Rose <gvrose8192 at gmail.com> wrote:
>
> On 7/18/2019 6:43 PM, Yifeng Sun wrote:
> > On 4.14 kernels, if kernel isn't configured with CONFIG_NF_CONNTRACK_IPV4
> > and CONFIG_NF_CONNTRACK_IPV6, openvswitch module will fail to load. The
> > error message is "openvswitch: failed to init nf_conncount -91".
> >
> > This patch prints helpful error message for this case.
> >
> > Signed-off-by: Yifeng Sun <pkusunyifeng at gmail.com>
> > ---
> >   datapath/conntrack.c | 4 ++++
> >   1 file changed, 4 insertions(+)
> >
> > diff --git a/datapath/conntrack.c b/datapath/conntrack.c
> > index 292febb3c83e..ca56428cd78b 100644
> > --- a/datapath/conntrack.c
> > +++ b/datapath/conntrack.c
> > @@ -1864,6 +1864,10 @@ static int ovs_ct_limit_init(struct net *net, struct ovs_net *ovs_net)
> >               kfree(ovs_net->ct_limit_info->limits);
> >               kfree(ovs_net->ct_limit_info);
> >               pr_err("openvswitch: failed to init nf_conncount %d\n", err);
> > +             if (err == -EPROTOTYPE) {
> > +                     pr_err("openvswitch: probably your kernel isn't configured with "
> > +                                "CONFIG_NF_CONNTRACK_IPV4 and CONFIG_NF_CONNTRACK_IPV6.\n");
> > +             }
> >               return err;
> >       }
> >       return 0;
>
> Hi Yifeng,
>
> I think this patch is fine but I would prefer you post it to netdev
> first and then after accepted there we can backport to our Out of Tree
> drivers here.
>
> Thanks,
>
> - Greg


More information about the dev mailing list