Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sys/net/gnrc: implement sock_aux_timestamp for TX #15883

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

maribu
Copy link
Member

@maribu maribu commented Jan 29, 2021

Contribution description

  • Introduce type netdev_tx_info_t, which contains a timestamp if (pseudo-)module netdev_tx_info_timestamp is used
  • Extend gnrc_tx_sync_t to contain a member netdev_tx_info_t tx_info, which can be used to transfer TX info up the stack
  • Extend gnrc_netif to pass the new tx_info member of gnrc_tx_sync_t to netdev_driver_t::confirm_send() when module gnrc_tx_sync is used
  • Extend gnrc_sock to pass timestamp in gnrc_tx_sync_t::tx_info up to sock_udp_send_aux() / sock_ip_send_aux(), which in turn are extended to pass this on to the user
  • Implement PTP timestamping for TX in stm32_eth

Testing procedure

  • make BOARD=nucleo-f767zi -C tests/sock_udp_aux flash term
  • Check the IPv6 address of the Nucleo via ifconfig
  • Send UDP packets directed at port 12345 of the Nucleo

The output should look like this

2021-01-29 09:53:25,054 # main(): This is RIOT! (Version: 2021.04-devel-366-g1932ed-tx_timestamp)
2021-01-29 09:53:25,058 # UDP echo server listening at port 12345
> ifconfig
2021-01-29 09:53:28,013 #  ifconfig
2021-01-29 09:53:28,018 # Iface  4  HWaddr: AA:C8:16:C2:3C:6D  Link: up 
2021-01-29 09:53:28,024 #           L2-PDU:1500  MTU:1500  HL:64  Source address length: 6
2021-01-29 09:53:28,027 #           Link type: wired
2021-01-29 09:53:28,032 #           inet6 addr: fe80::a8c8:16ff:fec2:3c6d  scope: link  VAL
2021-01-29 09:53:28,035 #           inet6 group: ff02::1
2021-01-29 09:53:28,038 #           inet6 group: ff02::1:ffc2:3c6d
2021-01-29 09:53:28,039 #           
2021-01-29 09:53:28,042 #           Statistics for Layer 2
2021-01-29 09:53:28,045 #             RX packets 2  bytes 180
2021-01-29 09:53:28,050 #             TX packets 2 (Multicast: 2)  bytes 140
2021-01-29 09:53:28,053 #             TX succeeded 2 errors 0
2021-01-29 09:53:28,056 #           Statistics for IPv6
2021-01-29 09:53:28,059 #             RX packets 2  bytes 152
2021-01-29 09:53:28,063 #             TX packets 2 (Multicast: 2)  bytes 112
2021-01-29 09:53:28,067 #             TX succeeded 2 errors 0
2021-01-29 09:53:28,067 # 
>
2021-01-29 09:53:33,848 # Received a message via: [fe80::a8c8:16ff:fec2:3c6d]:12345
2021-01-29 09:53:33,851 # Received a message at: 8795389140 ns
2021-01-29 09:53:33,854 # Received a message with: No RSSI value
2021-01-29 09:53:33,857 # Sent echo at: 8807312980 ns
2021-01-29 09:53:33,862 # Received a message via: [fe80::a8c8:16ff:fec2:3c6d]:12345
2021-01-29 09:53:33,865 # Received a message at: 8807667580 ns
2021-01-29 09:53:33,869 # Received a message with: No RSSI value
2021-01-29 09:53:33,871 # Sent echo at: 8821608820 ns
2021-01-29 09:53:42,175 # Received a message via: [fe80::a8c8:16ff:fec2:3c6d]:12345
2021-01-29 09:53:42,179 # Received a message at: 17122866530 ns
2021-01-29 09:53:42,182 # Received a message with: No RSSI value
2021-01-29 09:53:42,185 # Sent echo at: 17134910120 ns
2021-01-29 09:53:42,190 # Received a message via: [fe80::a8c8:16ff:fec2:3c6d]:12345
2021-01-29 09:53:42,193 # Received a message at: 17135254480 ns
2021-01-29 09:53:42,196 # Received a message with: No RSSI value
2021-01-29 09:53:42,199 # Sent echo at: 17149379960 ns
2021-01-29 09:53:43,471 # Received a message via: [fe80::a8c8:16ff:fec2:3c6d]:12345
2021-01-29 09:53:43,474 # Received a message at: 18418614030 ns
2021-01-29 09:53:43,478 # Received a message with: No RSSI value
2021-01-29 09:53:43,481 # Sent echo at: 18430627420 ns
2021-01-29 09:53:43,486 # Received a message via: [fe80::a8c8:16ff:fec2:3c6d]:12345
2021-01-29 09:53:43,489 # Received a message at: 18430879180 ns
2021-01-29 09:53:43,492 # Received a message with: No RSSI value
2021-01-29 09:53:43,495 # Sent echo at: 18445097980 ns

