net: lockless stop/wake combo macros
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
- v4 Latest7 patches 2 repliesApplied 7/7
- v37 patches 6 repliesSuperseded
Changes in v4 from the cover letter
- adjust a comment in patch 4
- use IS_ENABLED() in patch 7
v3: https://lore.kernel.org/all/[email protected]/
- render the info as part of documentation, maybe someone will notice and use it (patches 1, 2, 3 are new)
- use the __after_atomic barrier
- add last patch to avoid a barrier in the wake path
more detailed change logs in the patches.
Patches in v4 All 7 applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/7 | docs: net: reformat driver.rst from a list to sectionsDocumentation/ | +56 | 0 replies | Applied |
| 2/7 | docs: net: move the probe and open/close sections of driver.rst upDocumentation/ | +27 | 0 replies | Applied |
| 3/7 | docs: net: use C syntax highlight in driver.rstDocumentation/ | +20 | 0 replies | Applied |
| 4/7 | net: provide macros for commonly copied lockless queue stop/wake codeDocumentation/ include/ include/ | +151 | 0 replies | Applied |
| 5/7 | ixgbe: use new queue try_stop/try_wake macrosdrivers/ | +10 | 0 replies | Applied |
| 6/7 | bnxt: use new queue try_stop/try_wake macrosdrivers/ | +7 | 2 replies | Applied |
| 7/7 | net: piggy back on the memory barrier in bql when waking queuesdrivers/ drivers/ include/ +1 more | +38 | 0 replies | Applied |
Reviews trailers per patch
2 of 7 patches have a Reviewed-by or Acked-by.
| Patch | Herbert Xu | Michael Chan |
|---|---|---|
| 1/7 | ||
| 2/7 | ||
| 3/7 | ||
| 4/7 | A-b | |
| 5/7 | ||
| 6/7 | R-b | |
| 7/7 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH net-next v4 0/7] net: lockless stop/wake combo macros
A lot of drivers follow the same scheme to stop / start queues without introducing locks between xmit and NAPI tx completions. I'm guessing they all copy'n'paste each other's code. The original code dates back all the way to e1000 and Linux 2.6.19.
v4:
- adjust a comment in patch 4
- use IS_ENABLED() in patch 7
v3: https://lore.kernel.org/all/[email protected]/
- render the info as part of documentation, maybe someone will notice and use it (patches 1, 2, 3 are new)
- use the __after_atomic barrier
- add last patch to avoid a barrier in the wake path
more detailed change logs in the patches.
v2: https://lore.kernel.org/all/[email protected]/
- really flip the unlikely into a likely in __netif_tx_queue_maybe_wake()
- convert if / else into pre-init of _ret
v1: https://lore.kernel.org/all/[email protected]/
- perdicate -> predicate
- on race use start instead of wake and make a note of that in the doc / comment at the start
rfc: https://lore.kernel.org/all/[email protected]/
Jakub Kicinski (7):
docs: net: reformat driver.rst from a list to sections
docs: net: move the probe and open/close sections of driver.rst up
docs: net: use C syntax highlight in driver.rst
net: provide macros for commonly copied lockless queue stop/wake code
ixgbe: use new queue try_stop/try_wake macros
bnxt: use new queue try_stop/try_wake macros
net: piggy back on the memory barrier in bql when waking queues
Documentation/networking/driver.rst | 119 ++++++++----- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 42 +---- drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 42 ++--- include/linux/netdevice.h | 3 +- include/net/netdev_queues.h | 163 ++++++++++++++++++ 5 files changed, 262 insertions(+), 107 deletions(-) create mode 100644 include/net/netdev_queues.h
Signature · 1 line
2.39.2