blob: 324391a2f77e6b6c2552ce3d77ca28cd7db6cb30 [file] [log] [blame]
{%- from "linux/map.jinja" import network with context %}
{%- if network.custom_txqueuelen is defined %}
{%- for if_name, if_dict in network.custom_txqueuelen.iteritems() %}
{%- if if_dict.get('enabled', 'true')|string|lower == 'true' %}
{%- if if_dict.device_filter is defined %}
{%- set if_dev_filter = if_dict.device_filter %}
{%- else %}
{%- set if_dev_filter = if_name + '*' %}
{%- endif %}
KERNEL=="{{ if_dev_filter }}", RUN+="/sbin/ip link set %k txqueuelen {{ if_dict.queue_length }}"
{%- endif %}
{%- endfor %}
{%- else %}
KERNEL=="tap[0-9a-z\-]*", RUN+="/sbin/ip link set %k txqueuelen {{ tap_custom_txqueuelen }}"
{%- endif %}