Skip to content

mptcp: refactor token container

Paolo Abeni mptcp netdev 2 versions In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest4 patches 5 repliesIn review
  2. v14 patches 2 repliesSuperseded

Changes in v2 from the cover letter

- fixed a few extra and sparse warns

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4mptcp: add __init annotation on setup functionsnet/mptcp/pm.c net/mptcp/pm_netlink.c net/mptcp/protocol.c +2 more+10 -101 reply
2/4mptcp: refactor token containernet/mptcp/protocol.c net/mptcp/protocol.h net/mptcp/subflow.c +1 more+236 -1131 reply
3/4mptcp: move crypto test to KUNITnet/mptcp/Kconfig net/mptcp/Makefile net/mptcp/crypto.c +1 more+91 -671 reply
4/4mptcp: introduce token KUNIT self-testsnet/mptcp/Kconfig net/mptcp/Makefile net/mptcp/token.c +1 more+152 -21 reply

Reviews trailers per patch

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

PatchMat Martineau
1/4R-b
2/4R-b
3/4R-b
4/4R-b

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

Read the v2 thread

Cover letter [PATCH net-next v2 0/4] mptcp: refactor token container

Currently the msk sockets are stored in a single radix tree, protected by a global spin_lock. This series moves to an hash table, allocated at boot time, with per bucker spin_lock - alike inet_hashtables, but using a different key:
the token itself.

The above improves scalability, as write operations will have a far later chance to compete for lock acquisition, allows lockless lookup, and will allow easier msk traversing - e.g. for diag interface implementation's sake.

This also introduces trivial, related, kunit tests and move the existing in kernel's one to kunit.

v1 -> v2:
- fixed a few extra and sparse warns

Paolo Abeni (4):
mptcp: add __init annotation on setup functions
mptcp: refactor token container
mptcp: move crypto test to KUNIT
mptcp: introduce token KUNIT self-tests

 net/mptcp/Kconfig       |  20 ++-
 net/mptcp/Makefile      |   4 +
 net/mptcp/crypto.c      |  63 +--------
 net/mptcp/crypto_test.c |  72 +++++++++++
 net/mptcp/pm.c          |   2 +-
 net/mptcp/pm_netlink.c  |   2 +-
 net/mptcp/protocol.c    |  49 ++++---
 net/mptcp/protocol.h    |  24 ++--
 net/mptcp/subflow.c     |  21 ++-
 net/mptcp/token.c       | 280 ++++++++++++++++++++++++++++------------
 net/mptcp/token_test.c  | 140 ++++++++++++++++++++
 11 files changed, 487 insertions(+), 190 deletions(-)
 create mode 100644 net/mptcp/crypto_test.c
 create mode 100644 net/mptcp/token_test.c
Signature · 1 line
2.26.2