From: Vladislav Shpilevoy <v.shpilevoy@tarantool.org> To: tarantool-patches@freelists.org Cc: vdavydov.dev@gmail.com Subject: [PATCH 1/3] iproto: rename iproto_bind_msg to iproto_cfg_msg Date: Sat, 21 Apr 2018 01:52:09 +0300 [thread overview] Message-ID: <12f30fd2d36b1af90047cc491c30fc18e149d8cf.1524264646.git.v.shpilevoy@tarantool.org> (raw) In-Reply-To: <cover.1524264351.git.v.shpilevoy@tarantool.org> In-Reply-To: <cover.1524264646.git.v.shpilevoy@tarantool.org> IProto_bind_msg is used by TX thread to udpate bind address in IProto thread with no explicit locking anything. In #3320 new IProto dynamic configuration parameter appears - 'iproto_msg_max' which regulates how many IProto requests can be in fly. The idea is to reuse iproto_bind_msg for this. Part of #3320 --- src/box/iproto.cc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/box/iproto.cc b/src/box/iproto.cc index 37026984d..fe502b51b 100644 --- a/src/box/iproto.cc +++ b/src/box/iproto.cc @@ -1659,15 +1659,15 @@ iproto_init() * we need to bounce a couple of messages to and * from this thread. */ -struct iproto_bind_msg: public cbus_call_msg +struct iproto_cfg_msg: public cbus_call_msg { const char *uri; }; static int -iproto_do_bind(struct cbus_call_msg *m) +iproto_do_cfg(struct cbus_call_msg *m) { - const char *uri = ((struct iproto_bind_msg *) m)->uri; + const char *uri = ((struct iproto_cfg_msg *) m)->uri; try { if (evio_service_is_active(&binary)) evio_service_stop(&binary); @@ -1695,9 +1695,9 @@ iproto_do_listen(struct cbus_call_msg *m) void iproto_bind(const char *uri) { - static struct iproto_bind_msg m; + static struct iproto_cfg_msg m; m.uri = uri; - if (cbus_call(&net_pipe, &tx_pipe, &m, iproto_do_bind, + if (cbus_call(&net_pipe, &tx_pipe, &m, iproto_do_cfg, NULL, TIMEOUT_INFINITY)) diag_raise(); } -- 2.15.1 (Apple Git-101)
next prev parent reply other threads:[~2018-04-20 22:52 UTC|newest] Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top 2018-04-20 22:52 [PATCH 0/3] iproto: allow to configure IPROTO_MSG_MAX Vladislav Shpilevoy [not found] ` <cover.1524264646.git.v.shpilevoy@tarantool.org> 2018-04-20 22:52 ` Vladislav Shpilevoy [this message] 2018-04-23 11:22 ` [PATCH 1/3] iproto: rename iproto_bind_msg to iproto_cfg_msg Vladimir Davydov 2018-04-23 17:00 ` [tarantool-patches] " Vladislav Shpilevoy 2018-04-20 22:52 ` [PATCH 2/3] iproto: fix error with input discarding Vladislav Shpilevoy 2018-04-23 11:20 ` Vladimir Davydov 2018-04-20 22:52 ` [PATCH 3/3] iproto: allow to configure IPROTO_MSG_MAX Vladislav Shpilevoy 2018-04-23 11:34 ` Vladimir Davydov 2018-04-23 17:00 ` [tarantool-patches] " Vladislav Shpilevoy 2018-04-24 8:04 ` Vladimir Davydov
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=12f30fd2d36b1af90047cc491c30fc18e149d8cf.1524264646.git.v.shpilevoy@tarantool.org \ --to=v.shpilevoy@tarantool.org \ --cc=tarantool-patches@freelists.org \ --cc=vdavydov.dev@gmail.com \ --subject='Re: [PATCH 1/3] iproto: rename iproto_bind_msg to iproto_cfg_msg' \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox