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 <pkusunyif...@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;
-- 
2.7.4

_______________________________________________
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to