On Thu, Oct 9, 2025 at 5:48 PM Mairtin O'Loingsigh via dev <
[email protected]> wrote:

> Add type and nb_ic_uuid to Datapath_Binding adn Port_Binding
> so transit router and transit switch entries can be
> differentiated.
>
> Reported-at: https://issues.redhat.com/browse/FDP-1476
> Signed-off-by: Mairtin O'Loingsigh <[email protected]>
> ---
>

Hi Mairtin,

thank you for the v3. I have a couple of comments down below.


>  ovn-ic-nb.ovsschema | 32 +++++++++++++++++++--
>  ovn-ic-nb.xml       | 70 +++++++++++++++++++++++++++++++++++++++++++++
>  ovn-ic-sb.ovsschema | 23 +++++++++++++--
>  ovn-ic-sb.xml       | 18 ++++++++++++
>  4 files changed, 138 insertions(+), 5 deletions(-)
>
> diff --git a/ovn-ic-nb.ovsschema b/ovn-ic-nb.ovsschema
> index 8145b0335..8780ae8a2 100644
> --- a/ovn-ic-nb.ovsschema
> +++ b/ovn-ic-nb.ovsschema
> @@ -1,7 +1,7 @@
>  {
>      "name": "OVN_IC_Northbound",
> -    "version": "1.2.0",
> -    "cksum": "4176728051 3557",
> +    "version": "1.3.0",
> +    "cksum": "2777123154 4834",
>      "tables": {
>          "IC_NB_Global": {
>              "columns": {
> @@ -35,6 +35,34 @@
>                               "min": 0, "max": "unlimited"}}},
>              "isRoot": true,
>              "indexes": [["name"]]},
> +        "Transit_Router": {
> +            "columns": {
> +                "name": {"type": "string"},
> +                "other_config": {
> +                    "type": {"key": "string", "value": "string",
> +                             "min": 0, "max": "unlimited"}},
> +                "external_ids": {
> +                    "type": {"key": "string", "value": "string",
> +                             "min": 0, "max": "unlimited"}}},
> +            "isRoot": true,
> +            "indexes": [["name"]]},
>

It should also have ports referenced as LR in NB.
See below the justification.


