All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Ido Schimmel <idosch@idosch.org>
Cc: Michal Kubecek <mkubecek@suse.cz>,
	netdev <netdev@vger.kernel.org>, Chris Healy <cphealy@gmail.com>
Subject: Re: [ethtool v5 2/6] Add cable test TDR support
Date: Tue, 23 Nov 2021 22:17:21 +0100	[thread overview]
Message-ID: <YZ1aYZgQ58e1bfLq@lunn.ch> (raw)
In-Reply-To: <YZvmzIVHP8nReWJC@shredder>

> Andrew, is this missing the following patch?
> 
> diff --git a/netlink/cable_test.c b/netlink/cable_test.c
> index 17139f7d297d..9305a4763c5b 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;
> 
> I don't have hardware with cable test support so wondered if you could
> test it.

Hi Ido

I've tested this. No obvious regressions. My broken cable is still
broken.

> I think that without this patch you would see problems with two
> simultaneous cable tests. The first one to finish will terminate both
> ethtool processes because the code is processing all cable tests
> notifications regardless of the device for which the test was issued.

I did not test such a setup. But you are correct, the message from the
kernel is broadcast, and any waiting process will consume it, even if
it is for a different device.

Reviewed-by: Andrew Lunn <andrew@lunn.ch>

    Andrew

  reply	other threads:[~2021-11-23 21:17 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-05 17:54 [PATCH ethtool v5 0/6] ethtool(1) cable test support Andrew Lunn
2020-07-05 17:54 ` [ethtool v5 1/6] Add " Andrew Lunn
2020-07-05 17:54 ` [ethtool v5 2/6] Add cable test TDR support Andrew Lunn
2021-11-22 18:51   ` Ido Schimmel
2021-11-23 21:17     ` Andrew Lunn [this message]
2020-07-05 17:54 ` [ethtool v5 3/6] json_writer/json_print: Import the iproute2 helper code for JSON output Andrew Lunn
2020-07-05 17:54 ` [ethtool v5 4/6] Add --json command line argument parsing Andrew Lunn
2020-07-05 17:54 ` [ethtool v5 5/6] ethtool.8.in: Document the cable test commands Andrew Lunn
2020-07-05 17:54 ` [ethtool v5 6/6] ethtool.8.in: Add --json option Andrew Lunn
2020-07-05 22:54 ` [PATCH ethtool v5 0/6] ethtool(1) cable test support Michal Kubecek

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=YZ1aYZgQ58e1bfLq@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=cphealy@gmail.com \
    --cc=idosch@idosch.org \
    --cc=mkubecek@suse.cz \
    --cc=netdev@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.