| {%- 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 %} |