> +        "Transit_Router_Port": {
> +            "columns": {
> +                "name": {"type": "string"},
> +                "other_config": {
> +                    "type": {"key": "string", "value": "string",
> +                             "min": 0, "max": "unlimited"}},
> +                "mac": {"type": "string"},
> +                "chassis": {"type": "string"},
> +                "networks": {"type": {"key": "string",
> +                                      "min": 0,
> +                                      "max": "unlimited"}},
> +                "nb_ic_uuid": {"type": {"key": {"type": "uuid"},
> +                                     "min": 0,
> +                                     "max": 1}},
>

This is a bit confusing let's call it TR uuid instead?
Also here you can actually have it as min: 1,
this is a new table so nothing to break updates.


> +                "transit_router": {"type": "string"}},
>

No need for transit_router string if we have the uuid IMO.


> +            "isRoot": true,
>

The TRP table should be non-root e.g. "isRoot": false.
This ensures that ports are automatically deleted when
the TR is deleted via the strong reference.


> +            "indexes": [["name"]]},
>          "Connection": {
>              "columns": {
>                  "target": {"type": "string"},
> diff --git a/ovn-ic-nb.xml b/ovn-ic-nb.xml
> index 304e100ff..90d4694c4 100644
> --- a/ovn-ic-nb.xml
> +++ b/ovn-ic-nb.xml
> @@ -120,6 +120,76 @@
>      </group>
>    </table>
>
> +  <table name="Transit_Router" title="Transit logical router">
> +    <p>
> +      Each row represents one transit logical router for interconnection
> +      between different OVN deployments (availability zones).
> +    </p>
> +
> +    <group title="Naming">
> +      <column name="name">
> +        A name that uniquely identifies the transit logical router.
> +      </column>
> +    </group>
> +
> +    <group title="Common Columns">
> +      <column name="other_config"/>
> +      <column name="external_ids">
> +        See <em>External IDs</em> at the beginning of this document.
> +      </column>
> +    </group>
> +  </table>
> +
> +  <table name="Transit_Router_Port" title="Transit logical router">
> +    <p>
> +      Each row represents one transit logical router for interconnection
> +      between different OVN deployments (availability zones).
> +    </p>
> +
> +    <group title="Naming">
> +      <column name="name">
> +        A name that uniquely identifies the transit logical router port.
> +      </column>
> +    </group>
> +
> +    <column name="mac">
> +      The Ethernet address that belongs to this router port.
> +    </column>
> +
> +    <column name="chassis">
> +      The chassis this router port should be bound to.
> +    </column>
> +
> +    <column name="nb_ic_uuid">
> +       This is the UUID of the northbound IC logical datapath this port is
> +       associated with.
> +    </column>
> +
> +    <column name="transit_router">
> +       The name of the <code>Transit_Router</code> this port belongs to.
> +    </column>
> +
> +    <column name="networks">
> +      <p>
> +        The IP addresses and netmasks of the router port.  For example,
> +        <code>192.168.0.1/24</code> indicates that the router's IP
> +        address is 192.168.0.1 and that packets destined to
> +        192.168.0.<var>x</var> should be routed to this port.
> +        These are optional.
> +      </p>
> +
> +      <p>
> +        A logical router port always adds a link-local IPv6 address
> +        (fe80::/64) automatically generated from the interface's MAC
> +        address using the modified EUI-64 format.
> +      </p>
> +    </column>
> +
> +    <group title="Common Columns">
> +      <column name="other_config"/>
> +    </group>
> +  </table>
> +
>    <table name="SSL">
>      SSL/TLS configuration for ovn-nb database access.
>
> diff --git a/ovn-ic-sb.ovsschema b/ovn-ic-sb.ovsschema
> index 967ae637f..a11c9a333 100644
> --- a/ovn-ic-sb.ovsschema
> +++ b/ovn-ic-sb.ovsschema
> @@ -1,7 +1,7 @@
>  {
>      "name": "OVN_IC_Southbound",
>      "version": "2.3.0",
> -    "cksum": "4059944648 8639",
> +    "cksum": "3834405974 9713",
>      "tables": {
>          "IC_SB_Global": {
>              "columns": {
> @@ -58,6 +58,14 @@
>          "Datapath_Binding": {
>              "columns": {
>                  "transit_switch": {"type": "string"},
> +                "type": {"type": {"key": {"type": "string",
> +                                          "enum": ["set",
> +                                                      ["transit-switch",
> +
>  "transit-router"]]},
> +                                                        "min": 0, "max":
> 1}},
> +                "nb_ic_uuid": {"type": {"key": {"type": "uuid"},
> +                                     "min": 0,
> +                                     "max": 1}},
>                  "tunnel_key": {
>                       "type": {"key": {"type": "integer",
>                                        "minInteger": 1,
> @@ -65,7 +73,7 @@
>                  "external_ids": {
>                      "type": {"key": "string", "value": "string",
>                               "min": 0, "max": "unlimited"}}},
> -            "indexes": [["tunnel_key"]],
> +            "indexes": [["nb_ic_uuid","tunnel_key"]],
>              "isRoot": true},
>          "Port_Binding": {
>              "columns": {
> @@ -83,11 +91,20 @@
>                                               "refType": "weak"},
>                                      "min": 0, "max": 1}},
>                  "address": {"type": "string"},
> +                "type": {"type": {"key": {"type": "string",
> +                                          "enum": ["set",
> +                                                  ["transit-switch-port",
> +
>  "transit-router-port"]]},
> +                                                   "min": 0, "max": 1}},
> +                "nb_ic_uuid": {"type": {"key": {"type": "uuid"},
> +                                     "min": 0,
> +                                     "max": 1}},
>                  "external_ids": {"type": {"key": "string",
>                                   "value": "string",
>                                   "min": 0,
>                                   "max": "unlimited"}}},
> -            "indexes": [["transit_switch", "tunnel_key"],
> ["logical_port"]],
> +            "indexes": [["transit_switch", "nb_ic_uuid", "tunnel_key"],
> +                        ["nb_ic_uuid", "logical_port"]],
>              "isRoot": true},
>          "Route": {
>              "columns": {
> diff --git a/ovn-ic-sb.xml b/ovn-ic-sb.xml
> index 924aaac5f..8ad3fa556 100644
> --- a/ovn-ic-sb.xml
> +++ b/ovn-ic-sb.xml
> @@ -213,6 +213,15 @@
>        db="OVN_IC_Northbound"/> table.
>      </column>
>
> +    <column name="type">
> +      Can be one of <code>transit-switch</code> or
> <code>transit-router</code>
> +    </column>
> +
> +    <column name="nb_ic_uuid" type='{"type": "string"}'>
> +      This is the UUID of the corresponding northbound IC logical datapath
> +      represented by this southbound <code>Datapath_Binding</code>.
> +    </column>
> +
>      <column name="tunnel_key">
>        <p>
>          The tunnel key value to which the logical datapath is bound.  The
> key
> @@ -302,6 +311,15 @@
>          </p>
>        </column>
>
> +    <column name="type">
> +      Can be one of <code>switch-port</code> or <code>router-port</code>
> +    </column>
> +
> +    <column name="nb_ic_uuid" type='{"type": "string"}'>
> +      This is the UUID of the corresponding northbound IC logical datapath
> +      represented by this southbound <code>Datapath_Binding</code>.
> +    </column>
> +
>      </group>
>
>      <group title="Common Columns">
> --
> 2.51.0
>
> _______________________________________________
> dev mailing list
> [email protected]
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
>
>
Regards,
Ales
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to