2
0
mirror of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git synced 2025-09-04 20:19:47 +08:00
linux/include/net/libeth
Alexander Lobakin 80bae9df21 libeth: xdp, xsk: access adjacent u32s as u64 where applicable
On 64-bit systems, writing/reading one u64 is faster than two u32s even
when they're are adjacent in a struct. The compilers won't guarantee
they will combine those; I observed both successful and unsuccessful
attempts with both GCC and Clang, and it's not easy to say what it
depends on.
There's a few places in libeth_xdp winning up to several percent from
combined access (both performance and object code size, especially
when unrolling). Add __LIBETH_WORD_ACCESS and use it there on LE.
Drivers are free to optimize HW-specific callbacks under the same
definition.

Signed-off-by: Alexander Lobakin <aleksander.lobakin@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
2025-06-16 11:40:15 -07:00
..
cache.h libeth: add cacheline / struct layout assertion helpers 2024-07-10 10:29:53 -07:00
rx.h libeth: support native XDP and register memory model 2025-06-16 11:40:14 -07:00
tx.h libeth: xsk: add XSk xmit functions 2025-06-16 11:40:15 -07:00
types.h libeth: xdp: add XDP prog run and verdict result handling 2025-06-16 11:40:14 -07:00
xdp.h libeth: xdp, xsk: access adjacent u32s as u64 where applicable 2025-06-16 11:40:15 -07:00
xsk.h libeth: xdp, xsk: access adjacent u32s as u64 where applicable 2025-06-16 11:40:15 -07:00