Thread (47 messages) flat view 47 messages, 5 authors, 2019-02-21

Re: [RFC PATCH net-next v3 13/21] ethtool: provide timestamping information in GET_INFO request

From: Jakub Kicinski <hidden>
Date: 2019-02-20 18:37:19
Also in: lkml

On Wed, 20 Feb 2019 14:00:07 +0100, Michal Kubecek wrote:
On Tue, Feb 19, 2019 at 07:00:48PM -0800, Jakub Kicinski wrote:
quoted
On Mon, 18 Feb 2019 19:22:29 +0100 (CET), Michal Kubecek wrote:  
quoted
Add timestamping information as provided by ETHTOOL_GET_TS_INFO ioctl
command in GET_INFO reply if ETH_INFO_IM_TSINFO flag is set in the request.

Add constants for counts of HWTSTAMP_TX_* and HWTSTAM_FILTER_* constants
and provide symbolic names for timestamping related values so that they can
be retrieved in GET_STRSET and GET_INFO requests.  
What's the reason for providing the symbolic names?  
One of the the goals I had was to reduce the need to keep the lists of
possible values in sync between kernel and userspace ethtool and other
users of the interface so that when a new value is added, we don't have
to update all userspace tools to be able to use or present it.

This already works in ethtool for some newer commands (e.g. features)
and obviously for those where the list of available options depends on
the device (e.g. private flags or statistics). I would like to extend
the principle also to older commands and new ones which do not work like
this (e.g. device reset).
Let me try to argue that's the wrong direction.  People should learn to
update their user space tooling if they want access to new features.  
In my (limited) experience trying to solve forward compatibility leads
to short term gains, and long term warts in the APIs and increased
maintenance burden in the kernel.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help