[riot-notifications] [RIOT-OS/RIOT] gnrc_tcp: test improvement (#11930)

Simon Brummer notifications at github.com
Wed Sep 25 18:23:39 CEST 2019


brummer-simon commented on this pull request.



> +    # Verify that RIOT Applications internal buffer can hold test data.
+    assert setup_internal_buffer(child) >= data_len
+
+    server_handle = threading.Thread(target=tcp_server, args=(port, data))
+    server_handle.start()
+
+    target_addr = get_host_ll_addr(get_host_tap_device()) + '%' + get_riot_if_id(child)
+
+    # Setup RIOT Node to connect to Hostsystems TCP Server
+    child.sendline('gnrc_tcp_tcb_init')
+    child.sendline('gnrc_tcp_open_active AF_INET6 ' + target_addr + " " + str(port) + ' 0')
+    child.expect_exact('gnrc_tcp_open_active: returns 0')
+
+    # Accept Data sent by the host system
+    child.sendline('gnrc_tcp_recv 0 ' + str(data_len))
+    child.expect_exact('gnrc_tcp_recv: received ' + str(data_len))

Could be Nagles algorithm too.

Sending a packet from Linux does not necessarily mean that it is sent directly. Since gnrc_tcp_recv is called directly after sending it might be that the call tries to fetch data that was not sent before -> repeated -EAGAIN until the packet is actually sent. 

I'll see what I can find on the weekend.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/11930#discussion_r328219148
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190925/65078ab0/attachment.htm>


More information about the notifications mailing list