[riot-notifications] [RIOT-OS/RIOT] drivers/stm32_eth: add RX timestamps (#15610)

benpicco notifications at github.com
Tue Jan 12 19:17:10 CET 2021


@benpicco commented on this pull request.



> +        if (rx_curr->status & RX_DESC_STAT_LS) {
+            if (IS_USED(MODULE_PERIPH_PTP)) {
+                info->timestamp = rx_curr->ts_low;
+                info->timestamp += (uint64_t)rx_curr->ts_high * NS_PER_SEC;
+                info->flags |= NETDEV_ETH_RX_INFO_FLAG_TIMESTAMP;
+            }
+            rx_curr->status = RX_DESC_STAT_OWN;
+            rx_curr = rx_curr->desc_next;
+            break;
+        }
         rx_curr->status = RX_DESC_STAT_OWN;
         rx_curr = rx_curr->desc_next;

Couldn't this also be done in `copy_from_dma_desc()` so we don't have to iterate the list a second time? 

-- 
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/15610#pullrequestreview-566545122
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20210112/5dfc0c5a/attachment.htm>


More information about the notifications mailing list