[ovs-discuss] ovs route refresh problem

Yinpeijun yinpeijun at huawei.com
Sun Feb 11 07:27:34 UTC 2018

Hi all
                Recently , I run a test two VM commulication with vxlan and ovs+dpdk networking(ovs2.7.2). when I add 200 virtual device on the physical service  of
the commulicate vm then check the ping result,  there  is  loss packet statistics. Then I use vlan and ovs+dpdk networking, do the same thing , there is no loss
packets statistics.
                I read the source code and add some log to confirm the problem,  the final problem I think is unreasonable routing refresh,  in route_table_rest function
delete all items before readding, so in the middle of the interval  ovs_router_lookup  can not find the route then cause packet drop.  So I think the implementation
need to optimize, Any advice on how to optimize it?

                static int
    int i = 0;
    struct nl_dump dump;
    struct rtgenmsg *rtmsg;
    uint64_t reply_stub[NL_DUMP_BUFSIZE / 8];
    struct ofpbuf request, reply, buf;

    route_map_clear(); // clear all route before add
                while (nl_dump_next(&dump, &reply, &buf)) {
                            struct route_table_msg msg;

                            if (route_table_parse(&reply, &msg)) {
                                            route_table_handle_msg(&msg); // add route

ping -i 0.01

for((i=1 ; i <201 ; i++));
    ip netns add vm$i
ip link add p$i  type veth peer name vp$i
ifconfig vp$i  up
    ip link set p$i  netns vm$i

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openvswitch.org/pipermail/ovs-discuss/attachments/20180211/50d57406/attachment.html>

More information about the discuss mailing list