1. # Kubernetes CNI SRIOV
  2. # 时间:20210827-[20:00-22:00]
  3. # 主题:MUTUS SRIOV DPDK
  4. # 文档:
  5. # 作业:MUTUS SRIOV DPDK

CPU Pin

  1. #设置cpu pin:
  2. export LC_ALL="en_US.UTF-8"
  3. systemctl stop irqbalance; systemctl disable irqbalance
  4. tuna --cpus=4-51,56-103 --isolate
  5. tuna --irqs='*' --cpus=0-3,52-55 --spread
  6. # 1.systemctl stop irqbalance; systemctl disable irqbalance
  7. https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux_for_real_time/7/html/tuning_guide/interrupt_and_process_binding
  8. This daemon is enabled by default and periodically forces interrupts to be handled by CPUs in an even, fair manner. However in real-time deployments, applications are typically dedicated and bound to specific CPUs, so the irqbalance daemon is not required.
  9. // 这个守护进程在默认情况下是启用的,它会定期强制中断由 CPU 以均匀、公平的方式处理。然而,在实时部署中,应用程序通常是专用的并绑定到特定的 CPU,因此irqbalance不需要守护程序。
  10. # 2.设置cpu pin:
  11. # https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/performance_tuning_guide/sec-tuna-cpu-tuning
  12. Isolating a CPU causes all tasks currently running on that CPU to move to the next available CPU. To isolate a CPU。
  13. # tuna --cpus=cpu_list --isolate
  14. tuna --cpus=4-51,56-103 --isolate
  15. # 3.tuna --irqs='*' --cpus=0-3,52-55 --spread
  16. # yum -y install tuna
  17. [root@k8s-2 ~]# tuna --help
  18. Usage: tuna [OPTIONS]
  19. -h, --help Give this help list
  20. -a, --config_file_apply=profilename Apply changes described in profile
  21. -l, --config_file_list List preloaded profiles
  22. -g, --gui Start the GUI
  23. -G, --cgroup Display the processes with the type of cgroups they are in
  24. -c, --cpus=CPU-LIST CPU-LIST affected by commands # 由 Tuna 控制的 CPU。该列表将一直有效,直到指定新列表
  25. -C, --affect_children Operation will affect children threads
  26. -f, --filter Display filter the selected entities
  27. -i, --isolate Move all threads away from CPU-LIST # 将所有线程从指定的 CPU 移开
  28. -I, --include Allow all threads to run on CPU-LIST
  29. -K, --no_kthreads Operations will not affect kernel threads
  30. -m, --move Move selected entities to CPU-LIST
  31. -N, --nohz_full CPUs in nohz_full= kernel command line will be affected by operations
  32. -p, --priority=[POLICY:]RTPRIO Set thread scheduler tunables: POLICY and RTPRIO
  33. -P, --show_threads Show thread list
  34. -Q, --show_irqs Show IRQ list
  35. -q, --irqs=IRQ-LIST IRQ-LIST affected by commands # 指定受命令影响的 IRQ 列表。在指定新列表之前,该列表将一直有效。IRQ 可以通过使用添加到列表中,也可以通过使用+从列表中删除-
  36. -r, --run=COMMAND fork a new process and run the COMMAND
  37. -s, --save=FILENAME Save kthreads sched tunables to FILENAME
  38. -S, --sockets=CPU-SOCKET-LIST CPU-SOCKET-LIST affected by commands
  39. -t, --threads=THREAD-LIST THREAD-LIST affected by commands
  40. -U, --no_uthreads Operations will not affect user threads
  41. -v, --version Show version
  42. -W, --what_is Provides help about selected entities
  43. -x, --spread Spread selected entities over CPU-LIST # 在选定的 CPU 之间均匀分布指定的线程
  44. [root@k8s-2 ~]#
  45. # 为了使得此配置能在重启的时候不丢失,我们可以把其配置成service的形式:
  46. Like:
  47. # systemctl cat cpu-pinning.service
  48. # /usr/lib/systemd/system/cpu-pinning.service
  49. [Unit]
  50. Description=CPU pinning
  51. Before=basic.target
  52. After=local-fs.target sysinit.target
  53. DefaultDependencies=no
  54. [Service]
  55. Type=oneshot
  56. RemainAfterExit=yes
  57. ExecStart=/etc/cpu-pinning.sh
  58. [Install]
  59. WantedBy=sysinit.target

