diff options
author | Ido Schimmel <idosch@nvidia.com> | 2021-11-24 14:14:06 +0200 |
---|---|---|
committer | Michal Kubecek <mkubecek@suse.cz> | 2021-12-02 21:43:26 +0100 |
commit | c5e7133411601492ec0000dd4301ec9629f390a4 (patch) | |
tree | dc1ad7226e4a9604a31c5e46797fc0b017bf4bff | |
parent | 50fdaec68feb63753137468a28ce992502883f88 (diff) | |
download | ethtool-c5e7133411601492ec0000dd4301ec9629f390a4.tar.gz |
cable-test: Fix premature process termination
Unlike other ethtool operations, cable testing is asynchronous which
allows several cables to be tested simultaneously. This is done by
ethtool instructing the kernel to start the cable testing and listening
to multicast notifications regarding its progress. The ethtool process
terminates after receiving a notification about the completion of the
test.
Currently, ethtool processes all the cable test notifications,
regardless of the reported device. This means that an ethtool process
started for one device can terminate prematurely if completion was
reported for a different device.
Fix by ignoring notifications for devices other than the device for
which the test was started.
Fixes: 55f5e9aa3281 ("Add cable test support")
Fixes: 9561db9b76f4 ("Add cable test TDR support")
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Ido Schimmel <idosch@nvidia.com>
-rw-r--r-- | netlink/cable_test.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/netlink/cable_test.c b/netlink/cable_test.c index 17139f7..9305a47 100644 --- a/netlink/cable_test.c +++ b/netlink/cable_test.c @@ -225,6 +225,7 @@ static int nl_cable_test_process_results(struct cmd_context *ctx) nlctx->is_monitor = true; nlsk->port = 0; nlsk->seq = 0; + nlctx->filter_devname = ctx->devname; ctctx.breakout = false; nlctx->cmd_private = &ctctx; @@ -496,6 +497,7 @@ static int nl_cable_test_tdr_process_results(struct cmd_context *ctx) nlctx->is_monitor = true; nlsk->port = 0; nlsk->seq = 0; + nlctx->filter_devname = ctx->devname; ctctx.breakout = false; nlctx->cmd_private = &ctctx; |