lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <0aa1b4a2-47b2-40a4-ae14-ce2dd457a1f7@lunn.ch>
Date: Fri, 2 May 2025 15:09:00 +0200
From: Andrew Lunn <andrew@...n.ch>
To: David Howells <dhowells@...hat.com>
Cc: "David S. Miller" <davem@...emloft.net>,
	Jakub Kicinski <kuba@...nel.org>, willy@...radead.org,
	netdev@...r.kernel.org
Subject: Re: How much is checksumming done in the kernel vs on the NIC?

On Fri, May 02, 2025 at 01:07:01PM +0100, David Howells wrote:
> Hi Dave, Jakub,
> 
> I'm looking into making the sendmsg() code properly handle the 'DIO vs fork'
> issue (where pages need pinning rather than refs taken) and also getting rid
> of the taking of refs entirely as the page refcount is going to go away in the
> relatively near future.

Sorry, new to this conversation, and i don't know what you mean by DIO
vs fork. Could you point me at a discussion.

> I'm wondering quite how to do the approach, and I was wondering if you have
> any idea about the following:
> 
>  (1) How much do we need to do packet checksumming in the kernel these days
>      rather than offloading it to the NIC?
> 
>  (2) How often do modern kernels encounter NICs that can only take a single
>      {pointer,len} extent for any particular packet rather than a list of
>      such?

You might need to narrow this down to classes for NICs.

Some 'NICs' embedded in SOCs don't have scatter gather. Some
automotive NICs transfer data via SPI, which in theory could make a
linked list of SPI transfer requests per {pointer,len}, and hand it
over to the SPI core as a single operation, but in practice the MAC
driver tends to do this scatter/gather by hand.

There are some NICs which get confused when you add extra headers near
the beginning of the packet, so cannot perform checksumming deeper
than the FCS. IP, UDP checksum has to be done in software, etc.

Modern kernels still support NICs from the 90s, original Donald Becker
drivers, so you cannot assume too much from the hardware.

	Andrew


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