[ovs-dev] ovs route synchronize bug in master branch

Mike glovejmm at 163.com
Mon Jul 20 01:12:51 UTC 2020


my fullmame
Zheng Jingzhou


| |
Mike
邮箱:glovejmm at 163.com
|

Signature is customized by Netease Mail Master

On 07/20/2020 09:09, Mike wrote:
my fullname 
Zheng Jingzhou


| |
Mike
邮箱:glovejmm at 163.com
|

Signature is customized by Netease Mail Master

On 07/19/2020 22:26, Ilya Maximets wrote:
On 7/19/20 10:56 AM, Mike wrote:
> Here is the testcase,eth0 is a netcard not added in ovs
> OVS2.7.3:
> 1. ifconfig eth0 11.1
> ovs-appctl ovs/route/show
>
>
> A new route synchronized from kernel route table
> Cached: 11.0.0.1/32 dev eth0 SRC 11.0.0.1 local
>
>
> 2. ifconfig eth0 0
> ovs-appctl ovs/route/show
> the new route entry is deleted
>
>
> But In OVS 2.13.X and master branch
> 1. ifconfig eth0 11.1
> ovs-appctl ovs/route/show
>
>
> A new route synchronized from kernel route table
> Cached: 11.0.0.1/32 dev eth0 SRC 11.0.0.1 local
>
>
> 2. ifconfig eth0 0
> ovs-appctl ovs/route/show
> the new route entry is still in ovs route table
> Cached: 11.0.0.1/32 dev eth0 SRC 11.0.0.1 local
>
>
> The code has changed in function
> void
> ovs_router_insert(uint32_t mark, const struct in6_addr *ip_dst, uint8_t plen,
>                   bool local, const char output_bridge[],
>                   const struct in6_addr *gw)
> {
>     if (use_system_routing_table) {
>         uint8_t priority = local ? plen + 64 : plen; //// added in new branch, which is none in 2.7.3
>         ovs_router_insert__(mark, priority, local, ip_dst, plen, output_bridge, gw);
>     }
> }
>
>
>
> So it won't be flushed for
> void
> ovs_router_flush(void)
> {
>     struct ovs_router_entry *rt;
>     ovs_mutex_lock(&mutex);
>     classifier_defer(&cls);
>     CLS_FOR_EACH(rt, cr, &cls) {
>         if (rt->priority == rt->plen) { //// new entry with different plen and priority, won't be flushed
>             rt_entry_delete__(&rt->cr);
>         }
>     }
>     classifier_publish(&cls);
>     ovs_mutex_unlock(&mutex);
>     seq_change(tnl_conf_seq);
> }
>
>
>
> It seeds like caused by some issure fix, is it a new bug?

Thanks for the detailed report!

This definitely looks like a bug for me.  I've sent a fix here:
https://patchwork.ozlabs.org/project/openvswitch/patch/20200719141509.3129129-1-i.maximets@ovn.org/

Could you, please, check it out?

BTW, if you'll provide your full name, I will add you to the
list of people who provided helpful bug reports in AUTHORS.rst.

Best regards, Ilya Maximets.


More information about the dev mailing list