Thanks for the patch Russell,

Han Zhou comments make sense, I tested the patch manually and greatly
reduced the number of flows per chassis. I still need to test connectivity
more
thoroughly but tests seemed ok.

Best,
Miguel Ángel.

On Tue, Sep 19, 2017 at 2:45 AM, <[email protected]> wrote:

> I agree with  Han Zhou, This patch can reduce the flow to vswitchd, but
> can not reduce the flow calculation of ovn-controller. It may be better to
> move the check for
> local_lport_ids before the parse happens. Add a lport column in logical
> flow may be more efficient.
>
> Thanks.
>
>
>
>
> Han Zhou <[email protected]>
> 发件人: [email protected]
> 2017/09/19 07:31
>
>         收件人:        Russell Bryant <[email protected]>,
>         抄送:  "[email protected]" <[email protected]>, Miguel Angel
> Ajo Pelayo <[email protected]>
>         主题:  Re: [ovs-dev] [PATCH] ovn: Discard flows for non-local
> ports.
>
>
> Thanks Russell for the quick work!
>
> On Mon, Sep 18, 2017 at 8:24 AM, Russell Bryant <[email protected]> wrote:
>
> > @@ -301,6 +305,22 @@ consider_logical_flow(struct controller_ctx *ctx,
> >          if (m->match.wc.masks.conj_id) {
> >              m->match.flow.conj_id += *conj_id_ofs;
> >          }
> > +        if (is_switch(ldp)) {
> > +            unsigned int reg_index
> > +                = (ingress ? MFF_LOG_INPORT : MFF_LOG_OUTPORT) -
> MFF_REG0;
> > +            int64_t port_id = m->match.flow.regs[reg_index];
> > +            if (port_id) {
> > +                int64_t dp_id = lflow->logical_datapath->tunnel_key;
> > +                char buf[16];
> > +                snprintf(buf, sizeof(buf), "%"PRId64"_%"PRId64, dp_id,
> port_id);
> > +                if (!sset_contains(local_lport_ids, buf)) {
> > +                    //VLOG_INFO("Matching on port id %"PRId64" dp
> %"PRId64", is NOT local", port_id, dp_id);
> > +                    continue;
> > +                } else {
> > +                    //VLOG_INFO("Matching on port id %"PRId64" dp
> %"PRId64", is local", port_id, dp_id);
> > +                }
> > +            }
> > +        }
> >          if (!m->n) {
> >              ofctrl_add_flow(flow_table, ptable, lflow->priority,
> >                              lflow->header_.uuid.parts[0], &m->match,
> &ofpacts);
>
> I remember the expr_parse_string() is one of the biggest cost in
> ovn-controller, so I wonder would it be better to move the check for
> local_lport_ids before the parse happens, i.e. check against logical flows
> instead of ovs flows?
>
> Acked-by: Han Zhou <[email protected]>
> _______________________________________________
> dev mailing list
> [email protected]
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
>
>
> _______________________________________________
> dev mailing list
> [email protected]
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
>
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to