1b39424520
Why I did it ndppd by default reads /proc/net/ipv6_route ever 30 seconds. Since T1s advertise so many routes to ToRs, this file is extremely large, and reading it causes ndppd's CPU usage to spike every 30 seconds How I did it Increase the delay for reading this file to the maximum possible value (max integer value), which will result in CPU spikes every ~24 days instead of every 30 seconds How to verify it Start ndppd with the new config file, confirm that no CPU spikes are seen except at startup Signed-off-by: Lawrence Lee <lawlee@microsoft.com>
37 lines
1.4 KiB
Django/Jinja
37 lines
1.4 KiB
Django/Jinja
{% block banner %}
|
|
# =========== Managed by sonic-cfggen -- DO NOT edit manually! ====================
|
|
# Generated by /usr/share/sonic/templates/ndppd.conf.j2 using config DB data
|
|
# File: /etc/ndppd.conf
|
|
#
|
|
{% endblock banner %}
|
|
# Config file for ndppd, the NDP Proxy Daemon
|
|
# See man page for ndppd.conf.5 for descriptions of all available options
|
|
{% if VLAN_INTERFACE and VLAN_INTERFACE|pfx_filter|length > 0%}
|
|
{# Get all VLAN interfaces that have proxy_arp enabled #}
|
|
{% set proxy_interfaces = {} %}
|
|
{% for intf in VLAN_INTERFACE %}
|
|
{% if "proxy_arp" in VLAN_INTERFACE[intf] and VLAN_INTERFACE[intf]["proxy_arp"] == "enabled" %}
|
|
{% set _x = proxy_interfaces.update({intf: []}) %}
|
|
{% endif %}
|
|
{% endfor -%}
|
|
|
|
{# Add each IPv6 prefix from each proxy_arp interface #}
|
|
{% for (intf, prefix) in VLAN_INTERFACE|pfx_filter %}
|
|
{% if intf in proxy_interfaces and prefix | ipv6 %}
|
|
{% set _x = proxy_interfaces[intf].append(prefix) %}
|
|
{% endif %}
|
|
{% endfor -%}
|
|
route-ttl 2147483647
|
|
{% for intf, prefix_list in proxy_interfaces.items() %}
|
|
{% if prefix_list %}
|
|
|
|
proxy {{ intf }} {
|
|
{% for prefix in prefix_list %}
|
|
rule {{ prefix | network }}/{{ prefix | prefixlen }} {
|
|
static
|
|
}
|
|
{% endfor %}
|
|
}
|
|
{% endif %}
|
|
{% endfor %}
|
|
{% endif %} |