]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
crimson/net: enable connections on all cores
authorYingxin Cheng <yingxincheng@gmail.com>
Tue, 12 Feb 2019 05:11:16 +0000 (13:11 +0800)
committerYingxin Cheng <yingxincheng@gmail.com>
Tue, 12 Feb 2019 08:47:53 +0000 (16:47 +0800)
commit7ac5fb013bfa1d3666849b5e73a3bbbe0d4f1813
tree85675eacb7add7adb289571a432a352898220de2
parente01b99c3584770cac75d42031349e811ef804740
crimson/net: enable connections on all cores

Implement the sharded crimson-messenger:

* Sharded Messenger: provides shared-nothing Messenger for each shard,
  it's interfaces are symmetric to be called, any modifications will be
  applied to all shards.

* Sharded/non-sharded Dispatcher interface: allow connections to be
  dispatched, and related resources (such as Session) to be managed in
  its own shard or not.

* Sharded Connection: A connection only lives at one dedicated core
  during its lifecycle. It's sharded by its peer_IP in this PoC, because
  peer port and nonce are not available when a socket is accepted. While
  its interfaces are safe to be called from all shards.

* Replace `boost::intrusive_ptr` by seastar native smart ptrs for
  `Connection` and `SocketConnection`, because they need to be
  destructed from its original core.

* Unit test: establish multiple connections on both client and server
  sides, they runs concurrently and creates sessions that are also
  following shared-nothing design.

Signed-off-by: Yingxin Cheng <yingxincheng@gmail.com>
13 files changed:
src/crimson/CMakeLists.txt
src/crimson/net/Connection.h
src/crimson/net/Dispatcher.h
src/crimson/net/Fwd.h
src/crimson/net/Messenger.cc [new file with mode: 0644]
src/crimson/net/Messenger.h
src/crimson/net/Socket.h
src/crimson/net/SocketConnection.cc
src/crimson/net/SocketConnection.h
src/crimson/net/SocketMessenger.cc
src/crimson/net/SocketMessenger.h
src/test/crimson/CMakeLists.txt
src/test/crimson/test_messenger.cc