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.
Initialize EAL, configure iut_port to provide 1 Rx queue and start the port
Set mtu on iut_port in ethdev_state
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 lostTest verdict with the current MTU value
Change tst_if MTU to be able to transmit bigger frames if required
Start the Ethernet device
Test verdict with the current MTU value after device start
Ensure that interface is UP on Tester side
Transmit and sniff packet with size equal to the test_mtu from tst_if to the iut_port
Transmit and sniff packet with size equal to the test_mtu plus excess_mtu from tst_if to the iut_port
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 |