[baremetal] Tune up dpdk options
[fuel.git] / mcp / reclass / classes / cluster / mcp-fdio-noha / infra / config.yml.j2
1 ##############################################################################
2 # Copyright (c) 2018 Mirantis Inc., Enea AB and others.
3 # All rights reserved. This program and the accompanying materials
4 # are made available under the terms of the Apache License, Version 2.0
5 # which accompanies this distribution, and is available at
6 # http://www.apache.org/licenses/LICENSE-2.0
7 ##############################################################################
8 {%- import 'net_map.j2' as nm with context %}
9 {%- import 'net_macros.j2' as ma with context %}
10 {#- Until SDF is implemented, hardcode gtw01 node index in IDF as ctl01 +1 #}
11 {%- set gi = nm.ctl01.idx + 1 %}
12 ---
13 classes:
14   - system.reclass.storage.system.openstack_gateway_single
15   - cluster.mcp-common-noha.infra.config
16   - cluster.mcp-fdio-noha
17   - cluster.all-mcp-arch-common.infra.config_pdf
18 parameters:
19   reclass:
20     storage:
21       node:
22         openstack_gateway_node01:
23           params:
24             tenant_address: ${_param:opnfv_openstack_gateway_node01_tenant_address}
25             external_address: ${_param:opnfv_openstack_gateway_node01_external_address}
26             pxe_admin_address: ${_param:opnfv_openstack_gateway_node01_pxe_admin_address}
27 {%- if '-fdio-' in conf.MCP_DEPLOY_SCENARIO %}
28 {%- set private_speed = conf.nodes[gi].interfaces[nm.idx_private].speed %}
29 {%- set private_pci = conf.idf.fuel.network.node[gi].busaddr[nm.idx_private] %}
30             # We reuse compute-specific configuration from IDF, so we don't have
31             # to rework everything in both Pharos and Fuel
32             # However, OVS-related configuration is unused and only DPDK is relevant
33     {%- if conf.idf.fuel.reclass is defined %}
34       {%- if conf.idf.fuel.reclass.node[gi].compute_params.dpdk is defined %}
35         {#- Can't dump json here due to dpdk0_* below, explicitly create yaml #}
36         {%- set _dpdk = conf.idf.fuel.reclass.node[gi].compute_params.dpdk %}
37         {%- set private_drv = _dpdk.dpdk0_driver %}
38         {%- for _i in _dpdk %}
39             {{ _i }}: '"{{ _dpdk[_i] }}"'
40         {%- endfor %}
41       {%- endif %}
42     {%- else %}
43             compute_hugepages_size: 2M
44             compute_hugepages_count: 13312
45             compute_hugepages_mount: /mnt/hugepages_2M
46             compute_kernel_isolcpu: 3,8,9,10,11
47             compute_dpdk_driver: uio
48             compute_ovs_pmd_cpu_mask: '"0x708"'
49             compute_ovs_dpdk_socket_mem: '"4096,4096"'
50             compute_ovs_dpdk_lcore_mask: '"0x800"'
51             compute_ovs_memory_channels: '"2"'
52             dpdk0_driver: igb_uio
53             dpdk0_n_rxq: 2
54     {%- endif %}
55             dpdk0_name: {{ conf.idf.fuel.network.node[gi].interfaces[nm.idx_private] }}
56             dpdk0_pci: '"{{ conf.idf.fuel.network.node[gi].busaddr[nm.idx_private] }}"'
57             dpdk0_vpp: {{ ma.vpp_interface_str(private_speed, private_pci, private_drv or '') }}
58 {%- endif %}