Issues/PRs references

Depends on and includes:

@maribu maribu added Area: network Area: Networking Type: new feature The issue requests / The PR implemements a new feature for RIOT State: waiting for other PR State: The PR requires another PR to be merged first Area: drivers Area: Device drivers labels Jan 29, 2021
@maribu maribu requested review from miri64 and benpicco January 29, 2021 08:55
@maribu maribu force-pushed the tx_timestamp branch 3 times, most recently from d447d03 to 192b89b Compare February 10, 2021 14:08
@MrKevinWeiss MrKevinWeiss added this to the Release 2021.07 milestone Jun 22, 2021
@MrKevinWeiss MrKevinWeiss removed this from the Release 2021.07 milestone Jul 15, 2021
@stale
Copy link

stale bot commented Mar 2, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you want me to ignore this issue, please mark it with the "State: don't stale" label. Thank you for your contributions.

@stale stale bot added the State: stale State: The issue / PR has no activity for >185 days label Mar 2, 2022
@stale stale bot closed this Apr 16, 2022
@maribu maribu reopened this Apr 16, 2022
@stale stale bot removed the State: stale State: The issue / PR has no activity for >185 days label Apr 16, 2022
@github-actions github-actions bot added Area: build system Area: Build system Area: cpu Area: CPU/MCU ports Area: sys Area: System Area: tests Area: tests and testing framework Platform: ARM Platform: This PR/issue effects ARM-based platforms labels Apr 16, 2022
@stale
Copy link

stale bot commented Nov 2, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you want me to ignore this issue, please mark it with the "State: don't stale" label. Thank you for your contributions.

@stale stale bot added the State: stale State: The issue / PR has no activity for >185 days label Nov 2, 2022
@benpicco
Copy link
Contributor

benpicco commented Nov 2, 2022

IIRC we have some form of confirm send now?

@stale stale bot removed the State: stale State: The issue / PR has no activity for >185 days label Nov 2, 2022
@maribu
Copy link
Member Author

maribu commented Nov 2, 2022

Yes, this should indeed work, provided that a driver would actually use confirm_send. But with lwIP support still missing, conversion of drivers has not started yet :/

@benpicco
Copy link
Contributor

This needs a rebase.

@github-actions github-actions bot removed the Area: tests Area: tests and testing framework label May 13, 2024
@maribu
Copy link
Member Author

maribu commented May 13, 2024

This was a hell of a rebase, but it seems to work:

$ make BOARD=nucleo-f767zi flash term -C tests/net/sock_udp_aux
Building application "tests_sock_udp_aux" for "nucleo-f767zi" with CPU "stm32".