Config SRIOV

Setting up Virtual Functions

The SR-IOV Network Device Plugin requires SR-IOV virtual functions (VFs) to be created on the host ahead of startup. The device plugin does not manage the creation of virtual functions, and it does not automatically update when there is a change in the virtual functions. Each time the number of VFs or the driver used by the VF change the SR-IOV Network Device Plugin needs to be restarted.
This guide gives an overview for setting up SR-IOV virtual functions on a linux host for various NICs.

  • Intel
  • Mellanox

    Intel

    The below works on Intel SR-IOV enabled cards including those from the Gigabit Ethernet, X710 and X722 families of Network Interface Cards. Note not all Gigabit Ethernet NICs are enabled with SR-IOV.
    Cards from the following families can be enabled through the sysfs endpoint as described below:

  • Intel i40e Driver

    • Intel® Ethernet Controller X722
    • Intel® Ethernet Controller X710
  • Intel ixgbe Driver
    • Intel® Ethernet Controller 82599
    • Intel® Ethernet Controller X520
    • Intel® Ethernet Controller X540
    • Intel® Ethernet Controller x550
    • Intel® Ethernet Controller X552
    • Intel® Ethernet Controller X553

Creating VFs with sysfs

First select a compatible NIC on which to create VFs and record its name (shown as PF_NAME below).
To create 8 virtual functions run:

  1. echo 8 > /sys/class/net/${PF_NAME}/device/sriov_numvfs

To check that the VFs have been successfully created run:

  1. lspci | grep "Virtual Function"

This method requires the creation of VFs each time the node resets. This can be handled automatically by placing the above command in a script that is run on startup such as /etc/rc.local.

Common issues

Cannot allocate memory
Some cards using the ixgbe may require additional configuration. This is likely the case if the message write error: Cannot allocate memory is returned when creating VFs using the above method. This issue has been observed on the X552 NIC.
To resolve this issue, try setting the maximum allowed VFs in the driver config:

  1. modprobe -r ixgbe; modprobe ixgbe max_vfs=8

Next set the VFs as above

  1. echo 8 > /sys/class/net/${PF_NAME}/device/sriov_numvfs

Device or resource busy
The message write error: device or resource busy in response to an attempt to create virtual functions can mean that some virtual functions have already been created. In order to change the number of VFs the number may first need to be set to zero:

  1. echo 0 > /sys/class/net/${PF_NAME}/device/sriov_numvfs
  2. echo 8 > /sys/class/net/${PF_NAME}/device/sriov_numvfs

Mellanox

SRIOV-CNI support Mellanox ConnectX®-4 Lx and ConnectX®-5 adapter cards.
To enable SR-IOV functionality the following steps are required:

1- Enable SR-IOV in the NIC’s Firmware.

Installing Mellanox Management Tools (MFT) or mstflint is a pre-requisite, MFT can be downloaded from here, mstflint package available in the various distros and can be downloaded from here.

Use Mellanox Firmware Tools package to enable and configure SR-IOV in firmware

  1. # mst start
  2. Starting MST (Mellanox Software Tools) driver set
  3. Loading MST PCI module - Success
  4. Loading MST PCI configuration module - Success
  5. Create devices

Locate the HCA device on the desired PCI slot

  1. # mst status
  2. MST modules:
  3. ------------
  4. MST PCI module loaded
  5. MST PCI configuration module loaded
  6. MST devices:
  7. ------------
  8. /dev/mst/mt4115_pciconf0 - PCI configuration cycles access.
  9. ...

Enable SR-IOV

  1. # mlxconfig -d /dev/mst/mt4115_pciconf0 q set SRIOV_EN=1 NUM_OF_VFS=8
  2. ...
  3. Apply new Configuration? ? (y/n) [n] : y
  4. Applying... Done!
  5. -I- Please reboot machine to load new configurations.

Alternatively, use mstconfig from mstflint package

  1. # mstconfig -d 04:00.0 set SRIOV_EN=1 NUM_OF_VFS=8
  2. ...
  3. Apply new Configuration ? (y/n) [n] : y
  4. Applying... Done!
  5. -I- Please reboot machine to load new configurations.

Where 04:00.0 is the NIC’s PCI address.
Reboot the machine

  1. # reboot

2- Enable SR-IOV in the NIC’s Driver.

  1. # ibdev2netdev
  2. mlx5_0 port 1 ==> enp2s0f0 (Up)
  3. mlx5_1 port 1 ==> enp2s0f1 (Up)
  4. # echo 4 > /sys/class/net/enp2s0f0/device/sriov_numvfs
  5. # ibdev2netdev -v
  6. 0000:02:00.0 mlx5_0 (MT4115 - MT1523X04353) CX456A - ConnectX-4 QSFP fw 12.23.1020 port 1 (ACTIVE) ==> enp2s0f0 (Up)
  7. 0000:02:00.1 mlx5_1 (MT4115 - MT1523X04353) CX456A - ConnectX-4 QSFP fw 12.23.1020 port 1 (ACTIVE) ==> enp2s0f1 (Up)
  8. 0000:02:00.5 mlx5_2 (MT4116 - NA) fw 12.23.1020 port 1 (DOWN ) ==> enp2s0f2 (Down)
  9. 0000:02:00.6 mlx5_3 (MT4116 - NA) fw 12.23.1020 port 1 (DOWN ) ==> enp2s0f3 (Down)
  10. 0000:02:00.7 mlx5_4 (MT4116 - NA) fw 12.23.1020 port 1 (DOWN ) ==> enp2s0f4 (Down)
  11. 0000:02:00.2 mlx5_5 (MT4116 - NA) fw 12.23.1020 port 1 (DOWN ) ==> enp2s0f5 (Down)
  12. # lspci | grep Mellanox
  13. 02:00.0 Ethernet controller: Mellanox Technologies MT27700 Family [ConnectX-4]
  14. 02:00.1 Ethernet controller: Mellanox Technologies MT27700 Family [ConnectX-4]
  15. 02:00.2 Ethernet controller: Mellanox Technologies MT27700 Family [ConnectX-4 Virtual Function]
  16. 02:00.3 Ethernet controller: Mellanox Technologies MT27700 Family [ConnectX-4 Virtual Function]
  17. 02:00.4 Ethernet controller: Mellanox Technologies MT27700 Family [ConnectX-4 Virtual Function]
  18. 02:00.5 Ethernet controller: Mellanox Technologies MT27700 Family [ConnectX-4 Virtual Function]
  19. # ip link show
  20. ...
  21. enp2s0f2: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
  22. link/ether c6:6d:7d:dd:2a:d5 brd ff:ff:ff:ff:ff:ff
  23. enp2s0f3: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
  24. link/ether 42:3e:07:68:da:fb brd ff:ff:ff:ff:ff:ff
  25. enp2s0f4: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
  26. link/ether 42:68:f2:aa:c2:27 brd ff:ff:ff:ff:ff:ff
  27. enp2s0f5: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
  28. ...

To change the number of VFs reset the number to 0 then set the needed number

  1. echo 0 > /sys/class/net/enp2s0f0/device/sriov_numvfs

