From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Mon, 23 Apr 2018 14:22:02 +0300 From: Vladimir Davydov Subject: Re: [PATCH 1/3] iproto: rename iproto_bind_msg to iproto_cfg_msg Message-ID: <20180423112202.jrqfczbsvfadw4ku@esperanza> References: <12f30fd2d36b1af90047cc491c30fc18e149d8cf.1524264646.git.v.shpilevoy@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <12f30fd2d36b1af90047cc491c30fc18e149d8cf.1524264646.git.v.shpilevoy@tarantool.org> To: Vladislav Shpilevoy Cc: tarantool-patches@freelists.org List-ID: On Sat, Apr 21, 2018 at 01:52:09AM +0300, Vladislav Shpilevoy wrote: > 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(-) I don't see any point in this patch. Patch 3 overwrites half of it anyway so it doesn't really facilitate review. Please squash it. > > 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(); > }