On Wed, Jul 01, 2020 at 03:07:38AM +0200, Andrew Lunn wrote:
> Add support for starting a cable test, and report the results.
> 
> This code does not follow the usual patterns because of the way the
> kernel reports the results of the cable test. It can take a number of
> seconds for cable testing to occur. So the action request messages is
> immediately acknowledges, and the test is then performed asynchronous.
> Once the test has completed, the results are returned as a
> notification.
> 
> This means the command starts as usual. It then monitors multicast
> messages until it receives the results.
> 
> Signed-off-by: Andrew Lunn <and...@lunn.ch>
> ---
[...]
> diff --git a/netlink/monitor.c b/netlink/monitor.c
> index 18d4efd..1af11ee 100644
> --- a/netlink/monitor.c
> +++ b/netlink/monitor.c
> @@ -59,6 +59,10 @@ static struct {
>               .cmd    = ETHTOOL_MSG_EEE_NTF,
>               .cb     = eee_reply_cb,
>       },
> +     {
> +             .cmd    = ETHTOOL_MSG_CABLE_TEST_NTF,
> +             .cb     = cable_test_ntf_cb,
> +     },
>  };
>  

Please add also an entry to monitor_opts[] so that user can use
--cable-test as filter for --monitor.

Looks good otherwise.

Michal

Reply via email to