"make" -C /home/maribu/Repos/software/RIOT/master/pkg/cmsis/ 
"make" -C /home/maribu/Repos/software/RIOT/master/boards/common/init
"make" -C /home/maribu/Repos/software/RIOT/master/boards/nucleo-f767zi
Remapping MOSI of SPI_DEV(0) from PA7 to PB5 to solve pin conflict. (PA7 is also connected to the RMII_DV of the Ethernet Phy.)
"make" -C /home/maribu/Repos/software/RIOT/master/boards/common/nucleo
"make" -C /home/maribu/Repos/software/RIOT/master/core
"make" -C /home/maribu/Repos/software/RIOT/master/core/lib
"make" -C /home/maribu/Repos/software/RIOT/master/cpu/stm32
"make" -C /home/maribu/Repos/software/RIOT/master/cpu/cortexm_common
"make" -C /home/maribu/Repos/software/RIOT/master/cpu/cortexm_common/periph
"make" -C /home/maribu/Repos/software/RIOT/master/cpu/stm32/periph
"make" -C /home/maribu/Repos/software/RIOT/master/cpu/stm32/stmclk
"make" -C /home/maribu/Repos/software/RIOT/master/cpu/stm32/vectors
"make" -C /home/maribu/Repos/software/RIOT/master/drivers
"make" -C /home/maribu/Repos/software/RIOT/master/drivers/netdev
"make" -C /home/maribu/Repos/software/RIOT/master/drivers/periph_common
"make" -C /home/maribu/Repos/software/RIOT/master/sys
"make" -C /home/maribu/Repos/software/RIOT/master/sys/auto_init
"make" -C /home/maribu/Repos/software/RIOT/master/sys/div
"make" -C /home/maribu/Repos/software/RIOT/master/sys/event
"make" -C /home/maribu/Repos/software/RIOT/master/sys/evtimer
"make" -C /home/maribu/Repos/software/RIOT/master/sys/fmt
"make" -C /home/maribu/Repos/software/RIOT/master/sys/frac
"make" -C /home/maribu/Repos/software/RIOT/master/sys/iolist
"make" -C /home/maribu/Repos/software/RIOT/master/sys/isrpipe
"make" -C /home/maribu/Repos/software/RIOT/master/sys/libc
"make" -C /home/maribu/Repos/software/RIOT/master/sys/luid
"make" -C /home/maribu/Repos/software/RIOT/master/sys/malloc_thread_safe
"make" -C /home/maribu/Repos/software/RIOT/master/sys/net/crosslayer/inet_csum
"make" -C /home/maribu/Repos/software/RIOT/master/sys/net/gnrc
"make" -C /home/maribu/Repos/software/RIOT/master/sys/net/gnrc/netapi
"make" -C /home/maribu/Repos/software/RIOT/master/sys/net/gnrc/netif
"make" -C /home/maribu/Repos/software/RIOT/master/sys/net/gnrc/netif/ethernet
"make" -C /home/maribu/Repos/software/RIOT/master/sys/net/gnrc/netif/hdr
"make" -C /home/maribu/Repos/software/RIOT/master/sys/net/gnrc/netif/init_devs
"make" -C /home/maribu/Repos/software/RIOT/master/sys/net/gnrc/netreg
"make" -C /home/maribu/Repos/software/RIOT/master/sys/net/gnrc/network_layer/icmpv6
"make" -C /home/maribu/Repos/software/RIOT/master/sys/net/gnrc/network_layer/icmpv6/echo
"make" -C /home/maribu/Repos/software/RIOT/master/sys/net/gnrc/network_layer/ipv6
"make" -C /home/maribu/Repos/software/RIOT/master/sys/net/gnrc/network_layer/ipv6/hdr
"make" -C /home/maribu/Repos/software/RIOT/master/sys/net/gnrc/network_layer/ipv6/nib
"make" -C /home/maribu/Repos/software/RIOT/master/sys/net/gnrc/network_layer/ndp
"make" -C /home/maribu/Repos/software/RIOT/master/sys/net/gnrc/pkt
"make" -C /home/maribu/Repos/software/RIOT/master/sys/net/gnrc/pktbuf
"make" -C /home/maribu/Repos/software/RIOT/master/sys/net/gnrc/pktbuf_static
"make" -C /home/maribu/Repos/software/RIOT/master/sys/net/gnrc/sock
"make" -C /home/maribu/Repos/software/RIOT/master/sys/net/gnrc/sock/udp
"make" -C /home/maribu/Repos/software/RIOT/master/sys/net/gnrc/transport_layer/udp
"make" -C /home/maribu/Repos/software/RIOT/master/sys/net/gnrc/tx_sync
"make" -C /home/maribu/Repos/software/RIOT/master/sys/net/link_layer/eui_provider
"make" -C /home/maribu/Repos/software/RIOT/master/sys/net/link_layer/l2util
"make" -C /home/maribu/Repos/software/RIOT/master/sys/net/netif
"make" -C /home/maribu/Repos/software/RIOT/master/sys/net/netutils
"make" -C /home/maribu/Repos/software/RIOT/master/sys/net/network_layer/icmpv6
"make" -C /home/maribu/Repos/software/RIOT/master/sys/net/network_layer/ipv6/addr
"make" -C /home/maribu/Repos/software/RIOT/master/sys/net/network_layer/ipv6/hdr
"make" -C /home/maribu/Repos/software/RIOT/master/sys/net/transport_layer/udp
"make" -C /home/maribu/Repos/software/RIOT/master/sys/newlib_syscalls_default
"make" -C /home/maribu/Repos/software/RIOT/master/sys/pm_layered
"make" -C /home/maribu/Repos/software/RIOT/master/sys/preprocessor
"make" -C /home/maribu/Repos/software/RIOT/master/sys/ps
"make" -C /home/maribu/Repos/software/RIOT/master/sys/random
"make" -C /home/maribu/Repos/software/RIOT/master/sys/shell
"make" -C /home/maribu/Repos/software/RIOT/master/sys/shell/cmds
"make" -C /home/maribu/Repos/software/RIOT/master/sys/stdio
"make" -C /home/maribu/Repos/software/RIOT/master/sys/stdio_uart
"make" -C /home/maribu/Repos/software/RIOT/master/sys/tsrb
"make" -C /home/maribu/Repos/software/RIOT/master/sys/ztimer
   text	  data	   bss	   dec	   hex	filename
  61028	   172	 15760	 76960	 12ca0	/home/maribu/Repos/software/RIOT/master/tests/net/sock_udp_aux/bin/nucleo-f767zi/tests_sock_udp_aux.elf
