void ProtocolV2::execute_accepting()
{
assert(is_socket_valid);
- trigger_state(state_t::ACCEPTING, io_state_t::none);
+ trigger_state(state_t::ACCEPTING, io_state_t::delay);
gate.dispatch_in_background("execute_accepting", conn, [this] {
return seastar::futurize_invoke([this] {
#ifdef UNIT_TESTS_BUILT
void ProtocolV2::execute_server_wait()
{
ceph_assert_always(is_socket_valid);
- trigger_state(state_t::SERVER_WAIT, io_state_t::none);
+ trigger_state(state_t::SERVER_WAIT, io_state_t::delay);
gated_execute("execute_server_wait", conn, [this] {
return frame_assembler->read_exactly(1
).then([this](auto bptr) {
IOHandler::IOHandler(ChainedDispatchers &dispatchers,
SocketConnection &conn)
: shard_states(shard_states_t::create(
- seastar::this_shard_id(), io_state_t::none)),
+ seastar::this_shard_id(), io_state_t::delay)),
dispatchers(dispatchers),
conn(conn),
conn_ref(conn.get_local_shared_foreign_from_this())
void IOHandler::mark_down()
{
ceph_assert_always(seastar::this_shard_id() == get_shard_id());
- ceph_assert_always(get_io_state() != io_state_t::none);
need_dispatch_reset = false;
if (get_io_state() == io_state_t::drop) {
return;
fa ? "present" : "N/A", set_notify_out,
io_stat_printer{*this});
ceph_assert_always(!(
- (new_state == io_state_t::none && prv_state != io_state_t::none) ||
- (new_state == io_state_t::open && prv_state == io_state_t::open)
+ new_state == io_state_t::open && prv_state == io_state_t::open
));
if (prv_state == io_state_t::drop) {
ConnectionFRef conn_fref)
{
assert(seastar::this_shard_id() == get_shard_id());
- assert(get_io_state() == io_state_t::none);
+ assert(get_io_state() == io_state_t::delay);
ceph_assert_always(conn_ref);
conn_ref.reset();
assert(maybe_prv_shard_states == nullptr);
shard_states.reset();
- shard_states = shard_states_t::create(sid, io_state_t::none);
+ shard_states = shard_states_t::create(sid, io_state_t::delay);
logger().debug("{} send {} set_accepted_sid() to core {}", conn, cc_seq, sid);
return seastar::smp::submit_to(sid,
[this, cc_seq, conn_fref=std::move(conn_fref)]() mutable {
logger().debug("{} set accepted sid", conn);
ceph_assert_always(seastar::this_shard_id() == get_shard_id());
- ceph_assert_always(get_io_state() == io_state_t::none);
+ ceph_assert_always(get_io_state() == io_state_t::delay);
assert(maybe_prv_shard_states == nullptr);
ceph_assert_always(!conn_ref);
conn_ref = make_local_shared_foreign(std::move(conn_fref));
* io behavior accordingly.
*/
enum class io_state_t : uint8_t {
- none, // no IO is possible as the connection is not available to the user yet.
delay, // IO is delayed until open.
open, // Dispatch In and Out concurrently.
drop, // Drop IO as the connection is closed.
using enum crimson::net::IOHandler::io_state_t;
std::string_view name;
switch (state) {
- case none:
- name = "none";
- break;
case delay:
name = "delay";
break;