From: Vladislav Shpilevoy <v.shpilevoy@tarantool.org>
To: tarantool-patches@freelists.org,
Konstantin Osipov <kostja@tarantool.org>
Subject: [tarantool-patches] Re: [PATCH 2/2] swim: expose ping broadcast API
Date: Thu, 11 Apr 2019 16:47:01 +0300 [thread overview]
Message-ID: <284071b3-e0b1-0993-5245-4428a791ddee@tarantool.org> (raw)
In-Reply-To: <20190411130014.GB2123@chai>
On 11/04/2019 16:00, Konstantin Osipov wrote:
> * Vladislav Shpilevoy <v.shpilevoy@tarantool.org> [19/04/10 21:01]:
>> +/**
>> + * Broadcast a ping to all interfaces on a specified @a port. If
>> + * @a port is < 0, then a port of the SWIM instance is used.
>> + */
>
> Please add to the comment information about possible errors -
> memory allocation error or there are no interfaces available for
> broadcast. Mention what errors are not detected since the
> broadcast itself happens asynchronously - errors related to
> writing to network, these are simply ignored.
Updated the comment:
===================================================================
diff --git a/src/lib/swim/swim.h b/src/lib/swim/swim.h
index 60f5a8a1d..c4026f477 100644
--- a/src/lib/swim/swim.h
+++ b/src/lib/swim/swim.h
@@ -137,8 +137,17 @@ int
swim_probe_member(struct swim *swim, const char *uri);
/**
- * Broadcast a ping to all interfaces on a specified @a port. If
- * @a port is < 0, then a port of the SWIM instance is used.
+ * Broadcast a ping to all interfaces supporting IPv4 with a
+ * specified @a port.
+ * @param swim SWIM instance to broadcast from.
+ * @param port Port to send to. If < 0, then the current port of
+ * @a swim is used.
+ *
+ * @retval 0 Success. The broadcast packet was scheduled and at
+ * least one suitable interface was detected. But it does
+ * not mean, that the packet will be sent successfully.
+ * @retval -1 Error. OOM, or there was not found an interface,
+ * supporting IPv4.
*/
int
swim_broadcast(struct swim *swim, int port);
===================================================================
>
>> +int
>> +swim_broadcast(struct swim *swim, int port);
>
>
> --
> Konstantin Osipov, Moscow, Russia, +7 903 626 22 32
> http://tarantool.io - www.twitter.com/kostja_osipov
>
next prev parent reply other threads:[~2019-04-11 13:47 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-10 17:45 [tarantool-patches] [PATCH 0/2] swim broadcast Vladislav Shpilevoy
2019-04-10 17:45 ` [tarantool-patches] [PATCH 1/2] swim: introduce broadcast tasks Vladislav Shpilevoy
2019-04-11 12:57 ` [tarantool-patches] " Konstantin Osipov
2019-04-11 13:46 ` Vladislav Shpilevoy
2019-04-10 17:45 ` [tarantool-patches] [PATCH 2/2] swim: expose ping broadcast API Vladislav Shpilevoy
2019-04-11 13:00 ` [tarantool-patches] " Konstantin Osipov
2019-04-11 13:00 ` Konstantin Osipov
2019-04-11 13:47 ` Vladislav Shpilevoy [this message]
2019-04-10 18:11 ` [tarantool-patches] Re: [PATCH 0/2] swim broadcast Konstantin Osipov
2019-04-10 18:13 ` Vladislav Shpilevoy
2019-04-10 22:13 ` Vladislav Shpilevoy
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=284071b3-e0b1-0993-5245-4428a791ddee@tarantool.org \
--to=v.shpilevoy@tarantool.org \
--cc=kostja@tarantool.org \
--cc=tarantool-patches@freelists.org \
--subject='[tarantool-patches] Re: [PATCH 2/2] swim: expose ping broadcast API' \
/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