/home/maribu/Repos/software/RIOT/master/dist/tools/openocd/openocd.sh flash /home/maribu/Repos/software/RIOT/master/tests/net/sock_udp_aux/bin/nucleo-f767zi/tests_sock_udp_aux.elf
### Flashing Target ###
Open On-Chip Debugger 0.12.0+dev-snapshot (2024-01-17-08:38)
Licensed under GNU GPL v2
For bug reports, read
	http://openocd.org/doc/doxygen/bugs.html
DEPRECATED! use 'adapter serial' not 'hla_serial'
hla_swd
Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
srst_only separate srst_nogate srst_open_drain connect_assert_srst
Info : clock speed 2000 kHz
Info : STLINK V2J38M27 (API v2) VID:PID 0483:374B
Info : Target voltage: 3.246224
Info : [stm32f7x.cpu] Cortex-M7 r1p0 processor detected
Info : [stm32f7x.cpu] target has 8 breakpoints, 4 watchpoints
Info : [stm32f7x.cpu] Examination succeed
Info : starting gdb server for stm32f7x.cpu on 0
Info : Listening on port 43969 for gdb connections
    TargetName         Type       Endian TapName            State       
--  ------------------ ---------- ------ ------------------ ------------
 0* stm32f7x.cpu       hla_target little stm32f7x.cpu       unknown
