diff --git a/install_config/group_vars/server_as_tun_mode.yml b/install_config/group_vars/server_as_tun_mode.yml index 7065dbf..2b8304f 100644 --- a/install_config/group_vars/server_as_tun_mode.yml +++ b/install_config/group_vars/server_as_tun_mode.yml @@ -130,7 +130,7 @@ app_control_plug_log_level: 10 ######################################### #ATCA Config -#下列配置只在tsg_access_type=4时生效 +#下列配置只在tsg_access_type=4 or 5时生效 ATCA_data_incoming: ethname: enp1s0 vf0_name: enp1s2 diff --git a/roles/kernel-ml/tasks/main.yml b/roles/kernel-ml/tasks/main.yml index 1f13b0f..9aab721 100644 --- a/roles/kernel-ml/tasks/main.yml +++ b/roles/kernel-ml/tasks/main.yml @@ -25,19 +25,19 @@ src: "{{ role_path }}/files/grub" dest: "/etc/default" when: - - tsg_access_type == 4 + - tsg_access_type == 4 or tsg_access_type == 5 - t_kernel_ml.changed - name: "BIOS:grub2-mkconfig" shell: grub2-mkconfig -o /boot/grub2/grub.cfg when: - - tsg_access_type == 4 + - tsg_access_type == 4 or tsg_access_type == 5 - t_kernel_ml.changed - name: "UEFI:grub2-mkconfig" shell: grub2-mkconfig -o /boot/efi/EFI/centos/grub.cfg when: - - tsg_access_type == 4 + - tsg_access_type == 4 or tsg_access_type == 5 - t_kernel_ml.changed - name: "reboot" diff --git a/roles/kni/templates/kni.conf.j2 b/roles/kni/templates/kni.conf.j2 index 3b06185..1636cb6 100644 --- a/roles/kni/templates/kni.conf.j2 +++ b/roles/kni/templates/kni.conf.j2 @@ -3,7 +3,7 @@ log_path = ./log/kni/kni.log log_level = {{ kni_log_level }} tfe_node_count = {{ kni.global.tfe_node_count }} manage_eth = {{ nic_mgr.name }} -{% if tsg_running_type != 2 %} +{% if tsg_running_type == 0 %} deploy_mode = tun {% else %} deploy_mode = normal @@ -11,7 +11,7 @@ deploy_mode = normal tun_name = tun_kni src_mac_addr = 00:0e:c6:d6:72:c1 dst_mac_addr = fe:65:b7:03:50:bd -{% if tsg_access_type == 4 %} +{% if tsg_access_type == 4 or tsg_access_type == 5 %} [tfe0] enabled = 1 dev_eth_symbol = {{ ATCA_data_incoming.vf1_name }} diff --git a/roles/mrzcpd/tasks/main.yml b/roles/mrzcpd/tasks/main.yml index 0b3f708..4110839 100644 --- a/roles/mrzcpd/tasks/main.yml +++ b/roles/mrzcpd/tasks/main.yml @@ -26,7 +26,7 @@ src: "{{ role_path }}/templates/mrapp.sapp4.conf " dest: /opt/mrzcpd/etc/mrapp.sapp4.conf when: - - tsg_access_type == 4 + - tsg_access_type == 4 or tsg_access_type == 5 - name: "update mrglobal.conf.adc_inline" template: diff --git a/roles/sapp/templates/conflist.inf.j2 b/roles/sapp/templates/conflist.inf.j2 index 41e4ed3..ab83781 100644 --- a/roles/sapp/templates/conflist.inf.j2 +++ b/roles/sapp/templates/conflist.inf.j2 @@ -32,10 +32,8 @@ ./plug/business/fw_ftp_plug/fw_ftp_plug.inf ./plug/business/fw_quic_plug/fw_quic_plug.inf ./plug/business/conn_telemetry/conn_telemetry.inf -./plug/business/app_control_plug/app_control_plug.inf {% if tsg_app_enable == 1 %} ./plug/business/app_sketch_local/app_sketch_local.inf -./plug/business/app_control_plug/app_control_plug.inf {% endif %} {% if tsg_access_type == 2 %} ./plug/platform/http_healthcheck/http_healthcheck.inf diff --git a/roles/sapp/templates/sapp.toml.j2 b/roles/sapp/templates/sapp.toml.j2 index 2fc5896..4458f76 100644 --- a/roles/sapp/templates/sapp.toml.j2 +++ b/roles/sapp/templates/sapp.toml.j2 @@ -33,7 +33,11 @@ dictator_enable=0 l2_l3_tunnel_support=1 ### note, optional value is [none, vxlan] + {% if tsg_access_type == 5 %} + overlay_mode=vxlan + {% else %} overlay_mode=none + {% endif %} stream_compare_layer_cfg_file="etc/stream_compare_layer.conf" vlan_flipping_cfg_file="etc/vlan_flipping_map.conf" asymmetric_presence_layer_cfg_file="etc/asymmetric_presence_layer.conf" @@ -42,7 +46,7 @@ dictator_enable=0 [packet_io.feature] - {% if tsg_access_type == 4 %} + {% if tsg_access_type == 4 or tsg_access_type == 5 %} ### note, used to represent inbound or outbound direction value, ### because it comes from Third party device, so it needs to be specified manually, ### if inbound_route_dir=1, then outbound_route_dir=0, vice versa, @@ -89,8 +93,12 @@ dictator_enable=0 name={{packet_io.internal_interface}} {% else %} type=marsio + {% if tsg_access_type == 4 or tsg_access_type == 5 %} + name={{ATCA_data_incoming.vf0_name}} + {% else %} name={{nic_data_incoming.name}} {% endif %} + {% endif %} [packet_io.external.interface] {% if tsg_access_type == 0 %} diff --git a/roles/tfe/templates/tfe-env-config.j2 b/roles/tfe/templates/tfe-env-config.j2 index 4a35445..4302dcf 100644 --- a/roles/tfe/templates/tfe-env-config.j2 +++ b/roles/tfe/templates/tfe-env-config.j2 @@ -1,4 +1,4 @@ -{% if tsg_access_type == 4 %} +{% if tsg_access_type == 4 or tsg_access_type == 5 %} TFE_DEVICE_DATA_INCOMING={{ ATCA_data_incoming.vf2_name }} {% elif tsg_running_type != 2 %} TFE_DEVICE_DATA_INCOMING=tun_kni @@ -6,7 +6,7 @@ TFE_DEVICE_DATA_INCOMING=tun_kni TFE_DEVICE_DATA_INCOMING={{ nic_data_incoming.name }} {% endif %} TFE_LOCAL_MAC_DATA_INCOMING=fe:65:b7:03:50:bd -{% if tsg_access_type == 4 %} +{% if tsg_access_type == 4 or tsg_access_type == 5 %} TFE_PEER_MAC_DATA_INCOMING=00:0e:c6:d6:72:c1 {% else %} TFE_PEER_MAC_DATA_INCOMING=aa:bb:cc:dd:ee:ff diff --git a/roles/tsg-env-tun-mode/templates/setup.j2 b/roles/tsg-env-tun-mode/templates/setup.j2 index 4ac57d9..92dfbf4 100644 --- a/roles/tsg-env-tun-mode/templates/setup.j2 +++ b/roles/tsg-env-tun-mode/templates/setup.j2 @@ -10,7 +10,7 @@ ethtool -K {{ packet_io.internal_interface }} gro off ethtool -K {{ packet_io.external_interface }} tso off ethtool -K {{ packet_io.external_interface }} gso off ethtool -K {{ packet_io.external_interface }} gro off -{% elif tsg_access_type == 4 %} +{% elif tsg_access_type == 4 or tsg_access_type == 5 %} echo 3 > /sys/class/net/{{ ATCA_data_incoming.ethname }}/device/sriov_numvfs ip link set {{ ATCA_data_incoming.ethname }} vf 1 vlan 4095 ip link set {{ ATCA_data_incoming.ethname }} vf 2 vlan 4095 diff --git a/roles/tsg-env-tun-mode/templates/tsg-env_stop.j2 b/roles/tsg-env-tun-mode/templates/tsg-env_stop.j2 index 67a5de5..323b30c 100644 --- a/roles/tsg-env-tun-mode/templates/tsg-env_stop.j2 +++ b/roles/tsg-env-tun-mode/templates/tsg-env_stop.j2 @@ -3,6 +3,6 @@ echo 0 >/sys/class/net/{{ nic_mgr.name }}/device/sriov_numvfs ifconfig {{ nic_mgr.name }}.100 down vconfig rem {{ nic_mgr.name }}.100 -{% if tsg_access_type == 4 %} +{% if tsg_access_type == 4 or tsg_access_type == 5 %} echo 0 >/sys/class/net/{{ ATCA_data_incoming.ethname }}/device/sriov_numvfs {% endif %}