Hi Felix,

Thanks for the patch!

On 12/18/24 11:25 AM, Felix Huettner via dev wrote:
> this allows the the ovn-controller to later find all ports that

Nit: This

Typo: "the the"

> participate in dynamic routing.
> 
> Signed-off-by: Felix Huettner <[email protected]>
> ---
>  northd/northd.c | 15 +++++++++++++++
>  ovn-nb.xml      | 23 +++++++++++++++++++++++
>  2 files changed, 38 insertions(+)
> 
> diff --git a/northd/northd.c b/northd/northd.c
> index c6344b48a..903ddf732 100644
> --- a/northd/northd.c
> +++ b/northd/northd.c
> @@ -4052,6 +4052,21 @@ sync_pb_for_lrp(struct ovn_port *op,
>          }
>      }
>  
> +    if (is_cr_port(op) || chassis_name) {
> +        if (smap_get_bool(&op->nbrp->options, "maintain-vrf", false)) {
> +            smap_add(&new, "maintain-vrf", "true");
> +        }
> +        if (smap_get_bool(&op->od->nbr->options, "dynamic-routing", false)) {
> +            smap_add(&new, "dynamic-routing", "true");
> +        }
> +        const char *ifname = smap_get(&op->nbrp->options,
> +                                      "dynamic-routing-ifname");
> +        if (ifname) {
> +            smap_add(&new, "dynamic-routing-ifname", ifname);
> +        }
> +    }
> +
> +
>      const char *ipv6_pd_list = smap_get(&op->sb->options, "ipv6_ra_pd_list");
>      if (ipv6_pd_list) {
>          smap_add(&new, "ipv6_ra_pd_list", ipv6_pd_list);
> diff --git a/ovn-nb.xml b/ovn-nb.xml
> index eb7ee72df..2726a2017 100644
> --- a/ovn-nb.xml
> +++ b/ovn-nb.xml
> @@ -3776,6 +3776,29 @@ or
>            </li>
>          </ul>
>        </column>
> +
> +      <column name="options" key="maintain-vrf" type='{"type": "boolean"}'>
> +        Only relevant if <ref column="options" key="dynamic-routing"
> +        table="Logical_Router"/> on the respective Logical_Router is set
> +          to <code>true</code>.
> +
> +          If this LRP is bound to a specific chassis then the ovn-controller 
> of
> +          this chassis will maintain a vrf named "ovnvrf" with the datapath 
> id

Should we make the name of the vrf this chassis maintains configurable
by the CMS?

> +          of the Logical Router appended to it.
> +          This vrf will contain all the routes that should be announced from
> +          this LRP.
> +      </column>
> +
> +      <column name="options" key="dynamic-routing-ifname"
> +          type='{"type": "string"}'>
> +        Only relevant if <ref column="options" key="dynamic-routing"
> +        table="Logical_Router"/> on the respective Logical_Router is set
> +          to <code>true</code>.
> +
> +          Only learn routes associated with the interface specified here.
> +          This allows a single chassis to learn different routes on separate
> +          LRPs bound to this chassis.
> +      </column>

We should probably mention these 2 options in the new "dynamic routing"
section in the NEWS file.

>      </group>
>  
>      <group title="Attachment">

It might be good to add some (simple) ovn-northd.at tests for this change.

Regards,
Dumitru


_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to