Info : Unable to match requested speed 2000 kHz, using 1800 kHz
Info : Unable to match requested speed 2000 kHz, using 1800 kHz
[stm32f7x.cpu] halted due to debug-request, current mode: Thread 
xPSR: 0x01000000 pc: 0x08001194 msp: 0x20000200
Info : device id = 0x10016451
Info : flash size = 2048 KiB
Info : Single Bank 2048 kiB STM32F76x/77x found
auto erase enabled
wrote 65536 bytes from file /home/maribu/Repos/software/RIOT/master/tests/net/sock_udp_aux/bin/nucleo-f767zi/tests_sock_udp_aux.elf in 1.514101s (42.269 KiB/s)
verified 61200 bytes in 0.330502s (180.833 KiB/s)
Info : Unable to match requested speed 2000 kHz, using 1800 kHz
Info : Unable to match requested speed 2000 kHz, using 1800 kHz
shutdown command invoked
Done flashing
/home/maribu/Repos/software/RIOT/master/dist/tools/pyterm/pyterm -p "/dev/ttyACM0" -b "115200"  
Twisted not available, please install it if you want to use pyterm's JSON capabilities
2024-05-13 19:17:43,758 # Connect to serial port /dev/ttyACM0
Welcome to pyterm!
Type '/exit' to exit.
2024-05-13 19:17:46,516 # Received a message via: [fe80::6824:8dff:fe9e:4d53]:12345
2024-05-13 19:17:46,519 # Received a message at: 2911628590 ns
2024-05-13 19:17:46,522 # Received a message with: No RSSI value
2024-05-13 19:17:46,525 # Sent echo at: 2923611310 ns
2024-05-13 19:17:46,530 # Received a message via: [fe80::6824:8dff:fe9e:4d53]:12345
2024-05-13 19:17:46,533 # Received a message at: 2923903340 ns
2024-05-13 19:17:46,537 # Received a message with: No RSSI value
2024-05-13 19:17:46,539 # Sent echo at: 2937983980 ns
2024-05-13 19:17:51,807 # Received a message via: [fe80::6824:8dff:fe9e:4d53]:12345
2024-05-13 19:17:51,811 # Received a message at: 8203303810 ns
2024-05-13 19:17:51,814 # Received a message with: No RSSI value
2024-05-13 19:17:51,817 # Sent echo at: 8215286610 ns
2024-05-13 19:17:51,822 # Received a message via: [fe80::6824:8dff:fe9e:4d53]:12345
2024-05-13 19:17:51,825 # Received a message at: 8215667610 ns
2024-05-13 19:17:51,828 # Received a message with: No RSSI value
2024-05-13 19:17:51,831 # Sent echo at: 8229661680 ns
2024-05-13 19:17:54,006 # Received a message via: [fe80::6824:8dff:fe9e:4d53]:12345
2024-05-13 19:17:54,009 # Received a message at: 10401876680 ns
2024-05-13 19:17:54,013 # Received a message with: No RSSI value
2024-05-13 19:17:54,015 # Sent echo at: 10413945410 ns
2024-05-13 19:17:54,020 # Received a message via: [fe80::6824:8dff:fe9e:4d53]:12345
2024-05-13 19:17:54,024 # Received a message at: 10414264840 ns
2024-05-13 19:17:54,027 # Received a message with: No RSSI value
2024-05-13 19:17:54,030 # Sent echo at: 10428463150 ns
2024-05-13 19:18:00,095 # Received a message via: [fe80::6824:8dff:fe9e:4d53]:12345
2024-05-13 19:18:00,099 # Received a message at: 16491132940 ns
2024-05-13 19:18:00,102 # Received a message with: No RSSI value
2024-05-13 19:18:00,105 # Sent echo at: 16503204020 ns
2024-05-13 19:18:00,110 # Received a message via: [fe80::6824:8dff:fe9e:4d53]:12345
2024-05-13 19:18:00,113 # Received a message at: 16503560650 ns
2024-05-13 19:18:00,116 # Received a message with: No RSSI value
2024-05-13 19:18:00,119 # Sent echo at: 16517726680 ns
2024-05-13 19:18:00,684 # Received a message via: [fe80::6824:8dff:fe9e:4d53]:12345
2024-05-13 19:18:00,687 # Received a message at: 17079406300 ns
2024-05-13 19:18:00,690 # Received a message with: No RSSI value
2024-05-13 19:18:00,693 # Sent echo at: 17091477780 ns
2024-05-13 19:18:00,698 # Received a message via: [fe80::6824:8dff:fe9e:4d53]:12345
2024-05-13 19:18:00,701 # Received a message at: 17091796330 ns
2024-05-13 19:18:00,705 # Received a message with: No RSSI value
2024-05-13 19:18:00,707 # Sent echo at: 17105995770 ns
2024-05-13 19:18:01,160 # Received a message via: [fe80::6824:8dff:fe9e:4d53]:12345
2024-05-13 19:18:01,163 # Received a message at: 17555448650 ns
2024-05-13 19:18:01,166 # Received a message with: No RSSI value
2024-05-13 19:18:01,169 # Sent echo at: 17567519570 ns
2024-05-13 19:18:01,174 # Received a message via: [fe80::6824:8dff:fe9e:4d53]:12345
2024-05-13 19:18:01,177 # Received a message at: 17567850400 ns
2024-05-13 19:18:01,181 # Received a message with: No RSSI value
2024-05-13 19:18:01,184 # Sent echo at: 17582037080 ns
2024-05-13 19:18:01,636 # Received a message via: [fe80::6824:8dff:fe9e:4d53]:12345
2024-05-13 19:18:01,640 # Received a message at: 18031926790 ns
2024-05-13 19:18:01,643 # Received a message with: No RSSI value
2024-05-13 19:18:01,645 # Sent echo at: 18043997910 ns
2024-05-13 19:18:01,651 # Received a message via: [fe80::6824:8dff:fe9e:4d53]:12345
2024-05-13 19:18:01,654 # Received a message at: 18044345220 ns
2024-05-13 19:18:01,657 # Received a message with: No RSSI value
2024-05-13 19:18:01,660 # Sent echo at: 18058515780 ns
2024-05-13 19:18:02,095 # Received a message via: [fe80::6824:8dff:fe9e:4d53]:12345
2024-05-13 19:18:02,099 # Received a message at: 18491363440 ns
2024-05-13 19:18:02,102 # Received a message with: No RSSI value
2024-05-13 19:18:02,105 # Sent echo at: 18503434600 ns
2024-05-13 19:18:02,110 # Received a message via: [fe80::6824:8dff:fe9e:4d53]:12345
2024-05-13 19:18:02,113 # Received a message at: 18503774760 ns
2024-05-13 19:18:02,117 # Received a message with: No RSSI value
2024-05-13 19:18:02,119 # Sent echo at: 18517951750 ns
2024-05-13 19:18:02,587 # Received a message via: [fe80::6824:8dff:fe9e:4d53]:12345
2024-05-13 19:18:02,591 # Received a message at: 18983181510 ns
2024-05-13 19:18:02,594 # Received a message with: No RSSI value
2024-05-13 19:18:02,597 # Sent echo at: 18995253030 ns
2024-05-13 19:18:02,602 # Received a message via: [fe80::6824:8dff:fe9e:4d53]:12345
2024-05-13 19:18:02,605 # Received a message at: 18995580270 ns
2024-05-13 19:18:02,609 # Received a message with: No RSSI value
2024-05-13 19:18:02,611 # Sent echo at: 19009770660 ns
2024-05-13 19:18:02,996 # Received a message via: [fe80::6824:8dff:fe9e:4d53]:12345
2024-05-13 19:18:03,000 # Received a message at: 19392172690 ns
2024-05-13 19:18:03,003 # Received a message with: No RSSI value
2024-05-13 19:18:03,006 # Sent echo at: 19404243730 ns
2024-05-13 19:18:03,011 # Received a message via: [fe80::6824:8dff:fe9e:4d53]:12345
2024-05-13 19:18:03,014 # Received a message at: 19404538240 ns
2024-05-13 19:18:03,018 # Received a message with: No RSSI value
2024-05-13 19:18:03,020 # Sent echo at: 19418791230 ns
2024-05-13 19:18:03,355 # Received a message via: [fe80::6824:8dff:fe9e:4d53]:12345
2024-05-13 19:18:03,359 # Received a message at: 19751116490 ns
2024-05-13 19:18:03,362 # Received a message with: No RSSI value
2024-05-13 19:18:03,365 # Sent echo at: 19763187890 ns
2024-05-13 19:18:03,370 # Received a message via: [fe80::6824:8dff:fe9e:4d53]:12345
2024-05-13 19:18:03,373 # Received a message at: 19763504440 ns
2024-05-13 19:18:03,376 # Received a message with: No RSSI value
2024-05-13 19:18:03,379 # Sent echo at: 19777706000 ns
2024-05-13 19:18:04,414 # Received a message via: [fe80::6824:8dff:fe9e:4d53]:12345
2024-05-13 19:18:04,417 # Received a message at: 20809582200 ns
2024-05-13 19:18:04,420 # Received a message with: No RSSI value
2024-05-13 19:18:04,423 # Sent echo at: 20821652640 ns
2024-05-13 19:18:04,428 # Received a message via: [fe80::6824:8dff:fe9e:4d53]:12345
2024-05-13 19:18:04,432 # Received a message at: 20821967680 ns
2024-05-13 19:18:04,435 # Received a message with: No RSSI value
2024-05-13 19:18:04,438 # Sent echo at: 20836170270 ns

