[IDF] fuel, dpdk: Switch to 1G pgsz on ThunderX
[pharos.git] / config / installers / fuel / net_macros.j2
index a7cf3e5..ad26a79 100644 (file)
     {{ nic }}{% if vlan | int > 0 %}.{{ vlan }}{% endif %}
 {%- endmacro -%}
 
-{%- macro vpp_interface_str(speed, pci_addr) -%}
+{%- macro vpp_interface_str(speed, pci_addr, driver = '') -%}
     {%- set p = pci_addr.replace('.', ':').split(':') -%}
-    {%- set s = 'GigabitEthernet%d/%d/%d' | format(p[-3] | int(0, 16),
-                                                   p[-2] | int(0, 16),
-                                                   p[-1] | int(0, 16)) -%}
-    {% if '40g' in speed %}Forty{% elif '10g' in speed %}Ten{% endif %}{{ s }}
+    {%- set s = 'Ethernet%d/%d/%d' | format(p[-3] | int(0, 16),
+                                            p[-2] | int(0, 16),
+                                            p[-1] | int(0, 16)) -%}
+    {%- if 'vfio' in driver -%}
+    VirtualFunction{{ s }}
+    {%- else -%}
+    {% if '40g' in speed %}Forty{% elif '10g' in speed %}Ten{% endif %}Gigabit{{ s }}
+    {%- endif -%}
 {%- endmacro -%}