[SRU][O:gcp][PATCH 4/6] idpf: Don't hard code napi_struct size
Ian Whitfield
ian.whitfield at canonical.com
Sun Jan 12 04:18:33 UTC 2025
From: Joe Damato <jdamato at fastly.com>
BugLink: https://bugs.launchpad.net/bugs/2093622
The sizeof(struct napi_struct) can change. Don't hardcode the size to
400 bytes and instead use "sizeof(struct napi_struct)".
Suggested-by: Alexander Lobakin <aleksander.lobakin at intel.com>
Signed-off-by: Joe Damato <jdamato at fastly.com>
Acked-by: Alexander Lobakin <aleksander.lobakin at intel.com>
Link: https://patch.msgid.link/20241004105407.73585-1-jdamato@fastly.com
Signed-off-by: Jakub Kicinski <kuba at kernel.org>
(cherry picked from commit 49717ef01ce1b6dbe4cd12bee0fc25e086c555df)
Signed-off-by: Ian Whitfield <ian.whitfield at canonical.com>
---
drivers/net/ethernet/intel/idpf/idpf_txrx.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/intel/idpf/idpf_txrx.h b/drivers/net/ethernet/intel/idpf/idpf_txrx.h
index 62a9656e96e8..8a433b0f7f4e 100644
--- a/drivers/net/ethernet/intel/idpf/idpf_txrx.h
+++ b/drivers/net/ethernet/intel/idpf/idpf_txrx.h
@@ -479,7 +479,8 @@ struct idpf_q_vector {
__cacheline_group_end_aligned(cold);
};
libeth_cacheline_set_assert(struct idpf_q_vector, 112,
- 424 + 2 * sizeof(struct dim),
+ 24 + sizeof(struct napi_struct) +
+ 2 * sizeof(struct dim),
8 + sizeof(cpumask_var_t));
struct idpf_rx_queue_stats {
--
2.43.0
More information about the kernel-team
mailing list