geneve: make geneve_fill_info() RTNL-less
Status from this message: This series was applied to netdev/net-next.git (main)
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest3 patches 1 replyApplied 3/3
- v12 patches 3 repliesSuperseded
Patches in v2 All 3 applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | geneve: pass geneve_config pointer to helper functionsdrivers/ | +76 | 1 reply | Applied |
| 2/3 | geneve: convert config to RCU-protected pointerdrivers/ | +118 | 0 replies | Applied |
| 3/3 | geneve: make geneve_fill_info() RTNL independentdrivers/ | +24 | 0 replies | Applied |
Reviews trailers per patch
1 of 3 patches has a Reviewed-by or Acked-by.
| Patch | Kuniyuki Iwashima |
|---|---|
| 1/3 | |
| 2/3 | |
| 3/3 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v2 net-next 0/3] geneve: make geneve_fill_info() RTNL-less
This series makes geneve_fill_info() independent of the RTNL lock by converting the device configuration to an RCU-protected pointer.
Historically, geneve_changelink() updated the device configuration by copying the new configuration over the old one using memcpy() under RTNL.
To prevent the transmit/receive data paths from reading torn values during the copy, geneve_quiesce() was used to pause the data path and wait for a synchronize_net(), causing packet loss and latency.
By converting the configuration to an RCU-protected pointer, we can perform atomic updates via RCU swap. This allows data path readers to safely access the configuration locklessly under RCU read lock, and removes the need to stop the data path during changelink.
With the RCU infrastructure in place, geneve_fill_info() is then updated to read the configuration under RCU read lock, removing its dependency on RTNL.
v2: addressed Kuniyuki, Paolo and sashiko feedback
v1: https://lore.kernel.org/netdev/[email protected]/T/#m887804321856d9b5c7142107e81b52553e60e6ab
Eric Dumazet (3):
geneve: pass geneve_config pointer to helper functions
geneve: convert config to RCU-protected pointer
geneve: make geneve_fill_info() RTNL independent
drivers/net/geneve.c | 370 ++++++++++++++++++++++++------------------- 1 file changed, 209 insertions(+), 161 deletions(-)
Signature · 1 line
2.55.0.795.g602f6c329a-goog