53. External Mempool Handler Tests

External Mempool Handler feature is an extension to the mempool API that allows users to add and use an alternative mempool handler, which allows external memory subsystems such as external hardware memory management systems and software based memory allocators to be used with DPDK.

53.1. Test Case 1: Multiple producers and multiple consumers

  1. Change default mempool handler operations to “ring_mp_mc”:

    sed -i 's/CONFIG_RTE_MBUF_DEFAULT_MEMPOOL_OPS=.*$/CONFIG_RTE_MBUF_DEFAULT_MEMPOOL_OPS=\"ring_mp_mc\"/' ./config/common_base
    
  2. Start test app and verify mempool autotest passed:

    test -n 4 -c f
    RTE>> mempool_autotest
    
  3. Start testpmd with two ports and start forwarding:

    testpmd -c 0x6 -n 4  -- -i --portmask=0x3 --tx-offloads=0x8fff
    testpmd> set fwd mac
    testpmd> start
    
  4. Send hundreds of packets from tester ports

  5. verify forwarded packets sequence and integrity

53.2. Test Case 2: Single producer and Single consumer

  1. Change default mempool operation to “ring_sp_sc”:

    sed -i 's/CONFIG_RTE_MBUF_DEFAULT_MEMPOOL_OPS=.*$/CONFIG_RTE_MBUF_DEFAULT_MEMPOOL_OPS=\"ring_sp_sc\"/' ./config/common_base
    
  2. Start test app and verify mempool autotest passed:

    test -n 4 -c f
    RTE>> mempool_autotest
    
  3. Start testpmd with two ports and start forwarding:

    testpmd -c 0x6 -n 4  -- -i --portmask=0x3 --tx-offloads=0x8fff
    testpmd> set fwd mac
    testpmd> start
    
  4. Send hundreds of packets from tester ports

  5. verify forwarded packets sequence and integrity

53.3. Test Case 3: Single producer and Multiple consumers

  1. Change default mempool operation to “ring_sp_mc”:

    sed -i 's/CONFIG_RTE_MBUF_DEFAULT_MEMPOOL_OPS=.*$/CONFIG_RTE_MBUF_DEFAULT_MEMPOOL_OPS=\"ring_sp_mc\"/' ./config/common_base
    
  2. Start test app and verify mempool autotest passed:

    test -n 4 -c f
    RTE>> mempool_autotest
    
  3. Start testpmd with two ports and start forwarding:

    testpmd -c 0x6 -n 4  -- -i --portmask=0x3 --tx-offloads=0x8fff
    testpmd> set fwd mac
    testpmd> start
    
  4. Send hundreds of packets from tester ports

  5. verify forwarded packets sequence and integrity

53.4. Test Case 4: Multiple producers and single consumer

  1. Change default mempool operation to “ring_mp_sc”:

    sed -i 's/CONFIG_RTE_MBUF_DEFAULT_MEMPOOL_OPS=.*$/CONFIG_RTE_MBUF_DEFAULT_MEMPOOL_OPS=\"ring_mp_sc\"/' ./config/common_base
    
  2. Start test app and verify mempool autotest passed:

    test -n 4 -c f
    RTE>> mempool_autotest
    
  3. Start testpmd with two ports and start forwarding:

    testpmd -c 0x6 -n 4  -- -i --portmask=0x3 --tx-offloads=0x8fff
    testpmd> set fwd mac
    testpmd> start
    
  4. Send hundreds of packets from tester ports

  5. verify forwarded packets sequence and integrity

53.5. Test Case 4: Stack mempool handler

  1. Change default mempool operation to “stack”:

    sed -i 's/CONFIG_RTE_MBUF_DEFAULT_MEMPOOL_OPS=.*$/CONFIG_RTE_MBUF_DEFAULT_MEMPOOL_OPS=\"stack\"/' ./config/common_base
    
  2. Start test app and verify mempool autotest passed:

    test -n 4 -c f
    RTE>> mempool_autotest
    
  3. Start testpmd with two ports and start forwarding:

    testpmd -c 0x6 -n 4  -- -i --portmask=0x3 --tx-offloads=0x8fff
    testpmd> set fwd mac
    testpmd> start
    
  4. Send hundreds of packets from tester ports

  5. verify forwarded packets sequence and integrity