配置解说

  1. # X710 网卡配置说明:
  2. #!/bin/bash -x
  3. # 3b:00.0 3 eth4 3c:fd:fe:92:d6:40 Down i40e Intel Corporation Ethernet Controller X710/X557-AT 10GBASE-T (rev 02) # For SRIOV Kernel
  4. # 3b:00.1 7 eth5 3c:fd:fe:92:d6:41 Down i40e Intel Corporation Ethernet Controller X710/X557-AT 10GBASE-T (rev 02) # For SRIOV Kernel
  5. # 3b:00.2 8 eth6 3c:fd:fe:92:d6:42 Down i40e Intel Corporation Ethernet Controller X710/X557-AT 10GBASE-T (rev 02) # For SRIOV DPDK
  6. # 3b:00.3 9 eth7 3c:fd:fe:92:d6:43 Down i40e Intel Corporation Ethernet Controller X710/X557-AT 10GBASE-T (rev 02) # For SRIOV DPDK
  7. # d8:00.0 10 eth8 3c:fd:fe:92:d6:50 Down i40e Intel Corporation Ethernet Controller X710/X557-AT 10GBASE-T (rev 02) # For MACVLAN
  8. # d8:00.1 11 eth9 3c:fd:fe:92:d6:51 Down i40e Intel Corporation Ethernet Controller X710/X557-AT 10GBASE-T (rev 02) # For MACVLAN
  9. # d8:00.2 12 eth10 3c:fd:fe:92:d6:52 Down i40e Intel Corporation Ethernet Controller X710/X557-AT 10GBASE-T (rev 02) # For MACVLAN
  10. # d8:00.3 13 eth11 3c:fd:fe:92:d6:53 Down i40e Intel Corporation Ethernet Controller X710/X557-AT 10GBASE-T (rev 02) # For MACVLAN
  11. # For SRIOV Kernel
  12. echo 0 > /sys/class/net/eth4/device/sriov_numvfs
  13. echo 0 > /sys/class/net/eth5/device/sriov_numvfs
  14. echo 32 > /sys/class/net/eth4/device/sriov_numvfs
  15. echo 32 > /sys/class/net/eth5/device/sriov_numvfs
  16. # For SRIOV DPDK
  17. echo 0 > /sys/class/net/eth6/device/sriov_numvfs
  18. echo 0 > /sys/class/net/eth7/device/sriov_numvfs
  19. echo 32 > /sys/class/net/eth6/device/sriov_numvfs
  20. echo 32 > /sys/class/net/eth7/device/sriov_numvfs
  21. #modprobe vfio_pci
  22. #for intf in eth6 eth7; do
  23. # for pci_id in `ls -l /sys/class/net/$intf/device/virtfn* | cut -d '/' -f8`; do
  24. # /opt/rowan/dpdk-devbind.py -u $pci_id
  25. # /opt/rowan/dpdk-devbind.py -b vfio_pci $pci_id
  26. # done
  27. #done
  28. modprobe uio
  29. insmod /opt/rowan/igb_uio.ko
  30. for intf in eth6 eth7; do
  31. for pci_id in `ls -l /sys/class/net/$intf/device/virtfn* | cut -d '/' -f8`; do
  32. /opt/rowan/dpdk-devbind.py -u $pci_id
  33. /opt/rowan/dpdk-devbind.py -b igb_uio $pci_id
  34. #/opt/rowan/dpdk-devbind.py -b vfio-pci $pci_id
  35. done
  36. done
  37. #可以通过 ip link show 去查看:
  38. 8: eth6: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT group default qlen 1000
  39. link/ether 3c:fd:fe:92:d6:42 brd ff:ff:ff:ff:ff:ff
  40. vf 0 MAC 00:00:00:00:00:00, spoof checking on, link-state auto, trust off
  41. vf 1 MAC 00:00:00:00:00:00, vlan 2310, spoof checking on, link-state auto, trust on
  42. vf 2 MAC 00:00:00:00:00:00, spoof checking on, link-state auto, trust off
  43. vf 3 MAC 00:00:00:00:00:00, spoof checking on, link-state auto, trust off
  44. vf 4 MAC 00:00:00:00:00:00, spoof checking on, link-state auto, trust off
  45. vf 5 MAC 00:00:00:00:00:00, spoof checking on, link-state auto, trust off
  46. vf 6 MAC 00:00:00:00:00:00, vlan 2320, spoof checking on, link-state auto, trust on
  47. vf 7 MAC 00:00:00:00:00:00, vlan 2330, spoof checking on, link-state auto, trust on
  48. vf 8 MAC 00:00:00:00:00:00, spoof checking on, link-state auto, trust off
  49. vf 9 MAC 00:00:00:00:00:00, vlan 2340, spoof checking on, link-state auto, trust on
  50. vf 10 MAC 00:00:00:00:00:00, vlan 2320, spoof checking on, link-state auto, trust on
  51. vf 11 MAC 00:00:00:00:00:00, spoof checking on, link-state auto, trust off
  52. vf 12 MAC 00:00:00:00:00:00, spoof checking on, link-state auto, trust off
  53. vf 13 MAC 00:00:00:00:00:00, spoof checking on, link-state auto, trust off
  54. vf 14 MAC 00:00:00:00:00:00, vlan 2310, spoof checking on, link-state auto, trust on
  55. vf 15 MAC 00:00:00:00:00:00, spoof checking on, link-state auto, trust off
  56. # kubectl describe nodes k8s-2
  57. Capacity:
  58. cpu: 88
  59. ephemeral-storage: 3900337424Ki
  60. hugepages-1Gi: 64Gi
  61. intel.com/sriov_dpdk_3: 16
  62. intel.com/sriov_dpdk_4: 16
  63. intel.com/sriov_kern_1: 32
  64. intel.com/sriov_kern_2: 32
  65. memory: 791009936Ki
  66. pods: 200
  67. Allocatable:
  68. cpu: 80
  69. ephemeral-storage: 3594550964007
  70. hugepages-1Gi: 64Gi
  71. intel.com/sriov_dpdk_3: 16
  72. intel.com/sriov_dpdk_4: 16
  73. intel.com/sriov_kern_1: 32
  74. intel.com/sriov_kern_2: 32
  75. memory: 723798672Ki
  76. pods: 200
  77. # ./dpdk-devbind.py -s # 去查看绑定情况

整体配置案例

SRIOV and DPDK
SRI-IOV WorkerNode Prerequisites
In order for the cni-sriov-plugin to start reading Virtual Functions resources as well HostNetworkTemplate objects can configure virtual functions you need to perform the following steps.

Enable** VT-D** at BIOS level.
Enable SRIOV feature globally and/or per nic according to the nic you are working with, for example Intel x710 should be enabled per nic at BIOS level.
Upgrade Kernel boot line to enable intel_iommu=on and iommu=pt
$ grubby --update-kernel=ALL --args="iommu=pt intel_iommu=on"
$ reboot
Copy
Huge page Support
Most network applications use huge pages, so you may want to enable that. Please edit /etc/default/grub and add huge-ages

Bash
GRUB_CMDLINE_LINUX="nofb nomodeset vga=normal iommu=pt intel_iommu=on default_hugepagesz=1G hugepagesz=1G hugepages=16"
#Rebuild grub.cfg
grub2-mkconfig -o /boot/grub2/grub.cfg && reboot
Copy
Create SR-IOV ConfigMap
SR-IOV ConfigMap
Please copy paste the following definition update the values of your Physical Functions and ranges or Virtual Functions as well as Drivers and apply it to our cluster, in case that you have multiple nics, that each one uses different kernels drivers please omit the drivers section and just mentioned pfName within the selectors section.

SR-IOV Kernel Driver plus DPDK ConfigMap
YAML
apiVersion: v1
kind: ConfigMap
metadata:
  name: sriovdp-config
  namespace: kube-system
data:
  config.json: |
    {
        "resourceList": [
            {
                "resourceName": "intel_sriov_dpdk0",
                "selectors": {
                    "drivers": ["vfio-pci"],
                    "pfNameis": ["enp3s0f0#0-7"]
                }
            },
            {
                "resourceName": "intel_sriov_kernel0",
                "selectors": {
                    "drivers": ["ixgbevf"],
                    "pfNames": ["enp3s0f0#8-15"]
                }
            },
            {
                "resourceName": "intel_sriov_dpdk1",
                "selectors": {
                    "drivers": ["vfio-pci"],
                    "pfNames": ["enp3s0f1#0-7"]
                }
            },
            {
                "resourceName": "intel_sriov_kernel1",
                "selectors": {
                    "drivers": ["ixgbevf"],
                    "pfNames": ["enp3s0f1#8-15"]
                }
            }
        ]
    }
Copy
Create NetworkAttachDefinition of DPDK type
YAML
kind: NetworkAttachmentDefinition
metadata:
  name: sriov-net-a
  annotations:
    k8s.v1.cni.cncf.io/resourceName: intel.com/intel_sriov_dpdk_a
spec:
  config: '{
  "type": "sriov",
  "cniVersion": "0.3.1",
  "name": "sriov-network-a",
  "vlan": 100,
  "vlanQoS": 1,
  "max_tx_rate": 100,
  "spoofchk": "off",
  "trust": "on"
}'
Copy
Network Attach Definition Validation SR-IOV-DPDK type
Let’s validate our work by listing and describing our new Network Attach Definition

