Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[EVPN MH][FRR][libnl3][zebra][fpmsyncd][fdbsyncd][orchagent] add support for EVPN MH feature #3226

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

RuslanValovyiGL
Copy link

@RuslanValovyiGL RuslanValovyiGL commented Jul 6, 2024

What I did

Added support for EVPN MH feature

Why I did it

This is a part of the implementation of EVPN MH feature according to requirements: sonic-net/SONiC#1702

How I did it

  • adjust fpmsyncd to requirements
  • adjust fdbsyncd to requirements
  • create new orchagent EvpnMhOrch
  • create new orchagent shlorch
  • create new orchagent l2nhgorch
  • fix orchagent fdborch
  • add unittests

How I verified it

This PR has been tested on such a scheme:
image

After the configuration of leaf1, leaf2, leaf3, spine and hosts (h1 and h2), the following redis table values were obtained:
leaf1:

root@leaf1:/home/admin# redis-dump -d 0 | jq . | grep SPLIT_HORIZON -A 5
  "EVPN_SPLIT_HORIZON_TABLE:PortChannel1": {
    "type": "hash",
    "value": {
      "vteps": "2.2.2.2"
    },
    "ttl": -0.001,
root@leaf1:/home/admin# redis-dump -d 1 | jq . | grep ISOLATION -C 8
    "value": {
      "NULL": "NULL",
      "SAI_QUEUE_ATTR_TYPE": "SAI_QUEUE_TYPE_UNICAST",
      "SAI_QUEUE_ATTR_INDEX": "7"
    },
    "ttl": -0.001,
    "expireat": 1719734452.214351
  },
  "ASIC_STATE:SAI_OBJECT_TYPE_ISOLATION_GROUP:oid:0x46000000000b90": {
    "type": "hash",
    "value": {
      "SAI_ISOLATION_GROUP_ATTR_TYPE": "SAI_ISOLATION_GROUP_TYPE_BRIDGE_PORT"
    },
    "ttl": -0.001,
    "expireat": 1719734452.2143638
  },
  "ASIC_STATE:SAI_OBJECT_TYPE_FDB_ENTRY:{\"bvid\":\"oid:0x26000000000b6b\",\"mac\":\"52:54:00:52:24:A4\",\"switch_id\":\"oid:0x21000000000000\"}": {
    "type": "hash",
    "value": {
      "SAI_FDB_ENTRY_ATTR_TYPE": "SAI_FDB_ENTRY_TYPE_STATIC",
--
    "value": {
      "NULL": "NULL",
      "SAI_QUEUE_ATTR_TYPE": "SAI_QUEUE_TYPE_UNICAST",
      "SAI_QUEUE_ATTR_INDEX": "6"
    },
    "ttl": -0.001,
    "expireat": 1719734452.2146876
  },
  "ASIC_STATE:SAI_OBJECT_TYPE_ISOLATION_GROUP_MEMBER:oid:0x47000000000b91": {
    "type": "hash",
    "value": {
      "SAI_ISOLATION_GROUP_MEMBER_ATTR_ISOLATION_GROUP_ID": "oid:0x46000000000b90",
      "SAI_ISOLATION_GROUP_MEMBER_ATTR_ISOLATION_OBJECT": "oid:0x3a000000000b6c"
    },
    "ttl": -0.001,
    "expireat": 1719734452.2147007
  },
  "ASIC_STATE:SAI_OBJECT_TYPE_QUEUE:oid:0x1500000000028b": {
    "type": "hash",
    "value": {
      "NULL": "NULL"
--
  "ASIC_STATE:SAI_OBJECT_TYPE_BRIDGE_PORT:oid:0x3a000000000b8b": {
    "type": "hash",
    "value": {
      "SAI_BRIDGE_PORT_ATTR_TYPE": "SAI_BRIDGE_PORT_TYPE_TUNNEL",
      "SAI_BRIDGE_PORT_ATTR_TUNNEL_ID": "oid:0x2a000000000b8a",
      "SAI_BRIDGE_PORT_ATTR_BRIDGE_ID": "oid:0x390000000001ab",
      "SAI_BRIDGE_PORT_ATTR_ADMIN_STATE": "true",
      "SAI_BRIDGE_PORT_ATTR_FDB_LEARNING_MODE": "SAI_BRIDGE_PORT_FDB_LEARNING_MODE_DISABLE",
      "SAI_BRIDGE_PORT_ATTR_ISOLATION_GROUP": "oid:0x46000000000b90"
    },
    "ttl": -0.001,
    "expireat": 1719734452.2271657
  },

root@leaf1:/home/admin# redis-dump -d 0 | jq . | grep EVPN_DF_TABLE -A 5
  "EVPN_DF_TABLE:PortChannel1": {
    "type": "hash",
    "value": {
      "non_df": "false"
    },
    "ttl": -0.001,
root@leaf1:/home/admin# vtysh -c "show evpn es detail"
ESI: 00:11:22:33:44:55:66:77:88:99
 Type: Local,Remote
 Interface: PortChannel1
 State: up
 Bridge port: yes
 Ready for BGP: yes
 VNI Count: 1
 MAC Count: 1
 DF status: df 
 DF preference: 32767
 Nexthop group: 536870913
 VTEPs:
     2.2.2.2 df_alg: preference df_pref: 32767 nh: 268435458

root@leaf1:/home/admin# 
root@leaf1:/home/admin# redis-dump -d 1 | jq . | grep SAI_BRIDGE_PORT_ATTR_NON_DF -C 8
  },
  "ASIC_STATE:SAI_OBJECT_TYPE_BRIDGE_PORT:oid:0x3a000000000b6c": {
    "type": "hash",
    "value": {
      "SAI_BRIDGE_PORT_ATTR_TYPE": "SAI_BRIDGE_PORT_TYPE_PORT",
      "SAI_BRIDGE_PORT_ATTR_PORT_ID": "oid:0x2000000000b69",
      "SAI_BRIDGE_PORT_ATTR_ADMIN_STATE": "true",
      "SAI_BRIDGE_PORT_ATTR_FDB_LEARNING_MODE": "SAI_BRIDGE_PORT_FDB_LEARNING_MODE_HW",
      "SAI_BRIDGE_PORT_ATTR_NON_DF": "false"
    },
    "ttl": -0.001,
    "expireat": 1719734383.0772326
  },

leaf3:

root@leaf3:/home/admin# redis-dump -d 0 | jq . | grep VXLAN_FDB_TABLE -A 5
  "VXLAN_FDB_TABLE:Vlan100:52:54:00:52:24:a4": {
    "type": "hash",
    "value": {
      "remote_vtep": "2.2.2.2",
      "type": "dynamic",
      "vni": "1000"
--
  "VXLAN_FDB_TABLE:Vlan100:0c:50:e3:b1:00:01": {
    "type": "hash",
    "value": {
      "nexthop_group": "536870913",
      "type": "dynamic",
      "vni": "1000"
--
  "VXLAN_FDB_TABLE:Vlan100:52:54:00:52:24:a3": {
    "type": "hash",
    "value": {
      "remote_vtep": "1.1.1.1",
      "type": "dynamic",
      "vni": "1000"
root@leaf3:/home/admin# redis-dump -d 1 | jq . | grep SAI_OBJECT_TYPE_FDB_ENTRY -A 8
  "ASIC_STATE:SAI_OBJECT_TYPE_FDB_ENTRY:{\"bvid\":\"oid:0x26000000000b7c\",\"mac\":\"0C:50:E3:B1:00:01\",\"switch_id\":\"oid:0x21000000000000\"}": {
    "type": "hash",
    "value": {
      "SAI_FDB_ENTRY_ATTR_TYPE": "SAI_FDB_ENTRY_TYPE_STATIC",
      "SAI_FDB_ENTRY_ATTR_ALLOW_MAC_MOVE": "true",
      "SAI_FDB_ENTRY_ATTR_BRIDGE_PORT_ID": "oid:0x3a000000000ba3"
    },
    "ttl": -0.001,
    "expireat": 1719735065.3530211
--
  "ASIC_STATE:SAI_OBJECT_TYPE_FDB_ENTRY:{\"bvid\":\"oid:0x26000000000b7c\",\"mac\":\"52:54:00:52:24:A3\",\"switch_id\":\"oid:0x21000000000000\"}": {
    "type": "hash",
    "value": {
      "SAI_FDB_ENTRY_ATTR_TYPE": "SAI_FDB_ENTRY_TYPE_STATIC",
      "SAI_FDB_ENTRY_ATTR_ALLOW_MAC_MOVE": "true",
      "SAI_FDB_ENTRY_ATTR_BRIDGE_PORT_ID": "oid:0x3a000000000ba9",
      "SAI_FDB_ENTRY_ATTR_ENDPOINT_IP": "1.1.1.1"
    },
    "ttl": -0.001,
--
  "ASIC_STATE:SAI_OBJECT_TYPE_FDB_ENTRY:{\"bvid\":\"oid:0x26000000000b7c\",\"mac\":\"0C:1F:98:20:00:01\",\"switch_id\":\"oid:0x21000000000000\"}": {
    "type": "hash",
    "value": {
      "SAI_FDB_ENTRY_ATTR_TYPE": "SAI_FDB_ENTRY_TYPE_DYNAMIC",
      "SAI_FDB_ENTRY_ATTR_BRIDGE_PORT_ID": "oid:0x3a000000000b7d"
    },
    "ttl": -0.001,
    "expireat": 1719735065.3782125
  },
--
  "ASIC_STATE:SAI_OBJECT_TYPE_FDB_ENTRY:{\"bvid\":\"oid:0x26000000000b7c\",\"mac\":\"52:54:00:52:24:A4\",\"switch_id\":\"oid:0x21000000000000\"}": {
    "type": "hash",
    "value": {
      "SAI_FDB_ENTRY_ATTR_TYPE": "SAI_FDB_ENTRY_TYPE_STATIC",
      "SAI_FDB_ENTRY_ATTR_ALLOW_MAC_MOVE": "true",
      "SAI_FDB_ENTRY_ATTR_BRIDGE_PORT_ID": "oid:0x3a000000000ba5",
      "SAI_FDB_ENTRY_ATTR_ENDPOINT_IP": "2.2.2.2"
    },
    "ttl": -0.001,
root@leaf3:/home/admin# redis-dump -d 0 | jq . | grep L2_NEXTHOP_GROUP -A 5
  "L2_NEXTHOP_GROUP_TABLE:268435458": {
    "type": "hash",
    "value": {
      "remote_vtep": "1.1.1.1"
    },
    "ttl": -0.001,
--
  "L2_NEXTHOP_GROUP_TABLE:268435459": {
    "type": "hash",
    "value": {
      "remote_vtep": "2.2.2.2"
    },
    "ttl": -0.001,
--
  "L2_NEXTHOP_GROUP_TABLE:536870913": {
    "type": "hash",
    "value": {
      "nexthop_group": "268435458,268435459"
    },
    "ttl": -0.001,
root@leaf3:/home/admin# redis-dump -d 1 | jq . | grep SAI_BRIDGE_PORT_TYPE_L2_ECMP_GROUP -C 8
      "NULL": "NULL"
    },
    "ttl": -0.001,
    "expireat": 1719735066.1303742
  },
  "ASIC_STATE:SAI_OBJECT_TYPE_BRIDGE_PORT:oid:0x3a000000000ba3": {
    "type": "hash",
    "value": {
      "SAI_BRIDGE_PORT_ATTR_TYPE": "SAI_BRIDGE_PORT_TYPE_L2_ECMP_GROUP",
      "SAI_BRIDGE_PORT_ATTR_L2_ECMP_GROUP_ID": "oid:0x6b000000000ba1",
      "SAI_BRIDGE_PORT_ATTR_BRIDGE_ID": "oid:0x390000000001ab",
      "SAI_BRIDGE_PORT_ATTR_ADMIN_STATE": "true",
      "SAI_BRIDGE_PORT_ATTR_FDB_LEARNING_MODE": "SAI_BRIDGE_PORT_FDB_LEARNING_MODE_DISABLE"
    },
    "ttl": -0.001,
    "expireat": 1719735066.1303864
  },

Depends on

Details if related

oleksii-kolevatov and others added 3 commits July 6, 2024 15:53
Create new orchagent shlorch
Create new orchagent l2nhgorch
Fix orchagent fdborch
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.

3 participants