.. index:: pair: group; MTU usage for TCP packets .. _doxid-group__basic-mtu__tcp: MTU usage for TCP packets ========================= .. toctree:: :hidden: Check that TCP packets of full MTU size are sent and processed correctly. Scenarios: X3-SYS04. #. If **tx** is ``TRUE``, make sure that receive offloads are disabled on Tester interface, so that CSAP there will receive IUT packets not modified in any way. #. If **tx** is ``FALSE``, make sure that TCP segmentation offload is disabled on Tester interface, so that CSAP sees packets there exactly as they are sent. #. Set MTU on IUT and Tester interfaces to **mtu**. #. Enable or disable Generic Segmentation Offload on IUT according to **gso_on**. #. Enable or disable TCP Segmentation Offload on IUT according to **tso_on**. #. Create a pair of connected TCP sockets on IUT and Tester. #. Get payload size in MTU-sized packet from ``TCP_MAXSEG`` option value on IUT socket. #. If **tx** is ``TRUE``, sender is IUT and receiver is Tester, otherwise - the other way around. #. On the sender socket enable ``TCP_NODELAY`` option so that packets are sent as soon as possible even if they are small. #. Create a CSAP on Tester to capture packets sent from (if **tx** is ``TRUE``) or to (if **tx** is ``FALSE``) IUT. #. In a loop for **sends_num** times: * Send some data from sender, choosing its size randomly but according to **pkt_size**. * Check that receiver socket becomes readable. * Receive and check data on the receiver. * Obtain packets captured by CSAP, check that sizes of all the packets except the last one correspond to **mtu**. Dmitry Izbitsky `Dmitry.Izbitsky@oktetlabs.ru `__ .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - env - Testing environment: * :ref:`env.peer2peer ` * :ref:`env.peer2peer_ipv6 ` * - mtu - MTU to be set: * ``512`` * ``1280`` * ``1500`` * ``1600`` * ``9000`` * - tx - If ``TRUE``, send from IUT to Tester, else - the other way around. * - gso_on - Should Generic Segmentation Offload be enabled on IUT? * - tso_on - Should TCP Segmentation Offload be enabled on IUT? * - pkt_size - Data size for **send()** call (in terms of MTUs): * ``less`` * ``equal`` * ``more`` * - sends_num - How many times to send data: * ``100``