On Mon, 21 Jan 2019 19:17:58 +0000, gvrose8...@gmail.com wrote in E-mail "Re: [ovs-discuss] About ovs_vport_init() error":
> > datapath/vport.c ovs_vport_init() > > > > err = ip6gre_init(); > > if (err && err != -EEXIST) { > > goto err_ip6gre; <========== > > } else { > > if (err == -EEXIST) { > > pr_warn("IPv6 GRE/ERSPAN Rx mode is not supported\n"); > > goto skip_ip6_tunnel_init; > > } > > } > > > > datapath/linux/compat/ip6_gre.c rpl_ip6gre_init(): > > > > err = inet6_add_protocol(&ip6gre_protocol, IPPROTO_GRE); > > if (err < 0) { > > pr_info("%s: can't add protocol\n", __func__); <========== > > unregister_pernet_device(&ip6gre_net_ops); > > goto ip6_gre_loaded; > > } > > > > I checked net/ipv6/protocol.c and understand that when > > inet6_add_protocol() failed it returns -1 (same to -EPERM) instead of > > -EEXIT. > > > > Is it needed checking if err is -EEXIT at ovs_vport_init() ? > > That's -EEXIST. Sorry, I spelled it wrong. > It looks to me like you have the gre and ip6_gre kernel > modules already loaded. Try unloading those first. Thank you for your advise. I'll try it. > Yes, special handling is required in that case. However I think that inet6_add_protocol() never return -EEXIST so I think that this special handling won't work. (It looks that inet6_add_protocol() returns only 0 or -1) int inet6_add_protocol(const struct inet6_protocol *prot, unsigned char protocol) { return !cmpxchg((const struct inet6_protocol **)&inet6_protos[protocol], NULL, prot) ? 0 : -1; } Thanks, -- Ken Ajiro _______________________________________________ discuss mailing list disc...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-discuss