mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2025-08-03 21:14:40 +08:00

lwIP aims to support zero-copy TX, and thus, must internally handle all cases that pbufs are referenced rather than copied upon low-level output. However, in the current situation, the arp/ndp packet queuing routines conservatively copy entire packets, even when unnecessary in cases where lwIP is used in a zero-copy compliant manner. This patch moves the decision whether to copy into a centralized macro, allowing zero-copy compliant applications to override the macro to avoid the unnecessary copies. The macro defaults to the safe behavior, though.