Prove that VLAN ID is kept on port restart

Make sure that PMD does not loose previously configured VLAN TCI if a port restart takes place between two packet bursts with the same VLAN TCI set in the mbufs before and after the port restart

The test is to verify that PMD is able to preserve VLAN TCI established once at the beginning of a packet burst in case if the port restart is done after the burst is sent and before the next one is prepared with the same VLAN TCI

The task is fulfilled by sending a couple of packets with the same VLAN TCI set in the mbufs: one before and one after restart is performed on the port

  1. Initialize ethdev and obtain the device information

  2. Check if VLAN insertion offload is supported and enable it

  3. Prepare TEST_ETHDEV_CONFIGURED state

  4. Adjust TxQ settings (if need be)

  5. Prepare TEST_ETHDEV_STARTED state

  6. Start the TxQ (if need be)

  7. Obtain the source Ethernet address

  8. Adjust the traffic template

  9. Adjust so-called 'send transformations' for the packets

  10. Generate mbufs and the corresponding pattern for the packets

  11. Create an RX CSAP on the TST host according to the template

  12. Start to capture traffic with the pattern prepared

  13. Ensure that interface is UP on Tester side

  14. Validate and send the first packet

  15. Stop the port, wait for a small amount of time, start the port

  16. Start the TxQ (if need be)

  17. Ensure that interface is UP on Tester side after restart

  18. Validate and send the second packet

  19. Verify the number of matching packets received

Parameters:

template

Traffic template

vlan_id

VLAN ID or -1 (disable)

deferred_txq_start

Use deferred start for the TxQ