lkml.org 
[lkml]   [2013]   [Aug]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Re: [RFC PATCH 08/11] trace-cmd: Apply the trace-msg protocol for communication between a server and clients
(2013/08/21 2:56), Steven Rostedt wrote:
> On Mon, 19 Aug 2013 18:46:39 +0900
> Yoshihiro YUNOMAE <yoshihiro.yunomae.ez@hitachi.com> wrote:
>
>
>> This message protocol is incompatible with the previous unstructured message
>> protocol. So, if an old(new)-version client tries to connect to an
>> new(old)-version server, the operation should be stopped.
>>
>
> I'm a stickler for backward compatibility. I'm all for extensions.

No problem:)
I also worried about backward compatibility.

> I know this will just complicate things, but I don't mind that. What
> should happen is, it should try to connect with the new protocol, if it
> fails due to an older server, then it needs to fall back to the older
> method, without the added features. We can freeze the older method if
> need be. But I will not let a newer trace-cmd become incompatible with
> an older version. I worked hard to keep it that way. There's only a few
> exceptions to that.
>
> Note, an older client needs to also work as is with a newer server.
>
> Anyway, the old way only needs to stay the same, it does not need added
> features. For that, a switch to the new way is needed.

OK, I'll add the code switching to the new way in order to keep backward
compatibility. Would you give me your comments about following things?

<Network>
0. old server and old client
Old servers send "tracecmd" as the first message.
Old clients compare the first 8byte of the first message with "tracecmd".

1. new server
- Send "tracecmd-v2" as the first message.
- Check the reply message whether the message is "tracecmd-v2" or cpus
value.
If "tracecmd-v2", the server uses new protocol and wait for the
message MSG_TINIT.
If cpus value, the server uses old protocol.

2. new client
- Receive the first message.
- Check the message whether the message is "tracecmd-v2" or not.
If "tracecmd-v2", the client sends "tracecmd-v2" to the server. Then,
the client sends the message MSG_TINIT.
If "tracecmd", the client sends cpus value as the old protocol.

<Virtio-serial>
This is new feature, so trace-cmd does not need to keep backward
compatibility.

> If you need help in accomplishing this, I'll work with you on that.

Thank you for your kindness!

Yoshihiro YUNOMAE

--
Yoshihiro YUNOMAE
Software Platform Research Dept. Linux Technology Center
Hitachi, Ltd., Yokohama Research Laboratory
E-mail: yoshihiro.yunomae.ez@hitachi.com




\
 
 \ /
  Last update: 2013-08-26 04:01    [W:0.097 / U:1.140 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site