lwIP - A Lightweight TCP/IP stack - Patches: patch #10111, [RFC] Hardware checksum offloading
You are not allowed to post comments on this tracker with your current authentication level.
patch #10111: [RFC] Hardware checksum offloading
Submitter: | Simon Kuenzer <skuenzer> | ||
Submitted: | Sat 25 Sep 2021 10:42:04 PM UTC | ||
Category: | TCP | Priority: | 5 - Normal |
Status: | None | Privacy: | Public |
Assigned to: | None | Open/Closed: | Open |
Planned Release: | None |
Fri 12 Nov 2021 12:07:19 AM UTC, comment #5: |
Simon Kuenzer <skuenzer> |
Mon 27 Sep 2021 10:32:13 AM UTC, comment #4:
|
Simon Kuenzer <skuenzer> |
Mon 27 Sep 2021 09:42:45 AM UTC, comment #3: OK, thanks for clarifiying. Reading the code, I'd rather have this somehow in line with the 'IF__NETIF_CHECKSUM_ENABLED' macro: in other words, when changing code here, it would be best if there was the option to make this netif specific. Because if it's not netif specific, you'll have to disable it when mixing interfaces. |
Simon Goldschmidt <goldsimon> |
Mon 27 Sep 2021 09:32:10 AM UTC, comment #2:
|
Simon Kuenzer <skuenzer> |
Mon 27 Sep 2021 06:06:27 AM UTC, comment #1:
|
Simon Goldschmidt <goldsimon> |
Sat 25 Sep 2021 10:42:04 PM UTC, original submission:
These patches implement the capability to offload checksum computation to modern network cards. For each pbuf the stack can point to a checksum field that should be computed and filled by the device. Expensive checksumming of payload bytes can be offloaded which means that this feature is intended for checksums of transport protocols only (like TCP, UDP). This is inline with todays standards, like you find with virtio-net.
|
Simon Kuenzer <skuenzer> |
Depends on the following items: None found
Items that depend on this one: None found
There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.
Follow 18 latest changes.
Date | Changed by | Updated Field | Previous Value | => | Replaced by |
---|---|---|---|---|---|
2021-11-12 | skuenzer | Attached File | - | Added master-v2-0009-tcp_in-Skip-checksum-validation-when-PBUF_FLAG_DA.patch, #52252 | |
Attached File | - | Added master-v2-0010-udp-Skip-checksum-validation-when-PBUF_FLAG_DATA_.patch, #52253 | |||
2021-11-12 | skuenzer | Attached File | - | Added master-v2-0005-tcp_in-Check-partial-checksummed-packets-pseudo-h.patch, #52248 | |
Attached File | - | Added master-v2-0006-udp-Compute-partial-checksum-pseudo-header.patch, #52249 | |||
Attached File | - | Added master-v2-0007-udp-Check-partial-checksummed-packets-pseudo-head.patch, #52250 | |||
Attached File | - | Added master-v2-0008-pbuf-Introduce-PBUF_FLAG_DATA_VALID.patch, #52251 | |||
2021-11-12 | skuenzer | Attached File | - | Added master-v2-0001-netif-Avoid-compiling-mistakes-IF__NETIF_CHECKSUM.patch, #52244 | |
Attached File | - | Added master-v2-0002-inet_chksum-TCP-UDP-pseudo-header-only-checksums.patch, #52245 | |||
Attached File | - | Added master-v2-0003-pbuf-Introduce-PBUF_FLAG_CSUM_PARTIAL.patch, #52246 | |||
Attached File | - | Added master-v2-0004-tcp_out-Compute-partial-checksum-pseudo-header.patch, #52247 | |||
2021-09-27 | skuenzer | Attached File | - | Added master-0001-pbuf-Introduce-PBUF_FLAG_CSUM_PARTIAL.patch, #51977 | |
Attached File | - | Added master-0002-inet_chksum-Partial-checksums.patch, #51978 | |||
Attached File | - | Added master-0003-tcp_out-Partial-checksumming.patch, #51979 | |||
2021-09-25 | skuenzer | Attached File | - | Added 0001-pbuf-Introduce-PBUF_FLAG_CSUM_PARTIAL.patch, #51964 | |
Attached File | - | Added 0002-inet_chksum-Partial-checksums.patch, #51965 | |||
Attached File | - | Added 0003-tcp_out-Partial-checksumming.patch, #51966 | |||
Carbon-Copy | - | Added -email is unavailable- | |||
Carbon-Copy | - | Added -email is unavailable- |
Powered by Savane 3.13-d3ae.
Corresponding source code
comment #4:
I attached a completed version (see v2 patches, previous patches can be now ignored). The patches implement the partial checksum offloading capabilities for TCP and UDP for transmission and reception.
For this purpose, we introduce two pbuf flags in order to be able to handle mixed traffic:
Through lwipopts.h, the new features can be compiled-in or even compiled-out. For each network device, the handling of partially checksummed traffic can be set through netif checksum control flags.
A current limitation of this version of implementation is the lack of support for forwarding and L2-bridging. Basically, the missing piece of the puzzle is a function that can complete the checksum computation in the software for partially checksummed packets that are forwarded to devices that do not support partially checksummed packets.