idpf: Don't hard code napi_struct size
authorJoe Damato <jdamato@fastly.com>
Fri, 4 Oct 2024 10:54:07 +0000 (10:54 +0000)
committerJakub Kicinski <kuba@kernel.org>
Tue, 8 Oct 2024 15:14:50 +0000 (08:14 -0700)
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@intel.com>
Signed-off-by: Joe Damato <jdamato@fastly.com>
Acked-by: Alexander Lobakin <aleksander.lobakin@intel.com>
Link: https://patch.msgid.link/20241004105407.73585-1-jdamato@fastly.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/intel/idpf/idpf_txrx.h

index f0537826f8403f501887c3db8c07c28079f7bf32..9c1fe84108ed2e33870245a8888a2e9b26b06f4b 100644 (file)
@@ -438,7 +438,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 {