Netdev Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Eric Dumazet <edumazet@google.com>
To: Michal Kubecek <mkubecek@suse.cz>
Cc: "Kevin(Yudong) Yang" <yyd@google.com>,
netdev <netdev@vger.kernel.org>,
Neal Cardwell <ncardwell@google.com>
Subject: Re: [PATCH ethtool,v2] ethtool: add support show/set-time-stamping
Date: Mon, 7 Sep 2020 18:56:20 +0200 [thread overview]
Message-ID: <CANn89iKZ19+AJOf5_5orPrUObYef+L-HrwF_Oay6o75ZbG7UhQ@mail.gmail.com> (raw)
In-Reply-To: <20200907125312.evg6kio5dt3ar6c6@lion.mk-sys.cz>
On Mon, Sep 7, 2020 at 2:53 PM Michal Kubecek <mkubecek@suse.cz> wrote:
>
> On Thu, Sep 03, 2020 at 10:07:14AM -0400, Kevin(Yudong) Yang wrote:
> > Before this patch, ethtool has -T/--show-time-stamping that only
> > shows the device's time stamping capabilities but not the time
> > stamping policy that is used by the device.
> >
> > This patch adds support to set/get device time stamping policy at
> > the driver level by calling ioctl(SIOCSHWTSTAMP).
> >
> > Tested: ran following cmds on a Mellanox NIC with mlx4_en driver:
> > ./ethtool -T eth1
> > ...
> > Hardware Transmit Timestamp Modes:
> > off (HWTSTAMP_TX_OFF)
> > on (HWTSTAMP_TX_ON)
> > Hardware Receive Filter Modes:
> > none (HWTSTAMP_FILTER_NONE)
> > all (HWTSTAMP_FILTER_ALL)
> > Hardware Timestamping Policy:
> > Rx filter 0, none (HWTSTAMP_FILTER_NONE)
> > Tx type 0, off (HWTSTAMP_TX_OFF)
> >
> > ./ethtool --set-time-stamping eth1 rx 1; ./ethtool -T eth1;
> > ...
> > Hardware Timestamping Policy:
> > Rx filter 1, all (HWTSTAMP_FILTER_ALL)
> > Tx type 0, off (HWTSTAMP_TX_OFF)
> >
> > ./ethtool --set-time-stamping eth1 rx 1 tx 1; ./ethtool -T eth1;
> > rx unmodified, ignoring
> > ...
> > Hardware Timestamping Policy:
> > Rx filter 1, all (HWTSTAMP_FILTER_ALL)
> > Tx type 1, on (HWTSTAMP_TX_ON)
> >
> > ./ethtool --set-time-stamping eth1 rx 0; ./ethtool -T eth1;
> > ...
> > Hardware Timestamping Policy:
> > Rx filter 0, none (HWTSTAMP_FILTER_NONE)
> > Tx type 1, on (HWTSTAMP_TX_ON)
> >
> > ./ethtool --set-time-stamping eth1 tx 0; ./ethtool -T eth1
> > ...
> > Hardware Timestamping Policy:
> > Rx filter 0, none (HWTSTAMP_FILTER_NONE)
> > Tx type 0, off (HWTSTAMP_TX_OFF)
> >
> > ./ethtool --set-time-stamping eth1 rx 123 tx 456
> > rx should be in [0..15], tx should be in [0..2]
> >
> > Signed-off-by: Kevin Yang <yyd@google.com>
> > Reviewed-by: Neal Cardwell <ncardwell@google.com>
> > Reviewed-by: Eric Dumazet <edumazet@google.com>
> > ---
>
> As I said in response to v1 patch, I don't like the idea of adding a new
> ioctl interface to ethool when we are working on replacing and
> deprecating the existing ones. Is there a strong reason why this feature
> shouldn't be implemented using netlink?
I do not think this is a fair request.
All known kernels support the ioctl(), none of them support netlink so far.
Are you working on the netlink interface, or are you requesting us to
implement it ?
The ioctl has been added years ago, and Kevin patch is reasonable enough.
Thank you.
next prev parent reply other threads:[~2020-09-07 16:56 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-03 14:07 [PATCH ethtool,v2] ethtool: add support show/set-time-stamping Kevin(Yudong) Yang
2020-09-07 12:53 ` Michal Kubecek
2020-09-07 16:56 ` Eric Dumazet [this message]
2020-09-07 21:25 ` Michal Kubecek
2020-09-08 5:35 ` Eric Dumazet
2020-09-08 10:37 ` Michal Kubecek
2020-09-08 11:17 ` Eric Dumazet
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=CANn89iKZ19+AJOf5_5orPrUObYef+L-HrwF_Oay6o75ZbG7UhQ@mail.gmail.com \
--to=edumazet@google.com \
--cc=mkubecek@suse.cz \
--cc=ncardwell@google.com \
--cc=netdev@vger.kernel.org \
--cc=yyd@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).