.. index:: pair: group; Reset NIC with SIOCETHTOOL .. _doxid-group__basic-ethtool__reset__nic: Reset NIC with SIOCETHTOOL ========================== .. toctree:: :hidden: Check what happens when NIC is reset with ``SIOCETHTOOL``. Scenarios: X3-ST10, X3-ET019, X3-ET020. #. Establish connection between a pair of sockets of type **sock_type** on IUT and Tester. #. 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. #. If IPv6 is checked, enable **keep_addr_on_down** setting on the IUT interface to avoid network address disappearance when interface is reset. #. If **if_down** is ``TRUE``, set the IUT interface DOWN. #. Call ioctl(``SIOCETHTOOL`` / ``ETHTOOL_RESET``) with reset flags set according to **flag** on the IUT interface. #. Check that interface statistics is zeroed now (unless **flag** is ``none`` and interface was not set DOWN). #. If **if_down** is ``TRUE``, bring the IUT interface UP. #. Wait until link status for the IUT interface is reported to be UP in configuration tree. #. Check again that data can be sent and received in both directions between IUT and Tester sockets. Yurij Plotnikov `Yurij.Plotnikov@arknetworks.am `__ .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - env - Testing environment: * :ref:`env.peer2peer ` * :ref:`env.peer2peer_ipv6 ` * - 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.