Skip to content

net: optimize TX throughput and efficiency

Eric Dumazet netdev 2 versions – Applied

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

  1. v2 Latest6 patches 25 repliesApplied 6/6
  2. v15 patches 18 repliesSuperseded

Patches in v2 All 6 applied

#Subject and filesSizeRepliesApplied
1/6selftests/net: packetdrill: unflake tcp_user_timeout_user-timeout-probe.pkttools/testing/selftests/net/packetdrill/tcp_user_timeout_user-timeout-probe.pkt+4 -21 replyApplied
2/6net: add add indirect call wrapper in skb_release_head_state()net/core/skbuff.c+10 -114 repliesApplied
3/6net/sched: act_mirred: add loop detectioninclude/linux/netdevice_xmit.h net/sched/act_mirred.c+31 -402 repliesApplied
4/6Revert "net/sched: Fix mirred deadlock on device recursion"include/net/sch_generic.h net/core/dev.c net/sched/sch_generic.c+0 -93 repliesApplied
5/6net: sched: claim one cache line in Qdiscinclude/net/sch_generic.h+7 -112 repliesApplied
6/6net: dev_queue_xmit() llist adoptioninclude/net/sch_generic.h net/core/dev.c net/sched/sch_generic.c+59 -411 replyApplied

Reviews trailers per patch

All 6 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchToke Høiland-JørgensenKuniyuki IwashimaJamal Hadi SalimVictor Nogueira
SeriesT-b A-b
1/6R-b
2/6R-b R-b
3/6R-b R-b
4/6R-b R-b R-b
5/6R-b R-b
6/6R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 4 reviewers.

Read the v2 thread

Cover letter [PATCH v2 net-next 0/6] net: optimize TX throughput and efficiency

In this series, I replace the busylock spinlock we have in __dev_queue_xmit() and use lockless list (llist) to reduce spinlock contention to the minimum.

Idea is that only one cpu might spin on the qdisc spinlock, while others simply add their skb in the llist.

After this series, we get a 300 % (4x) improvement on heavy TX workloads, sending twice the number of packets per second, for half the cpu cycles.

v2: deflake tcp_user_timeout_user-timeout-probe.pkt.
Ability to return a different code than NET_XMIT_SUCCESS when __dev_xmit_skb() has a single skb to send.

Eric Dumazet (6):
selftests/net: packetdrill: unflake
tcp_user_timeout_user-timeout-probe.pkt
net: add add indirect call wrapper in skb_release_head_state() net/sched: act_mirred: add loop detection
Revert "net/sched: Fix mirred deadlock on device recursion"
net: sched: claim one cache line in Qdisc
net: dev_queue_xmit() llist adoption

 include/linux/netdevice_xmit.h                |  9 +-
 include/net/sch_generic.h                     | 23 ++---
 net/core/dev.c                                | 97 +++++++++++--------
 net/core/skbuff.c                             | 11 ++-
 net/sched/act_mirred.c                        | 62 +++++-------
 net/sched/sch_generic.c                       |  7 --
 .../tcp_user_timeout_user-timeout-probe.pkt   |  6 +-
 7 files changed, 111 insertions(+), 104 deletions(-)
Signature · 1 line
2.51.0.788.g6d19910ace-goog