Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

net: dpaa: reduce number of synchronize_net() calls

In the function dpaa_napi_del(), we execute the netif_napi_del()
for each cpu, which is actually a high overhead operation
because each call to netif_napi_del() contains a synchronize_net(),
i.e. an RCU operation. In fact, it is only necessary to call
__netif_napi_del and use synchronize_net() once outside of the loop.
This change is similar to commit 2543a6000e593a ("gro_cells: reduce
number of synchronize_net() calls") and commit 5198d545dba8ad (" net:
remove napi_hash_del() from driver-facing API") 5198d545db.

Signed-off-by: Xi Huang <xuiagnh@gmail.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Link: https://patch.msgid.link/20240822072042.42750-1-xuiagnh@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Xi Huang and committed by
Jakub Kicinski
2c163922 89683b45

+2 -1
+2 -1
drivers/net/ethernet/freescale/dpaa/dpaa_eth.c
··· 3156 3156 for_each_possible_cpu(cpu) { 3157 3157 percpu_priv = per_cpu_ptr(priv->percpu_priv, cpu); 3158 3158 3159 - netif_napi_del(&percpu_priv->np.napi); 3159 + __netif_napi_del(&percpu_priv->np.napi); 3160 3160 } 3161 + synchronize_net(); 3161 3162 } 3162 3163 3163 3164 static inline void dpaa_bp_free_pf(const struct dpaa_bp *bp,