@maribu maribu removed State: waiting for other PR State: The PR requires another PR to be merged first Platform: ARM Platform: This PR/issue effects ARM-based platforms labels May 13, 2024
@benpicco benpicco added the CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR label May 13, 2024
@github-actions github-actions bot added the Platform: ARM Platform: This PR/issue effects ARM-based platforms label May 13, 2024
@riot-ci
Copy link

riot-ci commented May 13, 2024

Murdock results

FAILED

5129a8d sys/net/gnrc: add dependencies for sock_aux_timestamp

Success Failures Total Runtime
1319 0 9265 02m:35s

Artifacts

maribu and others added 7 commits June 6, 2024 17:07
Provide a type for use in netdev_driver_t::confirm_send() to fetch TX info.
Add member `netdev_tx_info_t tx_info` to `gnrc_tx_sync_t` to allow fetching
TX info. This is a natural fit, as for fetching TX info, one has to wait for
the transmission to conclude.
Make use of gnrc_tx_sync to retrieve the TX timestamp, if provided by
lower layers and module sock_aux_timestamp is used.
Added `gnrc_tx_sync_t *gnrc_pktsnip_search_type(gnrc_pktsnip_t *pkt)` to more
conveniently access the TX sync data of a packet.
We need `gnrc_tx_sync` to wait for the transmission to complete to
fetch auxiliary data from sending in the upper layers, as otherwise
we have no clue when the data is actually valid.

