* [lttng-dev] [PATCH lttng-tools 1/2] Fix: handle backward compatibility with lttng-modules 2.7
@ 2016-10-05 16:54 Mathieu Desnoyers
2016-10-05 16:54 ` [lttng-dev] [PATCH lttng-tools 2/2] Bump lttng-modules ABI minor version Mathieu Desnoyers
2016-10-06 14:46 ` [lttng-dev] [PATCH lttng-tools 1/2] Fix: handle backward compatibility with lttng-modules 2.7 Jérémie Galarneau
0 siblings, 2 replies; 4+ messages in thread
From: Mathieu Desnoyers @ 2016-10-05 16:54 UTC (permalink / raw)
There is no major version bump between lttng-module 2.7 and 2.8 ABI.
Even though we do not guarantee compatibility, do a best effort to
maintain it when possible.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers at efficios.com>
---
src/common/kernel-consumer/kernel-consumer.c | 38 +++++++++++++++++++++++-----
1 file changed, 32 insertions(+), 6 deletions(-)
diff --git a/src/common/kernel-consumer/kernel-consumer.c b/src/common/kernel-consumer/kernel-consumer.c
index 65dcce4..a8abcd7 100644
--- a/src/common/kernel-consumer/kernel-consumer.c
+++ b/src/common/kernel-consumer/kernel-consumer.c
@@ -1085,15 +1085,27 @@ static int get_index_values(struct ctf_packet_index *index, int infd)
ret = kernctl_get_instance_id(infd, &index->stream_instance_id);
if (ret < 0) {
- PERROR("kernctl_get_instance_id");
- goto error;
+ if (ret == -ENOTTY) {
+ /* Command not implemented by lttng-modules. */
+ index->stream_instance_id = -1ULL;
+ ret = 0;
+ } else {
+ PERROR("kernctl_get_instance_id");
+ goto error;
+ }
}
index->stream_instance_id = htobe64(index->stream_instance_id);
ret = kernctl_get_sequence_number(infd, &index->packet_seq_num);
if (ret < 0) {
- PERROR("kernctl_get_sequence_number");
- goto error;
+ if (ret == -ENOTTY) {
+ /* Command not implemented by lttng-modules. */
+ index->packet_seq_num = -1ULL;
+ ret = 0;
+ } else {
+ PERROR("kernctl_get_sequence_number");
+ goto error;
+ }
}
index->packet_seq_num = htobe64(index->packet_seq_num);
@@ -1145,8 +1157,14 @@ int update_stream_stats(struct lttng_consumer_stream *stream)
ret = kernctl_get_sequence_number(stream->wait_fd, &seq);
if (ret < 0) {
- PERROR("kernctl_get_sequence_number");
- goto end;
+ if (ret == -ENOTTY) {
+ /* Command not implemented by lttng-modules. */
+ seq = -1ULL;
+ ret = 0;
+ } else {
+ PERROR("kernctl_get_sequence_number");
+ goto end;
+ }
}
/*
@@ -1205,6 +1223,14 @@ int metadata_stream_check_version(int infd, struct lttng_consumer_stream *stream
ret = kernctl_get_metadata_version(infd, &cur_version);
if (ret < 0) {
+ if (ret == -ENOTTY) {
+ /*
+ * LTTng-modules does not implement this
+ * command.
+ */
+ ret = 0;
+ goto end;
+ }
ERR("Failed to get the metadata version");
goto end;
}
--
2.1.4
^ permalink raw reply [flat|nested] 4+ messages in thread
* [lttng-dev] [PATCH lttng-tools 2/2] Bump lttng-modules ABI minor version
2016-10-05 16:54 [lttng-dev] [PATCH lttng-tools 1/2] Fix: handle backward compatibility with lttng-modules 2.7 Mathieu Desnoyers
@ 2016-10-05 16:54 ` Mathieu Desnoyers
2016-10-06 14:47 ` Jérémie Galarneau
2016-10-06 14:46 ` [lttng-dev] [PATCH lttng-tools 1/2] Fix: handle backward compatibility with lttng-modules 2.7 Jérémie Galarneau
1 sibling, 1 reply; 4+ messages in thread
From: Mathieu Desnoyers @ 2016-10-05 16:54 UTC (permalink / raw)
Follow lttng-modules upstream.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers at efficios.com>
---
src/common/kernel-ctl/kernel-ioctl.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/common/kernel-ctl/kernel-ioctl.h b/src/common/kernel-ctl/kernel-ioctl.h
index 805de02..e235d10 100644
--- a/src/common/kernel-ctl/kernel-ioctl.h
+++ b/src/common/kernel-ctl/kernel-ioctl.h
@@ -20,7 +20,7 @@
#define _LTT_KERNEL_IOCTL_H
#define LTTNG_MODULES_ABI_MAJOR_VERSION 2
-#define LTTNG_MODULES_ABI_MINOR_VERSION 1
+#define LTTNG_MODULES_ABI_MINOR_VERSION 2
/* Get a snapshot of the current ring buffer producer and consumer positions */
#define RING_BUFFER_SNAPSHOT _IO(0xF6, 0x00)
--
2.1.4
^ permalink raw reply [flat|nested] 4+ messages in thread
* [lttng-dev] [PATCH lttng-tools 1/2] Fix: handle backward compatibility with lttng-modules 2.7
2016-10-05 16:54 [lttng-dev] [PATCH lttng-tools 1/2] Fix: handle backward compatibility with lttng-modules 2.7 Mathieu Desnoyers
2016-10-05 16:54 ` [lttng-dev] [PATCH lttng-tools 2/2] Bump lttng-modules ABI minor version Mathieu Desnoyers
@ 2016-10-06 14:46 ` Jérémie Galarneau
1 sibling, 0 replies; 4+ messages in thread
From: Jérémie Galarneau @ 2016-10-06 14:46 UTC (permalink / raw)
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 3425 bytes --]
Merged in master and stable-2.8. Thanks!
Jérémie
On 5 October 2016 at 12:54, Mathieu Desnoyers
<mathieu.desnoyers at efficios.com> wrote:
> There is no major version bump between lttng-module 2.7 and 2.8 ABI.
> Even though we do not guarantee compatibility, do a best effort to
> maintain it when possible.
>
> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers at efficios.com>
> ---
> src/common/kernel-consumer/kernel-consumer.c | 38 +++++++++++++++++++++++-----
> 1 file changed, 32 insertions(+), 6 deletions(-)
>
> diff --git a/src/common/kernel-consumer/kernel-consumer.c b/src/common/kernel-consumer/kernel-consumer.c
> index 65dcce4..a8abcd7 100644
> --- a/src/common/kernel-consumer/kernel-consumer.c
> +++ b/src/common/kernel-consumer/kernel-consumer.c
> @@ -1085,15 +1085,27 @@ static int get_index_values(struct ctf_packet_index *index, int infd)
>
> ret = kernctl_get_instance_id(infd, &index->stream_instance_id);
> if (ret < 0) {
> - PERROR("kernctl_get_instance_id");
> - goto error;
> + if (ret == -ENOTTY) {
> + /* Command not implemented by lttng-modules. */
> + index->stream_instance_id = -1ULL;
> + ret = 0;
> + } else {
> + PERROR("kernctl_get_instance_id");
> + goto error;
> + }
> }
> index->stream_instance_id = htobe64(index->stream_instance_id);
>
> ret = kernctl_get_sequence_number(infd, &index->packet_seq_num);
> if (ret < 0) {
> - PERROR("kernctl_get_sequence_number");
> - goto error;
> + if (ret == -ENOTTY) {
> + /* Command not implemented by lttng-modules. */
> + index->packet_seq_num = -1ULL;
> + ret = 0;
> + } else {
> + PERROR("kernctl_get_sequence_number");
> + goto error;
> + }
> }
> index->packet_seq_num = htobe64(index->packet_seq_num);
>
> @@ -1145,8 +1157,14 @@ int update_stream_stats(struct lttng_consumer_stream *stream)
>
> ret = kernctl_get_sequence_number(stream->wait_fd, &seq);
> if (ret < 0) {
> - PERROR("kernctl_get_sequence_number");
> - goto end;
> + if (ret == -ENOTTY) {
> + /* Command not implemented by lttng-modules. */
> + seq = -1ULL;
> + ret = 0;
> + } else {
> + PERROR("kernctl_get_sequence_number");
> + goto end;
> + }
> }
>
> /*
> @@ -1205,6 +1223,14 @@ int metadata_stream_check_version(int infd, struct lttng_consumer_stream *stream
>
> ret = kernctl_get_metadata_version(infd, &cur_version);
> if (ret < 0) {
> + if (ret == -ENOTTY) {
> + /*
> + * LTTng-modules does not implement this
> + * command.
> + */
> + ret = 0;
> + goto end;
> + }
> ERR("Failed to get the metadata version");
> goto end;
> }
> --
> 2.1.4
>
--
Jérémie Galarneau
EfficiOS Inc.
http://www.efficios.com
^ permalink raw reply [flat|nested] 4+ messages in thread
* [lttng-dev] [PATCH lttng-tools 2/2] Bump lttng-modules ABI minor version
2016-10-05 16:54 ` [lttng-dev] [PATCH lttng-tools 2/2] Bump lttng-modules ABI minor version Mathieu Desnoyers
@ 2016-10-06 14:47 ` Jérémie Galarneau
0 siblings, 0 replies; 4+ messages in thread
From: Jérémie Galarneau @ 2016-10-06 14:47 UTC (permalink / raw)
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1012 bytes --]
Merged in master, thanks!
Jérémie
On 5 October 2016 at 12:54, Mathieu Desnoyers
<mathieu.desnoyers at efficios.com> wrote:
> Follow lttng-modules upstream.
>
> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers at efficios.com>
> ---
> src/common/kernel-ctl/kernel-ioctl.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/common/kernel-ctl/kernel-ioctl.h b/src/common/kernel-ctl/kernel-ioctl.h
> index 805de02..e235d10 100644
> --- a/src/common/kernel-ctl/kernel-ioctl.h
> +++ b/src/common/kernel-ctl/kernel-ioctl.h
> @@ -20,7 +20,7 @@
> #define _LTT_KERNEL_IOCTL_H
>
> #define LTTNG_MODULES_ABI_MAJOR_VERSION 2
> -#define LTTNG_MODULES_ABI_MINOR_VERSION 1
> +#define LTTNG_MODULES_ABI_MINOR_VERSION 2
>
> /* Get a snapshot of the current ring buffer producer and consumer positions */
> #define RING_BUFFER_SNAPSHOT _IO(0xF6, 0x00)
> --
> 2.1.4
>
--
Jérémie Galarneau
EfficiOS Inc.
http://www.efficios.com
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-10-06 14:47 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-05 16:54 [lttng-dev] [PATCH lttng-tools 1/2] Fix: handle backward compatibility with lttng-modules 2.7 Mathieu Desnoyers
2016-10-05 16:54 ` [lttng-dev] [PATCH lttng-tools 2/2] Bump lttng-modules ABI minor version Mathieu Desnoyers
2016-10-06 14:47 ` Jérémie Galarneau
2016-10-06 14:46 ` [lttng-dev] [PATCH lttng-tools 1/2] Fix: handle backward compatibility with lttng-modules 2.7 Jérémie Galarneau
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox