Hi Dumitru,

Thanks for the review. I have added the v2 patch including the test
you mentioned.

https://patchwork.ozlabs.org/project/ovn/patch/[email protected]/


On Wed, Jul 8, 2026 at 3:22 PM Dumitru Ceara <[email protected]> wrote:
>
> On 7/7/26 9:09 PM, Amir Aslan Aslani wrote:
> > Currently, for non-LB NATs, northd generates ARP/ND response flows on
> > every router port even when the NAT's "gateway_port" field is set.
> >
> > When "gateway_port" field is specified on NAT record on NB, it could
> > be considered as reachable only through that LRP, so generating
> > response flows for other router ports is unnecessary.
> >
> > This patch skips flow generation for router ports that do not match
> > the NAT's "gateway_port".
> >
> > Signed-off-by: Amir Aslan Aslani <[email protected]>
> > ---
>
> Hi Amir,
>
> Thanks for the bug fix!
>
> >  northd/northd.c | 8 ++++++++
> >  1 file changed, 8 insertions(+)
> >
> > diff --git a/northd/northd.c b/northd/northd.c
> > index aecfb2ec6..432eeb97b 100644
> > --- a/northd/northd.c
> > +++ b/northd/northd.c
> > @@ -9830,6 +9830,10 @@ build_lswitch_rport_arp_req_flows_for_lbnats(
> >              continue;
> >          }
> >
> > +        if (nat->gateway_port && nat->gateway_port != op->nbrp) {
> > +            continue;
> > +        }
> > +
> >          /* Check if the ovn port has a network configured on which we could
> >           * expect ARP requests/NS for the DNAT external_ip.
> >           */
> > @@ -9870,6 +9874,10 @@ build_lswitch_rport_arp_req_flows_for_lbnats(
> >
> >          const struct nbrec_nat *nat = nat_entry->nb;
> >
> > +        if (nat->gateway_port && nat->gateway_port != op->nbrp) {
> > +            continue;
> > +        }
> > +
> >          /* Check if the ovn port has a network configured on which we could
> >           * expect ARP requests/NS for the SNAT external_ip.
> >           */
>
> On a first glance, this looks correct to me.  However, could you please
> also add an ovn-northd.at test that verifies that the unnecessary flows
> are not generated and include that in a v2 patch?
>
> Thanks,
> Dumitru
>
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to