diff options
author | 2023-09-12 10:49:36 +0900 | |
---|---|---|
committer | 2023-09-14 10:26:41 +0200 | |
commit | c4f922e86c8e0f7c5fe94e0547e9835fc9711f08 (patch) | |
tree | 3ca8ecc2d5958742f08623dec337a479a4019e2f /drivers/net/ethernet/renesas/rswitch.h | |
parent | net: renesas: rswitch: Fix unmasking irq condition (diff) | |
download | wireguard-linux-c4f922e86c8e0f7c5fe94e0547e9835fc9711f08.tar.xz wireguard-linux-c4f922e86c8e0f7c5fe94e0547e9835fc9711f08.zip |
net: renesas: rswitch: Add spin lock protection for irq {un}mask
Add spin lock protection for irq {un}mask registers' control.
After napi_complete_done() and this protection were applied,
a lot of redundant interrupts no longer occur.
For example: when "iperf3 -c <ipaddr> -R" on R-Car S4-8 Spider
Before the patches are applied: about 800,000 times happened
After the patches were applied: about 100,000 times happened
Fixes: 3590918b5d07 ("net: ethernet: renesas: Add support for "Ethernet Switch"")
Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to '')
-rw-r--r-- | drivers/net/ethernet/renesas/rswitch.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/ethernet/renesas/rswitch.h b/drivers/net/ethernet/renesas/rswitch.h index 54f397effbc6..f0c16a37ea55 100644 --- a/drivers/net/ethernet/renesas/rswitch.h +++ b/drivers/net/ethernet/renesas/rswitch.h @@ -1011,6 +1011,8 @@ struct rswitch_private { struct rswitch_etha etha[RSWITCH_NUM_PORTS]; struct rswitch_mfwd mfwd; + spinlock_t lock; /* lock interrupt registers' control */ + bool etha_no_runtime_change; bool gwca_halt; }; |