我要评分
获取效率
正确性
完整性
易理解

OVS Queue Selection Optimization

When a VM is configured with multiple queues, the CPU running the qperf tool may be different from the CPU handling virtio-net input interrupts. In this case, the VM may exit due to inter-processor interrupts (IPIs), increasing latency overhead. In latency-sensitive scenarios, the packet sending queue selection logic on the OVS can be modified to add a sending mode. When the PMD receives a network packet from the VM, it records the 5-tuple information and queue ID. When it sends packets to the VM later, it matches the queue ID based on the 5-tuple information. In this way, VM exits caused by IPIs and packet transmission latency can be reduced.

  1. Download DPDK 24.11 source code.
    1
    git clone https://github.com/DPDK/dpdk.git -b v24.11
    
  2. Download the DPDK queue selection optimization patch.
    1
    2
    git clone https://gitee.com/kunpeng_compute/boostkit_-virtualization.git
    cd boostkit_virtualization/dpdk/dpdk-24.11
    
  3. Apply the patch to the DPDK source code.
    1
    2
    3
    cp [Virtualization_Loss_Optimization]0001-Adding-a-new-transmission-mode-TXQ_REQ.patch ../../dpdk
    cd ../../dpdk
    patch -p1 < [Virtualization_Loss_Optimization]0001-Adding-a-new-transmission-mode-TXQ_REQ.patch
    
  4. Compile the DPDK.
    1
    meson  -Ddisable_drivers=mlx4 --prefix=/usr --libdir=/usr/lib64 --bindir=/usr/bin --sbindir=/usr/sbin --includedir=/usr/include/dpdk -Dc_args="-O2 -g -fstack-protector-strong" -Dc_link_args="-g -Wl,-z,relro,-z,now,-z,noexecstack" -Denable_kmods=true build
    
  5. Enable DPDK queue selection optimization.
    1
    ovs-vsctl set Interface tap0 other_config:tx-steering=txfollowrx
    

    To disable this optimization, run the following command:

    1
    ovs-vsctl remove Interface tap0 other_config tx-steering