>
> The situation is a bit worse for kernel ports that are actually backed
> by separate kernel interfaces.  The main problem here are all the
> OVS_VPORT_CMD_GET syscalls that are made for each port separately as part
> of the OFPROTO_PORT_FOR_EACH() macro inside the main iteration in
> vswitchd/bridge.c:bridge_delete_or_reconfigure_ports().
> Addition of one internal port into a linux kernel datapath takes about
> 500ms at 5000 preexisting ports.  I suspect that if we change the logic
> to dump all the ports once instead of doing a separate syscall per port,
> this may be done noticeably faster, but I didn't try.
>

You man this macro?

#define OFPROTO_PORT_FOR_EACH(OFPROTO_PORT, DUMP, OFPROTO)  \
    for (ofproto_port_dump_start(DUMP, OFPROTO);            \
         (ofproto_port_dump_next(DUMP, OFPROTO_PORT)        \
          ? true                                            \
          : (ofproto_port_dump_done(DUMP), false));         \
        )

Looking at the dpif-netlink implementation of dump_start and dump_next I
don't see why this should generate one syscall per port.

AFAICS, only dpif_netlink_port_dump_start__ would send a
OVS_VPORT_CMD_GET syscall.
dpif_netlink_port_dump_next__ should just read from the buffer and maybe
call recv to fill in more data if the buffer is empty.

Am I missing something?

Thanks.
Adrián

_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to