86e25f40 | 11-Oct-2024 |
Joe Damato <jdamato@fastly.com> |
net: napi: Add napi_config
Add a persistent NAPI config area for NAPI configuration to the core. Drivers opt-in to setting the persistent config for a NAPI by passing an index when calling netif_nap
net: napi: Add napi_config
Add a persistent NAPI config area for NAPI configuration to the core. Drivers opt-in to setting the persistent config for a NAPI by passing an index when calling netif_napi_add_config.
napi_config is allocated in alloc_netdev_mqs, freed in free_netdev (after the NAPIs are deleted).
Drivers which call netif_napi_add_config will have persistent per-NAPI settings: NAPI IDs, gro_flush_timeout, and defer_hard_irq settings.
Per-NAPI settings are saved in napi_disable and restored in napi_enable.
Co-developed-by: Martin Karsten <mkarsten@uwaterloo.ca> Signed-off-by: Martin Karsten <mkarsten@uwaterloo.ca> Signed-off-by: Joe Damato <jdamato@fastly.com> Reviewed-by: Jakub Kicinski <kuba@kernel.org> Reviewed-by: Eric Dumazet <edumazet@google.com> Link: https://patch.msgid.link/20241011184527.16393-6-jdamato@fastly.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
acb8d4ed | 11-Oct-2024 |
Joe Damato <jdamato@fastly.com> |
net: napi: Make gro_flush_timeout per-NAPI
Allow per-NAPI gro_flush_timeout setting.
The existing sysfs parameter is respected; writes to sysfs will write to all NAPI structs for the device and the
net: napi: Make gro_flush_timeout per-NAPI
Allow per-NAPI gro_flush_timeout setting.
The existing sysfs parameter is respected; writes to sysfs will write to all NAPI structs for the device and the net_device gro_flush_timeout field. Reads from sysfs will read from the net_device field.
The ability to set gro_flush_timeout on specific NAPI instances will be added in a later commit, via netdev-genl.
Signed-off-by: Joe Damato <jdamato@fastly.com> Reviewed-by: Eric Dumazet <edumazet@google.com> Reviewed-by: Jakub Kicinski <kuba@kernel.org> Link: https://patch.msgid.link/20241011184527.16393-4-jdamato@fastly.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
c353c7b7 | 08-Feb-2024 |
Eric Dumazet <edumazet@google.com> |
net-device: move lstats in net_device_read_txrx
dev->lstats is notably used from loopback ndo_start_xmit() and other virtual drivers.
Per cpu stats updates are dirtying per-cpu data, but the pointe
net-device: move lstats in net_device_read_txrx
dev->lstats is notably used from loopback ndo_start_xmit() and other virtual drivers.
Per cpu stats updates are dirtying per-cpu data, but the pointer itself is read-only.
Fixes: 43a71cd66b9c ("net-device: reorganize net_device fast path variables") Signed-off-by: Eric Dumazet <edumazet@google.com> Cc: Coco Li <lixiaoyan@google.com> Cc: Simon Horman <horms@kernel.org> Reviewed-by: Simon Horman <horms@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
666a877d | 08-Feb-2024 |
Eric Dumazet <edumazet@google.com> |
tcp: move tp->tcp_usec_ts to tcp_sock_read_txrx group
tp->tcp_usec_ts is a read mostly field, used in rx and tx fast paths.
Fixes: d5fed5addb2b ("tcp: reorganize tcp_sock fast path variables") Sign
tcp: move tp->tcp_usec_ts to tcp_sock_read_txrx group
tp->tcp_usec_ts is a read mostly field, used in rx and tx fast paths.
Fixes: d5fed5addb2b ("tcp: reorganize tcp_sock fast path variables") Signed-off-by: Eric Dumazet <edumazet@google.com> Cc: Coco Li <lixiaoyan@google.com> Cc: Wei Wang <weiwan@google.com> Reviewed-by: Simon Horman <horms@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|