lwip-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-devel] [patch #10111] [RFC] Hardware checksum offloading


From: Simon Kuenzer
Subject: [lwip-devel] [patch #10111] [RFC] Hardware checksum offloading
Date: Mon, 27 Sep 2021 06:32:14 -0400 (EDT)
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:92.0) Gecko/20100101 Firefox/92.0

Follow-up Comment #4, patch #10111 (project lwip):


[comment #3 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.

Right, this is a good point and I totally agree. In fact, I have considered
and implemented this (patch 0003): Overall, I tried to introduce my changes so
that you can still build a minimal lwIP configuration without extra pbuf
fields. So the feature is added with two configurations: lwipopts.h and the
netif feature flags. In lwipopt.h you need to enable:

- Enable checksum generation for TCP
- Additionally enable partial checksums for TCP

This enables all the required functions, extra pbuf fields and the pbuf flag.

The computation depends on netif feature flags:
- Without netif feature flags activated, lwip should always compute only a
partial checksum.
- In case, netif feature flags are enabled, a partial checksum is only
computed if the netif interface indicates this with a similar flag: Both,
NETIF_CHECKSUM_GEN_TCP and NETIF_CHECKSUM_PARTIAL_TCP, need to be set. If only
GEN_TCP is set, lwip computes the whole checksum in software. If none is set,
the checksum field is kept zero.

    _______________________________________________________

Reply to this item at:

  <https://savannah.nongnu.org/patch/?10111>

_______________________________________________
  Message sent via Savannah
  https://savannah.nongnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]