Thanks, looks good to me. Reviewed-by: Yifeng Sun <pkusunyif...@gmail.com>
On Tue, Jan 22, 2019 at 3:45 PM Greg Rose <gvrose8...@gmail.com> wrote: > Our code to determine whether receive functionality will work with > ip6 gre depends on the return of -EEXIST but inet6_add_protocol() > returns a -1 on failure to grab the pointer via a cmpxchg op. Just > set the error return to -EEXIST to help out the vport init function. > > Reported-at: > https://mail.openvswitch.org/pipermail/ovs-discuss/2019-January/048090.html > Reported-by: Ken Ajiro <ken-aj...@xr.jp.nec.com> > Signed-off-by: Greg Rose <gvrose8...@gmail.com> > --- > datapath/linux/compat/ip6_gre.c | 7 +++++++ > 1 file changed, 7 insertions(+) > > diff --git a/datapath/linux/compat/ip6_gre.c > b/datapath/linux/compat/ip6_gre.c > index 1827852..2ffdda5 100644 > --- a/datapath/linux/compat/ip6_gre.c > +++ b/datapath/linux/compat/ip6_gre.c > @@ -2802,6 +2802,13 @@ int rpl_ip6gre_init(void) > if (err < 0) { > pr_info("%s: can't add protocol\n", __func__); > unregister_pernet_device(&ip6gre_net_ops); > + /* > + * inet6_add_protocol will return a -1 if it fails > + * to grab the pointer but the vport initialization > + * expects a return value of -EEXIST. Set err to > + * -EEXIST here to ensure proper handling. > + */ > + err = -EEXIST; > goto ip6_gre_loaded; > } > > -- > 1.8.3.1 > > _______________________________________________ > dev mailing list > d...@openvswitch.org > https://mail.openvswitch.org/mailman/listinfo/ovs-dev > _______________________________________________ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev