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

[MCLAG] Improve performance and fix some bugs #7769

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jianjundong
Copy link
Contributor

@jianjundong jianjundong commented Jun 1, 2021

Signed-off-by: dongjianjun@inspur.com

Why I did it

  1. VLAN performance improvements and bugs fix
    (1) In the original implementation, the VLAN to which the port belongs is stored by list. In the case of a large number of VLANs, such as 4K, there are performance problems.
    (2) There are some defects in the way MCLAG obtains the VLAN of the port. The Linux kernel may report VLAN range, but MCLAG does not handle this situation, which may lead to incorrect VLAN of the port.
    (3) When the iccpd docker is restarted, the VLAN information of the port may be incomplete. The reason is that when only iccpd docker is restarted, Linux kernel will not report RTM_NEWLINK messages to iccpd, and thus iccpd cannot get the VLAN of the port.
    (4) When the command 'mclagdctl dump portlist local' displays the VLAN information of the port, the string length is only 64. If there are many VLANs, the display is incomplete.

  2. ARP/ND performance improvements
    (1) In the original implementation, ARP and ND are synchronized frequently between the two peers, which affects the performance.
    (2) When too much ARP and ND information is read from the Linux kernel, an error may be reported with the wrong sequence number, resulting in an entry error.

  3. FDB optimization
    (1) When the FDB table item needs to be redirected to peerlink, the ASIC will be directly installed without considering whether the FDB table item is in the same VLAN as peerlink. This results in useless entries in the ASIC.

  4. Interface optimization
    (1) In the original implementation, the interface is stored by list. In the case of a large number of VLANs, such as 4K, there are performance problems.
    (2) In the struct LocalInterface, the string portchannel_member_buf[] is used to store the portchannel members, and the length of the string is 512. When there are many portchannel members, the length may not be enough.
    (3) If lots of mclag enabled interfaces are configured, only about 30 can be displayed by the command 'mclagdctl dump state'. The reason is that the length of the string definition used to read the configuration from the configuration file is only 512, which is too short.

How I did it

  1. VLAN performance improvements and bugs fix
    (1) Modify VLAN list as RB tree to improve performance. This modification is based on PR MCLAG enhacements ICCPd initial code commit #4819.
    (2) Modify the way to read the VLAN information of the port reported by Linux kernel, so that it can process VLAN range (Function iccp_parse_if_vlan_info_from_netlink()).
    (3) When the mclag is initialized, it actively sends a message to read the VLAN information of the port from the Linux kernel (Add function iccp_ge_if_vlan_info_from_netlink()).
    (4) Use VLAN bitmap to transfer the VLAN information of the port, and add the display of VLAN range, such as' 3-10 '.

  2. ARP/ND performance improvements
    (1) The synchronization frequency of ARP and ND between two peers is optimized. The same table item is synchronized only once in 240s to avoid too much information.
    (2) When initializing ARP and ND related sockets, add an option to prohibit them from checking the sequence number.

  3. FDB optimization
    (1) When an FDB entry needs to be redirected to peerlink, if the FDB entry and peerlink are not in the same VLAN, iccpd will save the entry, but the entry will not be installed in ASIC. The result is that 'mclagdctl dump mac' can see the entry, but the command 'show mac' can't. When configuring peerlink to join the associated VLAN, the related FDB table items are reinstalled into ASIC.

  4. Interface optimization
    (1) Modify interface list as RB tree to improve performance.
    (2) Use list to store the portchannel members. At the same time, the method of displaying portchannel members with command ''mclagdctl dump portlist local'' is optimized.
    (3) The length definition of string used to read configuration from configuration file is increased from 512 to 8320, which can support about 520 portchannels.

How to verify it

Test on the switch.

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

  • 201811
  • 201911
  • 202006
  • 202012

Description for the changelog

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

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.

1 participant