13627105546 opened a new pull request, #16940:
URL: https://github.com/apache/nuttx/pull/16940

   *Note: Please adhere to [Contributing 
Guidelines](https://github.com/apache/nuttx/blob/master/CONTRIBUTING.md).*
   
   ## Summary
   
   This PR introduces hardware checksum offload support to the NuttX network 
protocol stack, enabling network devices to perform checksum calculations in 
hardware rather than software. 
   Key Changes:
   - Added NETDEV_TX_CSUM and NETDEV_RX_CSUM feature flags in netdev.h to 
indicate hardware checksum capabilities
   - Implemented new checksum calculation functions 
ipv4_upperlayer_header_chksum() and ipv6_upperlayer_header_chksum()
   - Modified TCP/UDP send and receive paths to conditionally use hardware or 
software checksum based on device capabilities
   - Added netdev_checksum.c containing core checksum handling logic
   - Fixed compilation errors and updated build system configuration 
(CMake/Makefile)
   
   ## Impact
   
   Build Impact:
   - Adds new source file net/netdev/netdev_checksum.c
   - Updates CMake and Makefile build configurations
   - No impact on existing build processes for current configurations
   API Impact:
   - Extends usage of d_features field in struct net_driver_s
   - Introduces new checksum-related helper functions
   - Maintains full compatibility with existing network APIs
   Runtime Impact:
   - Network device drivers need to appropriately set NETDEV_TX_CSUM / 
NETDEV_RX_CSUM flags to enable hardware checksum
   - For devices not setting these flags, behavior remains identical to 
previous implementation
   - No breaking changes to existing network functionality
   
   ## Testing
   
   All existing network applications function correctly
   


-- 
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]

Reply via email to