From: Marc Kleine-Budde <mkl@pengutronix.de>
To: netdev@vger.kernel.org
Cc: kernel@pengutronix.de, Jakub Kicinski <kuba@kernel.org>,
Carlos Llamas <cmllamas@google.com>,
Willem de Bruijn <willemb@google.com>,
Marc Kleine-Budde <mkl@pengutronix.de>
Subject: [PATCH net 1/2] selftests/net: so_txtime: fix parsing of start time stamp on 32 bit systems
Date: Mon, 2 May 2022 11:46:37 +0200 [thread overview]
Message-ID: <20220502094638.1921702-2-mkl@pengutronix.de> (raw)
In-Reply-To: <20220502094638.1921702-1-mkl@pengutronix.de>
This patch fixes the parsing of the cmd line supplied start time on 32
bit systems. A "long" on 32 bit systems is only 32 bit wide and cannot
hold a timestamp in nano second resolution.
Fixes: 040806343bb4 ("selftests/net: so_txtime multi-host support")
Cc: Carlos Llamas <cmllamas@google.com>
Cc: Willem de Bruijn <willemb@google.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
---
tools/testing/selftests/net/so_txtime.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/net/so_txtime.c b/tools/testing/selftests/net/so_txtime.c
index 59067f64b775..103f6bf28e35 100644
--- a/tools/testing/selftests/net/so_txtime.c
+++ b/tools/testing/selftests/net/so_txtime.c
@@ -475,7 +475,7 @@ static void parse_opts(int argc, char **argv)
cfg_rx = true;
break;
case 't':
- cfg_start_time_ns = strtol(optarg, NULL, 0);
+ cfg_start_time_ns = strtoll(optarg, NULL, 0);
break;
case 'm':
cfg_mark = strtol(optarg, NULL, 0);
base-commit: 79396934e289dbc501316c1d1f975bb4c88ae460
--
2.35.1
next prev parent reply other threads:[~2022-05-02 9:46 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-02 9:46 [PATCH net 1/2] selftests/net: so_txtime: fix parsing on 32 bit systems and help text Marc Kleine-Budde
2022-05-02 9:46 ` Marc Kleine-Budde [this message]
2022-05-02 13:50 ` [PATCH net 1/2] selftests/net: so_txtime: fix parsing of start time stamp on 32 bit systems Willem de Bruijn
2022-05-02 13:58 ` Carlos Llamas
2022-05-03 11:30 ` patchwork-bot+netdevbpf
2022-05-02 9:46 ` [PATCH net 2/2] selftests/net: so_txtime: usage(): fix documentation of default clock Marc Kleine-Budde
2022-05-02 13:50 ` Willem de Bruijn
2022-05-02 13:59 ` Carlos Llamas
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=20220502094638.1921702-2-mkl@pengutronix.de \
--to=mkl@pengutronix.de \
--cc=cmllamas@google.com \
--cc=kernel@pengutronix.de \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=willemb@google.com \
/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).