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][frrcfgd] add support for EVPN MH feature #19491

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

Conversation

yfedoriachenko
Copy link

@yfedoriachenko yfedoriachenko commented Jul 5, 2024

Why I did it

This is a part of implementation of EVPN MH feature

How I did it

  • add patch to FRR, so that it considers team interfaces as LAGs
  • add new tables frrcfgd to support new config tables for EVPN MH
  • backport commits to libnl for handling RTM_NEXTHOP events (generated by "ip nexthop" commands)
  • add handling of br_port_update events in FRR fpm to send split horizon and DF election information to fpmsyncd

Main PR

sonic-net/sonic-swss#3226

How to verify it

  1. frrcfgd changes were tested using following commands:
    yaroslav_fedoriachenko@Leaf-1:~$ vtysh -c "sh ru" | grep "evpn mh"
    yaroslav_fedoriachenko@Leaf-1:~$ redis-cli -n 4 HSET "EVPN_MH_GLOBAL|default" startup_delay 15 mac_holdtime 25 neigh_holdtime 35
    (integer) 3
    yaroslav_fedoriachenko@Leaf-1:~$ vtysh -c "sh ru" | grep "evpn mh"
    evpn mh mac-holdtime 25
    evpn mh neigh-holdtime 35
    evpn mh startup-delay 15
    yaroslav_fedoriachenko@Leaf-1:~$ redis-cli -n 4 HSET "EVPN_ETHERNET_SEGMENT|PortChannel0" df-preference 15
    (integer) 1
    yaroslav_fedoriachenko@Leaf-1:~$ vtysh -c "sh ru" | grep "evpn mh"
    evpn mh mac-holdtime 25
    evpn mh neigh-holdtime 35
    evpn mh startup-delay 15
     evpn mh es-df-pref 15
    yaroslav_fedoriachenko@Leaf-1:~$ redis-cli -n 4 HSET "EVPN_ETHERNET_SEGMENT|PortChannel0" type3_local_discriminator 25 type3_system_mac 11:22:33:44:55:66
    (integer) 2
    yaroslav_fedoriachenko@Leaf-1:~$ vtysh -c "sh ru" | grep "evpn mh"
    evpn mh mac-holdtime 25
    evpn mh neigh-holdtime 35
    evpn mh startup-delay 15
     evpn mh es-df-pref 15
     evpn mh es-id 25
     evpn mh es-sys-mac 11:22:33:44:55:66
    yaroslav_fedoriachenko@Leaf-1:~$ redis-cli -n 4 HSET "EVPN_ETHERNET_SEGMENT|Ethernet0" mh-uplink true
    (integer) 1
    yaroslav_fedoriachenko@Leaf-1:~$ vtysh -c "sh ru" | grep "evpn mh"
    evpn mh mac-holdtime 25
    evpn mh neigh-holdtime 35
    evpn mh startup-delay 15
     evpn mh uplink
     evpn mh es-df-pref 15
     evpn mh es-id 25
     evpn mh es-sys-mac 11:22:33:44:55:66
    yaroslav_fedoriachenko@Leaf-1:~$ sudo config save -y
    Running command: /usr/local/bin/sonic-cfggen -d --print-data > /etc/sonic/config_db.json
    yaroslav_fedoriachenko@Leaf-1:~$ sudo reboot
    
    ...
    
    yaroslav_fedoriachenko@Leaf-1:~$ vtysh -c "sh ru" | grep "evpn mh"
    evpn mh mac-holdtime 25
    evpn mh neigh-holdtime 35
    evpn mh startup-delay 15
     evpn mh uplink
     evpn mh es-df-pref 15
     evpn mh es-id 25
     evpn mh es-sys-mac 11:22:33:44:55:66
    yaroslav_fedoriachenko@Leaf-1:~$ redis-cli -n 4 HDEL "EVPN_ETHERNET_SEGMENT|PortChannel0" type3_local_discriminator 25 type3_system_mac 11:22:33:44:55:66
    (integer) 2
    yaroslav_fedoriachenko@Leaf-1:~$ vtysh -c "sh ru" | grep "evpn mh"
    evpn mh mac-holdtime 25
    evpn mh neigh-holdtime 35
    evpn mh startup-delay 15
     evpn mh uplink
     evpn mh es-df-pref 15
    yaroslav_fedoriachenko@Leaf-1:~$ redis-cli -n 4 HSET "EVPN_ETHERNET_SEGMENT|PortChannel0" type0_operator_config 00:11:22:33:44:55:66:01:02:03
    (integer) 1
    yaroslav_fedoriachenko@Leaf-1:~$ vtysh -c "sh ru" | grep "evpn mh"
    evpn mh mac-holdtime 25
    evpn mh neigh-holdtime 35
    evpn mh startup-delay 15
     evpn mh uplink
     evpn mh es-df-pref 15
     evpn mh es-id 00:11:22:33:44:55:66:01:02:03
    yaroslav_fedoriachenko@Leaf-1:~$ sudo config save -y
    Running command: /usr/local/bin/sonic-cfggen -d --print-data > /etc/sonic/config_db.json
    yaroslav_fedoriachenko@Leaf-1:~$ sudo reboot
    
    ...
    
    yaroslav_fedoriachenko@Leaf-1:~$ vtysh -c "sh ru" | grep "evpn mh"
    evpn mh mac-holdtime 25
    evpn mh neigh-holdtime 35
    evpn mh startup-delay 15
     evpn mh uplink
     evpn mh es-df-pref 15
     evpn mh es-id 00:11:22:33:44:55:66:01:02:03
    
    
  2. FRR patch to add team is verified to work by running a evpn mh command inside vtysh for interface PortChannel, for example vtysh -c "configure" -c "interface PortChannel0" -c "evpn mh es-df-pref 1".
  3. FRR patch to fpm is tested in main PR in sonic-swss ([EVPN MH][FRR][libnl3][zebra][fpmsyncd][fdbsyncd][orchagent] add support for EVPN MH feature sonic-swss#3226)
  4. libnl patches are directly cherry-picked from libnl repo with minimal modification due to backporting and were verified to work in python tests in aforementioned sonic-swss PR

Details

Is this PR fine or does it have to be multiple smaller PRs?

Copy link

linux-foundation-easycla bot commented Jul 5, 2024

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: yfedoriachenko / name: YaroslavFedoriachenkoGL (fbffc59, 8a8e26f, 04a1543)
  • ✅ login: oleksii-kolevatov / name: OleksiiKolevatovGL (74d01ac)

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