From: Jakub Kicinski <kuba@kernel.org>
To: Muhammad Husaini Zulkifli <muhammad.husaini.zulkifli@intel.com>
Cc: intel-wired-lan@osuosl.org, edumazet@google.com,
netdev@vger.kernel.org, davem@davemloft.net,
noor.azura.ahmad.tarmizi@intel.com
Subject: Re: [Intel-wired-lan] [PATCH v1 1/4] ethtool: Add new hwtstamp flag
Date: Tue, 27 Sep 2022 17:11:32 -0700 [thread overview]
Message-ID: <20220927171132.2b3ca71a@kernel.org> (raw)
In-Reply-To: <20220927130656.32567-2-muhammad.husaini.zulkifli@intel.com>
On Tue, 27 Sep 2022 21:06:53 +0800 Muhammad Husaini Zulkifli wrote:
> --- a/include/uapi/linux/ethtool.h
> +++ b/include/uapi/linux/ethtool.h
> @@ -675,6 +675,7 @@ enum ethtool_link_ext_substate_module {
> * @ETH_SS_MSG_CLASSES: debug message class names
> * @ETH_SS_WOL_MODES: wake-on-lan modes
> * @ETH_SS_SOF_TIMESTAMPING: SOF_TIMESTAMPING_* flags
> + * @ETH_SS_HWTSTAMP_FLAG: timestamping flags
> * @ETH_SS_TS_TX_TYPES: timestamping Tx types
> * @ETH_SS_TS_RX_FILTERS: timestamping Rx filters
> * @ETH_SS_UDP_TUNNEL_TYPES: UDP tunnel types
> @@ -700,6 +701,7 @@ enum ethtool_stringset {
> ETH_SS_MSG_CLASSES,
> ETH_SS_WOL_MODES,
> ETH_SS_SOF_TIMESTAMPING,
> + ETH_SS_HWTSTAMP_FLAG,
> ETH_SS_TS_TX_TYPES,
> ETH_SS_TS_RX_FILTERS,
> ETH_SS_UDP_TUNNEL_TYPES,
> @@ -1367,6 +1369,7 @@ struct ethtool_ts_info {
> __u32 cmd;
> __u32 so_timestamping;
> __s32 phc_index;
> + __u32 flag;
> __u32 tx_types;
> __u32 tx_reserved[3];
> __u32 rx_filters;
> diff --git a/include/uapi/linux/ethtool_netlink.h b/include/uapi/linux/ethtool_netlink.h
> index 408a664fad59..58d073b5a6d2 100644
> --- a/include/uapi/linux/ethtool_netlink.h
> +++ b/include/uapi/linux/ethtool_netlink.h
> @@ -452,6 +452,7 @@ enum {
> ETHTOOL_A_TSINFO_UNSPEC,
> ETHTOOL_A_TSINFO_HEADER, /* nest - _A_HEADER_* */
> ETHTOOL_A_TSINFO_TIMESTAMPING, /* bitset */
> + ETHTOOL_A_TSINFO_FLAG, /* bitset */
> ETHTOOL_A_TSINFO_TX_TYPES, /* bitset */
> ETHTOOL_A_TSINFO_RX_FILTERS, /* bitset */
> ETHTOOL_A_TSINFO_PHC_INDEX, /* u32 */
You can't add stuff into the middle of an enum or a struct in uAPI.
What's worse for the struct ethtool_ts_info you can't actually add
anything in, period. You can reuse reserved fields but even that
requires extra legwork. If the fields were not previously validated on
input to the kernel (ie. kernel didn't check they are zero) the ioctl
path can't use them, because some application may had been passing in
garbage.
_______________________________________________
Intel-wired-lan mailing list
Intel-wired-lan@osuosl.org
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan
next prev parent reply other threads:[~2022-09-28 0:11 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-27 13:06 [Intel-wired-lan] [PATCH v1 0/4] Add support for DMA timestamp for non-PTP packets Muhammad Husaini Zulkifli
2022-09-27 13:06 ` [Intel-wired-lan] [PATCH v1 1/4] ethtool: Add new hwtstamp flag Muhammad Husaini Zulkifli
2022-09-28 0:11 ` Jakub Kicinski [this message]
2022-09-29 3:40 ` Zulkifli, Muhammad Husaini
2022-09-27 13:06 ` [Intel-wired-lan] [PATCH v1 2/4] net-timestamp: Increase the size of tsflags Muhammad Husaini Zulkifli
2022-09-27 13:06 ` [Intel-wired-lan] [PATCH v1 3/4] net: sock: extend SO_TIMESTAMPING for DMA Fetch Muhammad Husaini Zulkifli
2022-09-27 13:06 ` [Intel-wired-lan] [PATCH v1 4/4] igc: Add support for DMA timestamp for non-PTP packets Muhammad Husaini Zulkifli
2022-09-27 15:27 ` [Intel-wired-lan] [PATCH v1 0/4] " Andrew Lunn
2022-09-29 2:22 ` Zulkifli, Muhammad Husaini
2022-09-28 0:09 ` Jakub Kicinski
2022-09-29 2:35 ` Zulkifli, Muhammad Husaini
2022-09-29 13:56 ` Jakub Kicinski
2022-09-29 14:46 ` Gal Pressman
2022-09-29 15:23 ` Jakub Kicinski
2022-09-30 8:52 ` Zulkifli, Muhammad Husaini
2022-09-30 14:40 ` Jakub Kicinski
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=20220927171132.2b3ca71a@kernel.org \
--to=kuba@kernel.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=intel-wired-lan@osuosl.org \
--cc=muhammad.husaini.zulkifli@intel.com \
--cc=netdev@vger.kernel.org \
--cc=noor.azura.ahmad.tarmizi@intel.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