Reset NIC with SIOCETHTOOLΒΆ

Check what happens when NIC is reset with SIOCETHTOOL.

Scenarios: X3-ST10, X3-ET019, X3-ET020.

  1. Establish connection between a pair of sockets of type sock_type on IUT and Tester.

  2. Check that data can be sent in both directions over the established connection. Send a lot of data so that it will be easier to tell whether counters are reset later.

  3. If IPv6 is checked, enable keep_addr_on_down setting on the IUT interface to avoid network address disappearance when interface is reset.

  4. If if_down is TRUE, set the IUT interface DOWN.

  5. Call ioctl(SIOCETHTOOL / ETHTOOL_RESET) with reset flags set according to flag on the IUT interface.

  6. Check that interface statistics is zeroed now (unless flag is none and interface was not set DOWN).

  7. If if_down is TRUE, bring the IUT interface UP.

  8. Wait until link status for the IUT interface is reported to be UP in configuration tree.

  9. Check again that data can be sent and received in both directions between IUT and Tester sockets.

Yurij Plotnikov Yurij.Plotnikov@arknetworks.am

Parameters:

env

Testing environment:

flag

ETHTOOL_RESET flag to pass.

sock_type

Socket type:

  • SOCK_STREAM

  • SOCK_DGRAM

if_down

If TRUE, interface should be set DOWN before resetting it.