In addition, we need `netdev_tx_info_timestamp` to tell the netdevs
to provide said timestamp.
@@ -281,6 +281,32 @@ struct netdev_radio_rx_info {
uint8_t lqi; /**< LQI of a received frame */
};

/**
* @name Flags indicating which fields in @ref netdev_tx_info_t
Copy link
Contributor

@benpicco benpicco Jun 6, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* @name Flags indicating which fields in @ref netdev_tx_info_t
* @brief Flags indicating which fields in @ref netdev_tx_info_t

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For groups @name is correct. That group only has a single member as of now, but that may change in the future

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doxygen does not like it though - or you need additional doc for that member

@benpicco
Copy link
Contributor

benpicco commented Jun 6, 2024

tests/net/gnrc_sock_{ip, udp} are still failing

@maribu
Copy link
Member Author

maribu commented Jun 6, 2024

tests/net/gnrc_sock_{ip, udp} are still failing

Indeed 😦. It also fails for me in master when I use

$ USEMODULE=gnrc_tx_sync make -C tests/net/gnrc_sock_ip

gnrc_tx_sync hooks into the reference counting of outgoing packets. If the outgoing packet is never freed again, it will deadlock. So either there is a memory leak (that now is turned into a deadlock with gnrc_tx_sync), or gnrc_tx_sync contains a bug. I'll take a look tomorrow.

@benpicco benpicco requested a review from bergzand September 6, 2024 12:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: build system Area: Build system Area: cpu Area: CPU/MCU ports Area: drivers Area: Device drivers Area: network Area: Networking Area: sys Area: System CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Platform: ARM Platform: This PR/issue effects ARM-based platforms Type: new feature The issue requests / The PR implemements a new feature for RIOT
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants