Skip to content

[sonic-frr-mgmt-framework]: refactor the way of load srv6 locator opcode …#20954

Merged
kperumalbfn merged 1 commit intosonic-net:masterfrom
LARLSN:hongkou-frrcfgd
Nov 29, 2024
Merged

[sonic-frr-mgmt-framework]: refactor the way of load srv6 locator opcode …#20954
kperumalbfn merged 1 commit intosonic-net:masterfrom
LARLSN:hongkou-frrcfgd

Conversation

@LARLSN
Copy link
Contributor

@LARLSN LARLSN commented Nov 28, 2024

this pr refactor the way of load srv6 locator opcode in frrcfgd to support other opcode action

Why I did it

Previous way of load srv6 locator config do not support end/endx opcode action.
The current configuration example of config_db json file is as follows:

  • fd00:201:201:fff1:1:0:0:0, action end, no configuration parameters required.
  • fd00:201:201:fff2:2:0:0:0, action end-dt4, the target vrf needs to be configured.
  • fd00:201:201:fff3:3:0:0:0, action end-dt46, the target vrf needs to be configured.
  • fd00:201:201:fff4:4:0:0:0, action end-dt6, the target vrf needs to be configured.
  • fd00:201:201:fff5:5:0:0:0, action end-x, the interface and nexthop need to be configured.
    "SRV6_LOCATOR": {
        "lsid1": {
            "block_len": "32",
            "func_len": "32",
            "node_len": "16",
            "opcode_prefix": [
                "::fff1:1:0:0:0",
                "::fff2:2:0:0:0",
                "::fff3:3:0:0:0",
                "::fff4:4:0:0:0",
                "::fff5:5:0:0:0"
            ],
            "opcode_act": [
                "end",
                "end-dt4",
                "end-dt46",
                "end-dt6",
                "end-x"
            ],
            "opcode_data": [
                "",
                "vrf Vrf1",
                "vrf Vrf2",
                "vrf Vrf3",
                "interface Ethernet24 nexthop 1::1"
            ],
            "prefix": "fd00:201:201::/48"
        }
    },
Work item tracking
  • Microsoft ADO (number only):

How I did it

How to verify it

it may impact config reload of srv6 locator

Which release branch to backport (provide reason below if selected)

  • 201811
  • 201911
  • 202006
  • 202012
  • 202106
  • 202111
  • 202205
  • 202211
  • 202305
  • 202411

Tested branch (Please provide the tested image version)

Description for the changelog

Link to config_db schema for YANG module changes

A picture of a cute animal (not mandatory but encouraged)

…ode config

Signed-off-by: linsongnan <linsongnan.lsn@alibaba-inc.com>
@LARLSN LARLSN requested a review from lguohan as a code owner November 28, 2024 02:25
@linux-foundation-easycla
Copy link

CLA Missing ID CLA Not Signed

@kperumalbfn
Copy link
Contributor

/azpw ms_conflict -f

('icmp_tos', 'tos {}', handle_ip_sla_common),
]
srv6_locator_key_map = [(['opcode_prefix', 'opcode_act', 'opcode_vrf'], '{no:no-prefix}opcode {} {} vrf {}', hdl_srv6_locator)]
srv6_locator_key_map = [(['opcode_prefix', 'opcode_act', 'opcode_data'], '{no:no-prefix}opcode {} {} {}', hdl_srv6_locator)]
Copy link
Contributor

@kperumalbfn kperumalbfn Nov 28, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@LARLSN Does this change support all the other Endpoint behaviors? Could you please add details to the description about the usage for DT/X. How about uSID endpoint behaviors?

Copy link
Contributor Author

@LARLSN LARLSN Nov 29, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've added details in description. And current load way in frrcfgd can not recognize uSID config field in json file, so a locator for uSID will still be loaded as an ordinary locator.

@kperumalbfn kperumalbfn merged commit 2e3e028 into sonic-net:master Nov 29, 2024
VladimirKuk pushed a commit to Marvell-switching/sonic-buildimage that referenced this pull request Jan 21, 2025
…ode config (sonic-net#20954)

[sonic-frr-mgmt-framework]: refactor the way of load srv6 locator opcode config

Signed-off-by: linsongnan <linsongnan.lsn@alibaba-inc.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants