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

Marian Buschsieweke notifications at github.com
Thu Jan 7 22:12:16 CET 2021


@maribu commented on this pull request.



> @@ -623,6 +624,11 @@ static int stm32_eth_recv(netdev_t *netdev, void *buf, size_t max_len,
         memcpy(data, rx_curr->buffer_addr, chunk);
         data += chunk;
         remain -= chunk;
+        if (IS_USED(MODULE_PERIPH_PTP) && !remain) {

`rx_curr` is after the loop pointing to one item after the DMA descriptor containing. Also, at the end of the loop body the DMA descriptor is handed over to the DMA - at which point we can no longer reliably read its contents.

But its good that you put the finger down to this code. I again forgot to handle the case when one more RX descriptor is there due to the FCS - in which case the timestamp will be placed there.

-- 
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#discussion_r553589691
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20210107/1db54611/attachment.htm>


More information about the notifications mailing list