summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
e99f944)
When creating a new channel, the streams being sent to the relayd are
kept invisible to the live client until the "streams_sent" command is
received. This ensures the client does not see a partial stream set.
This "streams_sent" command needs to be sent on CPU hotplug too,
otherwise the live client handling within relayd is not aware of those
streams (they are never published).
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
uint64_t discarded_events;
/* Total number of missed packets due to overwriting (overwrite). */
uint64_t lost_packets;
uint64_t discarded_events;
/* Total number of missed packets due to overwriting (overwrite). */
uint64_t lost_packets;
+
+ bool streams_sent_to_relayd;
ERR("sending streams sent to relayd");
goto end_unlock;
}
ERR("sending streams sent to relayd");
goto end_unlock;
}
+ channel->streams_sent_to_relayd = true;
}
ret = kernctl_buffer_flush(stream->wait_fd);
}
ret = kernctl_buffer_flush(stream->wait_fd);
consumer_stream_free(new_stream);
goto end_nosignal;
}
consumer_stream_free(new_stream);
goto end_nosignal;
}
+
+ /*
+ * If adding an extra stream to an already
+ * existing channel (e.g. cpu hotplug), we need
+ * to send the "streams_sent" command to relayd.
+ */
+ if (channel->streams_sent_to_relayd) {
+ ret = consumer_send_relayd_streams_sent(
+ new_stream->net_seq_idx);
+ if (ret < 0) {
+ goto end_nosignal;
+ }
+ }
}
/* Get the right pipe where the stream will be sent. */
}
/* Get the right pipe where the stream will be sent. */
if (ret < 0) {
goto end_nosignal;
}
if (ret < 0) {
goto end_nosignal;
}
+ channel->streams_sent_to_relayd = true;