linux-trace-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tzvetomir Stoyanov <tz.stoyanov@gmail.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: Linux Trace Devel <linux-trace-devel@vger.kernel.org>
Subject: Re: [PATCH v27 1/5] trace-cmd: Add timestamp synchronization per vCPU
Date: Thu, 4 Feb 2021 14:31:44 +0200	[thread overview]
Message-ID: <CAPpZLN5GK1mz=r_iu9PcLqz+_j_KffYf8e-y+KUzg6fHgCO8Eg@mail.gmail.com> (raw)
In-Reply-To: <20210203152013.21560b32@gandalf.local.home>

On Wed, Feb 3, 2021 at 10:20 PM Steven Rostedt <rostedt@goodmis.org> wrote:
>
> On Mon,  1 Feb 2021 18:03:35 +0200
> "Tzvetomir Stoyanov (VMware)" <tz.stoyanov@gmail.com> wrote:
>
> > --- a/lib/trace-cmd/trace-timesync.c
> > +++ b/lib/trace-cmd/trace-timesync.c
> > @@ -22,6 +22,8 @@
> >  #include "event-utils.h"
> >  #include "trace-tsync-local.h"
> >
> > +typedef __be16 be16;
>
> I'm curious to why you added this, because I have a machine that doesn't
> define __be16. I'm guessing it comes from "#include <linux/limits.h>", was
> there a reason to use that?
>
I added it to be consistent with the other messages, defined in trace-msg.c -
for signed / unsigned 32bit and 64bit fields. The other reason is that I used
to define packet's structure in that way in my previous job - to be
clear exactly
how many bits are exchanged over the network.
I agree that that is useless here and will replace it with an unsigned short.

> I really don't see the difference between __be16 and unsigned short. I
> think it's mostly used for static parsers. Perhaps its best to use __u16,
> or "unsigned short" to make sure it compiles on older systems.
>
> -- Steve
>
>
> > +
> >  struct tsync_proto {
> >       struct tsync_proto *next;
> >       char proto_name[TRACECMD_TSYNC_PNAME_LENGTH];
> > @@ -34,9 +36,13 @@ struct tsync_proto {
> >       int (*clock_sync_free)(struct tracecmd_time_sync *clock_context);
> >       int (*clock_sync_calc)(struct tracecmd_time_sync *clock_context,
> >                              long long *offset, long long *scaling,
> > -                            long long *timestamp);
> > +                            long long *timestamp, unsigned int cpu);
> >  };
> >
> > +struct tsync_probe_request_msg {
> > +     be16    cpu;
> > +} __packed;
>


-- 
Tzvetomir (Ceco) Stoyanov
VMware Open Source Technology Center

  reply	other threads:[~2021-02-04 12:32 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-01 16:03 [PATCH v27 0/5] Timestamp synchronization of host - guest tracing session Tzvetomir Stoyanov (VMware)
2021-02-01 16:03 ` [PATCH v27 1/5] trace-cmd: Add timestamp synchronization per vCPU Tzvetomir Stoyanov (VMware)
2021-02-03 20:20   ` Steven Rostedt
2021-02-04 12:31     ` Tzvetomir Stoyanov [this message]
2021-02-01 16:03 ` [PATCH v27 2/5] trace-cmd: Add dummy function to initialize timestamp sync logic Tzvetomir Stoyanov (VMware)
2021-02-01 16:03 ` [PATCH v27 3/5] trace-cmd: [POC] PTP-like algorithm for host - guest timestamp synchronization Tzvetomir Stoyanov (VMware)
2021-02-01 16:03 ` [PATCH v27 4/5] trace-cmd: Debug scripts for " Tzvetomir Stoyanov (VMware)
2021-02-01 16:03 ` [PATCH v27 5/5] trace-cmd [POC]: Add KVM timestamp synchronization plugin Tzvetomir Stoyanov (VMware)
2021-02-03 20:21   ` Steven Rostedt

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='CAPpZLN5GK1mz=r_iu9PcLqz+_j_KffYf8e-y+KUzg6fHgCO8Eg@mail.gmail.com' \
    --to=tz.stoyanov@gmail.com \
    --cc=linux-trace-devel@vger.kernel.org \
    --cc=rostedt@goodmis.org \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).