On 12/21/2015 08:13 PM, Russell Bryant wrote: > On 12/21/2015 09:27 AM, Numan Siddique wrote: >> Instead add only if >> - the port is up or >> - if port type is router >> >> Signed-off-by: Numan Siddique <nusid...@redhat.com> >> --- >> ovn/northd/ovn-northd.c | 15 +++++++++++++++ >> 1 file changed, 15 insertions(+) >> >> diff --git a/ovn/northd/ovn-northd.c b/ovn/northd/ovn-northd.c >> index 270b116..3d4ce78 100644 >> --- a/ovn/northd/ovn-northd.c >> +++ b/ovn/northd/ovn-northd.c >> @@ -951,6 +951,12 @@ lport_is_enabled(const struct nbrec_logical_port *lport) >> } >> >> static bool >> +lport_is_up(const struct nbrec_logical_port *lport) >> +{ >> + return !lport->up || *lport->up; >> +} >> + >> +static bool >> has_stateful_acl(struct ovn_datapath *od) >> { >> for (size_t i = 0; i < od->nbs->n_acls; i++) { >> @@ -1152,6 +1158,15 @@ build_lswitch_flows(struct hmap *datapaths, struct >> hmap *ports, >> continue; >> } >> >> + /* >> + * Add ARP reply flows if either the >> + * - port is up or >> + * - port type is router >> + */ >> + if (!lport_is_up(op->nbs) && strcmp(op->nbs->type, "router")) { >> + continue; >> + } >> + >> for (size_t i = 0; i < op->nbs->n_addresses; i++) { >> struct eth_addr ea; >> ovs_be32 ip; >> > What problem are you addressing here? It seems we would want the flows > created, even when the port is not up yet. Otherwise, when the port > does come up, ovn-controller has an incomplete logical flow table. I > think the logical flow table should be independent of port state and > location. > > Thanks, > Presently when I create a port (neutron port-create) , i can get response to arping for the port ip, even if it is not bound to any VM. I thought of addressing this trivial problem. As soon as the port does come up, northd would add the necessary ARP reply logical flow. But I get your point now.
Thanks Numan _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev