Set mtu testΒΆ

Set MTU of IUT

Make sure that when we set the MTU, the port receives packets with size of no more than MTU, and does not receive others.

  1. Initialize EAL, configure iut_port to provide 1 Rx queue and start the port

  2. Set mtu on iut_port in ethdev_state

  3. If ethdev_state is TEST_ETHDEV_STARTED, wait one more time for the link to become ready because in certain cases MTU change may result in port restart and, thus, some traffic might be lost

  4. Test verdict with the current MTU value

  5. Change tst_if MTU to be able to transmit bigger frames if required

  6. Start the Ethernet device

  7. Test verdict with the current MTU value after device start

  8. Ensure that interface is UP on Tester side

  9. Transmit and sniff packet with size equal to the test_mtu from tst_if to the iut_port

  10. Transmit and sniff packet with size equal to the test_mtu plus excess_mtu from tst_if to the iut_port

  11. Receive packets on port iut_port. Check that the first received packet matches the first sent and the second was dropped

Parameters:

mtu

MTU on IUT

excess_mtu

The excess of the MTU value

ethdev_state

The state of Ethernet device