Bash
$ kubectl  get net-attach-def
NAME                      AGE
sriov-dpdk0               15s
Copy
Bash
$  kubectl describe net-attach-def sriov-dpdk0
Name:         sriov-dpdk0
Namespace:    default
Labels:       <none>
Annotations:  k8s.v1.cni.cncf.io/resourceName: intel.com/intel_sriov_dpdk0
              kubectl.kubernetes.io/last-applied-configuration:
                {"apiVersion":"k8s.cni.cncf.io/v1","kind":"NetworkAttachmentDefinition","metadata":{"annotations":{"k8s.v1.cni.cncf.io/resourceName":"inte...
API Version:  k8s.cni.cncf.io/v1
Kind:         NetworkAttachmentDefinition
Metadata:
  Creation Timestamp:  2020-10-05T20:25:57Z
  Generation:          1
  Resource Version:    2310115
  Self Link:           /apis/k8s.cni.cncf.io/v1/namespaces/default/network-attachment-definitions/sriov-dpdk0
  UID:                 5307140a-3771-41b4-845e-1aa8460acffc
Spec:
  Config:  { "cniVersion": "0.3.1", "name": "sriov-dpdk0", "type": "sriov", "vlan": 90 }
Events:    <none>
Copy
Create Pods with SR-IOV interfaces (DPDK Driver - vfio-pci)
YAML
# cat sriov-pod-2.yaml
apiVersion: v1
kind: Pod
metadata:
  name: sriov-pod-2
  annotations:
    k8s.v1.cni.cncf.io/networks: sriov-net-a
spec:
  containers:
  - name: sriov-example
    image: rparikh/dpdk-app-centos
    securityContext:
      privileged: true
    volumeMounts:
    - mountPath: /etc/podnetinfo
      name: podnetinfo
      readOnly: false
    - mountPath: /dev/hugepages
      name: hugepage
    resources:
      requests:
        memory: 1Gi
        #cpu: "4"
        intel.com/intel_sriov_dpdk_a: '1'
      limits:
        hugepages-1Gi: 2Gi
        #cpu: "4"
        intel.com/intel_sriov_dpdk_a: '1'
    # Uncomment to control which DPDK App is running in container.
    # If not provided, l3fwd is default.
    #   Options: l2fwd l3fwd testpmd
    env:
    - name: DPDK_SAMPLE_APP
      value: "testpmd"
    #
    # Uncomment to debug DPDK App or to run manually to change
    # DPDK command line options.
    command: ["sleep", "infinity"]
  volumes:
  - name: podnetinfo
    downwardAPI:
      items:
        - path: "labels"
          fieldRef:
            fieldPath: metadata.labels
        - path: "annotations"
          fieldRef:
            fieldPath: metadata.annotations
  - name: hugepage
    emptyDir:
      medium: HugePages
Copy
Deploy the new pods

Bash
$ kubectl apply -f sriov-pod-2.yaml
Copy
Validate Pods Creation with SR-IOV interfaces (DPDK - Driver vfio-pci)
Let’s validate your work by confirming that the created pods got successfully created by doing the following commands:

Bash
$ kubectl get pods -o wide
NAME          READY   STATUS    RESTARTS   AGE     IP              NODE             NOMINATED NODE   READINESS GATES
sriov-pod-2   1/1     Running   0          5d21h   10.167.181.11   10.128.237.204   <none>           <none>
Copy
SR-IOV DPDK Driver - vfio-pci Validation
Bash
$ kubectl exec -it sriov-pod-2 -- sh
sh-4.4# dpdk-app
ENTER dpdk-app:
 argc=1
 dpdk-app
  cpuRsp.CPUSet = 0-31
  Interface[0]:
    IfName=""  Name=""  Type=SR-IOV
    MAC=""  IP="10.143.181.4"
    PCIAddress=0000:03:10.7
 myArgc=14
 dpdk-app -n 4 -l 1 --master-lcore 1 -w 0000:03:10.7 -- -p 0x1 -P --config="(0,0,1)" --parse-ptype