[ovs-dev] [PATCH] Do not add ARP replies in the lswitch pipeline to all the lports
Russell Bryant
russell at ovn.org
Mon Dec 21 14:43:44 UTC 2015
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 <nusiddiq at 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,
--
Russell Bryant
More information about the dev
mailing list