-
Notifications
You must be signed in to change notification settings - Fork 2k
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
base: master
Are you sure you want to change the base?
Conversation
d447d03
to
192b89b
Compare
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. |
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. |
IIRC we have some form of confirm send now? |
Yes, this should indeed work, provided that a driver would actually use |
This needs a rebase. |
This was a hell of a rebase, but it seems to work:
|
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* @name Flags indicating which fields in @ref netdev_tx_info_t | |
* @brief Flags indicating which fields in @ref netdev_tx_info_t |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
|
Indeed 😦. It also fails for me in
|
Contribution description
netdev_tx_info_t
, which contains a timestamp if (pseudo-)modulenetdev_tx_info_timestamp
is usedgnrc_tx_sync_t
to contain a membernetdev_tx_info_t tx_info
, which can be used to transfer TX info up the stackgnrc_netif
to pass the newtx_info
member ofgnrc_tx_sync_t
tonetdev_driver_t::confirm_send()
when modulegnrc_tx_sync
is usedgnrc_sock
to pass timestamp ingnrc_tx_sync_t::tx_info
up tosock_udp_send_aux()
/sock_ip_send_aux()
, which in turn are extended to pass this on to the userstm32_eth
Testing procedure
make BOARD=nucleo-f767zi -C tests/sock_udp_aux flash term
ifconfig
12345
of the NucleoThe output should look like this
Issues/PRs references
Depends on and includes: