All of lore.kernel.org
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: linux-trace-devel@vger.kernel.org
Cc: "Steven Rostedt (Google)" <rostedt@goodmis.org>
Subject: [PATCH 2/8] trace-cmd library: Remove ports from clock context
Date: Thu, 14 Apr 2022 21:00:01 -0400	[thread overview]
Message-ID: <20220415010007.938408-3-rostedt@goodmis.org> (raw)
In-Reply-To: <20220415010007.938408-1-rostedt@goodmis.org>

From: "Steven Rostedt (Google)" <rostedt@goodmis.org>

The local and remote port fields are set but never used. Remove them.

Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
---
 lib/trace-cmd/include/trace-tsync-local.h |  2 --
 lib/trace-cmd/trace-timesync.c            | 11 +++--------
 2 files changed, 3 insertions(+), 10 deletions(-)

diff --git a/lib/trace-cmd/include/trace-tsync-local.h b/lib/trace-cmd/include/trace-tsync-local.h
index b357662c8d41..d0f82f5d0916 100644
--- a/lib/trace-cmd/include/trace-tsync-local.h
+++ b/lib/trace-cmd/include/trace-tsync-local.h
@@ -51,9 +51,7 @@ struct clock_sync_context {
 
 	/* Identifiers of local and remote time sync peers: cid and port */
 	unsigned int			local_cid;
-	unsigned int			local_port;
 	unsigned int			remote_cid;
-	unsigned int			remote_port;
 };
 
 int tracecmd_tsync_proto_register(const char *proto_name, int accuracy, int roles,
diff --git a/lib/trace-cmd/trace-timesync.c b/lib/trace-cmd/trace-timesync.c
index 9e82094eaa31..514d333e57a7 100644
--- a/lib/trace-cmd/trace-timesync.c
+++ b/lib/trace-cmd/trace-timesync.c
@@ -405,8 +405,7 @@ int __hidden vsock_get_port(int sd, unsigned int *port)
 	return 0;
 }
 
-static int get_vsocket_params(int fd, unsigned int *lcid, unsigned int *lport,
-			      unsigned int *rcid, unsigned int *rport)
+static int get_vsocket_params(int fd, unsigned int *lcid, unsigned int *rcid)
 {
 	struct sockaddr_vm addr;
 	socklen_t addr_len = sizeof(addr);
@@ -416,7 +415,6 @@ static int get_vsocket_params(int fd, unsigned int *lcid, unsigned int *lport,
 		return -1;
 	if (addr.svm_family != AF_VSOCK)
 		return -1;
-	*lport = addr.svm_port;
 	*lcid = addr.svm_cid;
 
 	memset(&addr, 0, sizeof(addr));
@@ -425,7 +423,6 @@ static int get_vsocket_params(int fd, unsigned int *lcid, unsigned int *lport,
 		return -1;
 	if (addr.svm_family != AF_VSOCK)
 		return -1;
-	*rport = addr.svm_port;
 	*rcid = addr.svm_cid;
 
 	return 0;
@@ -448,8 +445,7 @@ static int vsock_get_port(int sd, unsigned int *port)
 	return -ENOTSUP;
 }
 
-static int get_vsocket_params(int fd, unsigned int *lcid, unsigned int *lport,
-			      unsigned int *rcid, unsigned int *rport)
+static int get_vsocket_params(int fd, unsigned int *lcid, unsigned int *rcid)
 {
 	return -ENOTSUP;
 }
@@ -503,8 +499,7 @@ static int clock_context_init(struct tracecmd_time_sync *tsync,
 	clock->is_server = clock->is_guest;
 
 	if (get_vsocket_params(tsync->msg_handle->fd, &clock->local_cid,
-			       &clock->local_port, &clock->remote_cid,
-			       &clock->remote_port))
+			       &clock->remote_cid))
 		goto error;
 
 	clock->instance = clock_synch_create_instance(tsync->clock_str,
-- 
2.35.1


  parent reply	other threads:[~2022-04-15  1:00 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-15  0:59 [PATCH 0/8] trace-cmd library: Remove dependency to vsockets Steven Rostedt
2022-04-15  1:00 ` [PATCH 1/8] trace-cmd: Add NO_VSOCK make option to force vsock code off Steven Rostedt
2022-04-15  1:00 ` Steven Rostedt [this message]
2022-04-15  1:00 ` [PATCH 3/8] trace-cmd library: Remove vsocket dependency on P2P protocol Steven Rostedt
2022-04-15  1:00 ` [PATCH 4/8] trace-cmd library: Remove dependency on vsocks for sync identifiers Steven Rostedt
2022-04-15  1:00 ` [PATCH 5/8] trace-cmd library: Have tracecmd_tsync_with_guest() not depend on cid/port Steven Rostedt
2022-04-15  1:00 ` [PATCH 6/8] trace-cmd library: Remove dependency on vsocks from tracecmd_tsync_get_session_params() Steven Rostedt
2022-04-15  1:00 ` [PATCH 7/8] trace-cmd library: Remove vsock dependency from tracecmd_tsync_with_host() Steven Rostedt
2022-04-15  1:00 ` [PATCH 8/8] trace-cmd: Move vsocket code into its own file 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=20220415010007.938408-3-rostedt@goodmis.org \
    --to=rostedt@goodmis.org \
    --cc=linux-trace-devel@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.