You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by je...@apache.org on 2026/02/26 14:54:10 UTC

(mynewt-core) 04/05: lwip/stm32_eth: configure hardware checksum

This is an automated email from the ASF dual-hosted git repository.

jerzy pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git

commit 21f9b2a6838c6916a3cbf31b3deac0117915d400
Author: Jerzy Kasenberg <je...@codecoup.pl>
AuthorDate: Mon Feb 23 15:39:22 2026 +0100

    lwip/stm32_eth: configure hardware checksum
    
    STM32 hal for ETH enables checksum offloading,
    this means that LWPI must not generate checksums.
    
    Verification of checksum is done by hardware
    and LWIP does not need to check them in software.
    
    This adds flags that will turn off checksum
    related code in LWIP
    
    Signed-off-by: Jerzy Kasenberg <je...@codecoup.pl>
---
 hw/drivers/lwip/stm32_eth/pkg.yml | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/hw/drivers/lwip/stm32_eth/pkg.yml b/hw/drivers/lwip/stm32_eth/pkg.yml
index b5d92e65b..c28fe565a 100644
--- a/hw/drivers/lwip/stm32_eth/pkg.yml
+++ b/hw/drivers/lwip/stm32_eth/pkg.yml
@@ -35,6 +35,18 @@ pkg.deps.MCU_STM32F4:
 pkg.deps.MCU_STM32F7:
     - "@apache-mynewt-core/hw/mcu/stm/stm32f7xx"
 
+app.cflags:
+    - -DCHECKSUM_GEN_IP=0
+    - -DCHECKSUM_GEN_UDP=0
+    - -DCHECKSUM_GEN_TCP=0
+    - -DCHECKSUM_GEN_ICMP=0
+    - -DCHECKSUM_GEN_ICMP6=0
+    - -DCHECKSUM_CHECK_IP=0
+    - -DCHECKSUM_CHECK_UDP=0
+    - -DCHECKSUM_CHECK_TCP=0
+    - -DCHECKSUM_CHECK_ICMP=0
+    - -DCHECKSUM_CHECK_ICMP6=0
+
 pkg.req_apis:
 
 pkg.init: