xiaoxiang781216 commented on code in PR #18922:
URL: https://github.com/apache/nuttx/pull/18922#discussion_r3278280630
##########
arch/arm/src/stm32h5/stm32_ethernet.c:
##########
@@ -1718,9 +1723,29 @@ static int stm32_recvframe(struct stm32_ethmac_s *priv)
ninfo("rxhead: %p rxcurr: %p segments: %d\n",
priv->rxhead, priv->rxcurr, priv->segments);
- /* Check if any errors are reported in the frame */
+ /* Check if any errors are reported in the frame.
+ * If hardware checksum is enabled, check if:
+ * - RDES1 is valid
+ * - IP checksum was not bypassed
+ * - IP hdr checksum error or IP payload checksum error is set
+ */
+
+ bool err = ((rxdesc->des3 & ETH_RDES3_WB_ES) != 0);
Review Comment:
move the declaration before line 1710
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]