[PATCH v1 3/3] net/af_packet: software checksum and tx poll control

Stephen Hemminger stephen at networkplumber.org
Tue Jan 27 19:57:49 CET 2026


On Tue, 27 Jan 2026 10:13:55 -0800
scott.k.mitch1 at gmail.com wrote:

> From: Scott Mitchell <scott.k.mitch1 at gmail.com>
> 
> Add software checksum offload support and configurable TX poll
> behavior to improve flexibility and performance.
> 
> Implement af_packet_sw_cksum() helper to compute IPv4/UDP/TCP
> checksums in software when hardware offload is not available.
> This enables checksum offload on interfaces without HW support.

I don't think each driver should be doing its own checksum helper.
It should be done at application or through libraries.
All modern hardware does checksum offload, so if it doesn't probably
a driver bug.

> 
> Add txpollnotrdy devarg (default=true) to control whether poll()
> is called when the TX ring is not ready. This allows users to
> avoid blocking behavior if application threads are in asynchronous
> poll mode where blocking the thread has negative side effects and
> backpressure is applied via different means.
>

Needs to be a separate patch. Don't do two things in one patch.
Not sure if some variant of the existing configure thresholds
could be used for this.


> Signed-off-by: Scott Mitchell <scott.k.mitch1 at gmail.com>


More information about the dev mailing list