Skip to content

locklessly protect left members in struct rps_dev_flow

Jason Xing netdev 3 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. v3 Latest3 patches 7 repliesApplied 3/3
  2. v23 patches 7 repliesSuperseded
  3. v13 patches 1 replySuperseded

Patches in v3 All 3 applied

#Subject and filesSizeRepliesApplied
1/3net: rps: protect last_qtail with rps_input_queue_tail_save() helpernet/core/dev.c+4 -45 repliesApplied
2/3net: rps: protect filter locklesslynet/core/dev.c+4 -41 replyApplied
3/3net: rps: locklessly access rflow->cpunet/core/dev.c+1 -11 replyApplied

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by.

PatchEric Dumazet
1/3R-b
2/3R-b
3/3R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH net-next v3 0/3] locklessly protect left members in struct rps_dev_flow

From: Jason Xing <[email protected]>

Since Eric did a more complicated locklessly change to last_qtail member[1] in struct rps_dev_flow, the left members are easier to change as the same.

One thing important I would like to share by qooting Eric:
"rflow is located in rxqueue->rps_flow_table, it is thus private to current thread. Only one cpu can service an RX queue at a time."
So we only pay attention to the reader in the rps_may_expire_flow() and writer in the set_rps_cpu(). They are in the two different contexts.

[1]:
https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git/commit/?id=3b4cf29bdab

v3

1. adjust the protection in a right way (Eric)

v2
1. fix passing wrong type qtail.

Jason Xing (3):
net: rps: protect last_qtail with rps_input_queue_tail_save() helper
net: rps: protect filter locklessly
net: rps: locklessly access rflow->cpu

 net/core/dev.c | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)
Signature · 1 line
2.37.3