[ovs-dev] [PATCH 23/23] ovn: Implement basic logical L3 routing.

Han Zhou zhouhan at gmail.com
Fri Oct 16 06:49:13 UTC 2015


Hi Ben,

On Fri, Oct 9, 2015 at 9:21 PM, Ben Pfaff <blp at nicira.com> wrote:
> +    /* Connect logical router ports, and logical switch ports of type "router",
> +     * to their peers. */
> +    struct ovn_port *op;
> +    HMAP_FOR_EACH (op, key_node, ports) {

This seems not efficient. There are far more lswitch ports than router
ports and patch ports. Would it be better to have a separate index to
iterate routers ports and patch ports?

> +        /* ARP reply.  These flows reply to ARP requests for the router's own
> +         * IP address. */
> +        match = xasprintf(
> +            "inport == %s && arp.tha == "ETH_ADDR_FMT" && arp.op == 1",
> +            op->json_key, ETH_ADDR_ARGS(op->mac));

Should this be arp.tpa == "IP_FMT" ... ? Because I think we should
match router's IP instead of MAC here.


After all this is amazing code. Thanks Ben!


Han



More information about the dev mailing list