[riot-notifications] [RIOT-OS/RIOT] test_utils: add UDP benchmark (#16710)

Karl Fessel notifications at github.com
Wed Aug 25 14:53:26 CEST 2021


when i did  multiple starts one after another the client looked up some times
```
RIOT network stack example application
All up, running the shell now
> benchmark start fe80::xxxx:xxxx:xxxx:4f64 1234
benchmark start fe80::xxxx:xxxx:xxxx:4f64 1234
> benchmark start fe80::xxxx:xxxx:xxxx:4f64 1234
benchmark start fe80::xxxx:xxxx:xxxx:4f64 1234
> benchmark start fe80::xxxx:xxxx:xxxx:4f64 1234
benchmark start fe80::xxxx:xxxx:xxxx:4f64 1234
> benchmark start fe80::xxxx:xxxx:xxxx:4f64 1234
benchmark start fe80::xxxx:xxxx:xxxx:4f64 1234
> benchmark start fe80::xxxx:xxxx:xxxx:4f64 1234
benchmark start fe80::xxxx:xxxx:xxxx:4f64 1234
benchmark start fe80::xxxx:xxxx:xxxx:4f64 1234^C
Program received signal SIGINT, Interrupt.
0x5656857a in _netreg_lookup (from=0x0, type=type at entry=GNRC_NETTYPE_UDP, demux_ctx=demux_ctx at entry=4294901760) at /home/k_f/ws_RIOT/RIOT_tree/sys/net/gnrc/netreg/gnrc_netreg.c:98
98              LL_SEARCH_SCALAR(head, res, demux_ctx, demux_ctx);
(gdb) frame 5
#5  0x5656da54 in sock_udp_send_aux (sock=0x565918a0 <sock>, data=0x5658d4a0 <buf_tx>, len=516, remote=0x565916c4 <send_thread_stack+7716>, aux=0x0) at /home/k_f/ws_RIOT/RIOT_tree/sys/net/gnrc/sock/udp/gnrc_sock_udp.c:375
375         res = gnrc_sock_send(pkt, &local, rem, PROTNUM_UDP);
(gdb) p sock
$1 = (sock_udp_t *) 0x565918a0 <sock>
(gdb) p *sock
$2 = {reg = {entry = {next = 0x565918a0 <sock>, demux_ctx = 1234, type = GNRC_NETREG_TYPE_MBOX, target = {pid = 6320, mbox = 0x565918b0 <sock+16>}}, mbox = {readers = {next = 0x5658f878 <listen_thread_stack+8152>}, writers = {
        next = 0x0}, cib = {read_count = 1, write_count = 1, mask = 7}, msg_array = 0x565918c8 <sock+40>}, mbox_queue = {{sender_pid = 9, type = 33908, content = {ptr = 0xf38a0b63, value = 4085910371}}, {sender_pid = 5, type = 513, 
        content = {ptr = 0x565a1980 <_pktbuf_buf>, value = 1448745344}}, {sender_pid = 5, type = 513, content = {ptr = 0x565a1980 <_pktbuf_buf>, value = 1448745344}}, {sender_pid = 5, type = 513, content = {
          ptr = 0x565a1980 <_pktbuf_buf>, value = 1448745344}}, {sender_pid = 5, type = 513, content = {ptr = 0x565a1980 <_pktbuf_buf>, value = 1448745344}}, {sender_pid = 5, type = 33908, content = {ptr = 0xf38a0b63, 
          value = 4085910371}}, {sender_pid = 5, type = 513, content = {ptr = 0x565a1980 <_pktbuf_buf>, value = 1448745344}}, {sender_pid = 5, type = 513, content = {ptr = 0x565a1980 <_pktbuf_buf>, value = 1448745344}}}}, local = {
    family = 4, addr = {ipv6 = '\000' <repeats 15 times>, ipv4 = "\000\000\000", ipv4_u32 = 0}, netif = 0, port = 1234}, remote = {family = 0, addr = {ipv6 = '\000' <repeats 15 times>, ipv4 = "\000\000\000", ipv4_u32 = 0}, netif = 0, 
    port = 0}, flags = 0}
(gdb) 
```

maybe the listener is able to close the sock while the sender is going to write it.

The sock close might be better placed in the `stop` but this may cause a dangling listener_thread


-- 
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/16710#issuecomment-905475047
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20210825/59e2736a/attachment.htm>


More information about the notifications mailing list