On Mon, Jul 5, 2021 at 12:08 PM Lorenzo Bianconi
<[email protected]> wrote:
>
> Move snat_type out of vip loop in build_lrouter_lb_flows() since there
> is not vip dependency
>
> Acked-by: Dumitru Ceara <[email protected]>
> Signed-off-by: Lorenzo Bianconi <[email protected]>
Thanks. I applied this patch to the main branch.
Numan
> ---
> northd/ovn-northd.c | 14 +++++---------
> 1 file changed, 5 insertions(+), 9 deletions(-)
>
> diff --git a/northd/ovn-northd.c b/northd/ovn-northd.c
> index 83746f4ab..ccc3470bb 100644
> --- a/northd/ovn-northd.c
> +++ b/northd/ovn-northd.c
> @@ -8867,10 +8867,13 @@ build_lrouter_lb_flows(struct hmap *lflows, struct
> ovn_datapath *od,
> ovn_northd_lb_find(lbs, &nb_lb->header_.uuid);
> ovs_assert(lb);
>
> - bool lb_skip_snat = smap_get_bool(&nb_lb->options, "skip_snat",
> false);
> - if (lb_skip_snat) {
> + enum lb_snat_type snat_type = NO_FORCE_SNAT;
> + if (smap_get_bool(&nb_lb->options, "skip_snat", false)) {
> ovn_lflow_add(lflows, od, S_ROUTER_OUT_SNAT, 120,
> "flags.skip_snat_for_lb == 1 && ip", "next;");
> + snat_type = SKIP_SNAT;
> + } else if (lb_force_snat_ip || od->lb_force_snat_router_ip) {
> + snat_type = FORCE_SNAT;
> }
>
> for (size_t j = 0; j < lb->n_vips; j++) {
> @@ -8934,13 +8937,6 @@ build_lrouter_lb_flows(struct hmap *lflows, struct
> ovn_datapath *od,
> ds_put_format(match, " && is_chassis_resident(%s)",
> od->l3redirect_port->json_key);
> }
> -
> - enum lb_snat_type snat_type = NO_FORCE_SNAT;
> - if (lb_skip_snat) {
> - snat_type = SKIP_SNAT;
> - } else if (lb_force_snat_ip || od->lb_force_snat_router_ip) {
> - snat_type = FORCE_SNAT;
> - }
> add_router_lb_flow(lflows, od, match, actions, prio,
> snat_type, lb_vip, proto, nb_lb,
> meter_groups, nat_entries);
> --
> 2.31.1
>
> _______________________________________________
> 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