[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20211208152022.GB18344@hoboy.vegasvil.org>
Date: Wed, 8 Dec 2021 07:20:22 -0800
From: Richard Cochran <richardcochran@...il.com>
To: Hangbin Liu <liuhangbin@...il.com>
Cc: netdev@...r.kernel.org, Jay Vosburgh <j.vosburgh@...il.com>,
Veaceslav Falico <vfalico@...il.com>,
Andy Gospodarek <andy@...yhouse.net>,
"David S . Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>,
Heiner Kallweit <hkallweit1@...il.com>
Subject: Re: [PATCH net-next 1/2] net_tstamp: add new flag
HWTSTAMP_FLAGS_UNSTABLE_PHC
> diff --git a/include/uapi/linux/net_tstamp.h b/include/uapi/linux/net_tstamp.h
> index fcc61c73a666..d3aaab8396ef 100644
> --- a/include/uapi/linux/net_tstamp.h
> +++ b/include/uapi/linux/net_tstamp.h
> @@ -62,7 +62,7 @@ struct so_timestamping {
> /**
> * struct hwtstamp_config - %SIOCGHWTSTAMP and %SIOCSHWTSTAMP parameter
> *
> - * @flags: no flags defined right now, must be zero for %SIOCSHWTSTAMP
> + * @flags: one of HWTSTAMP_FLAGS_*
Nit: should be FLAG (singular) not FLAGS.
1 bit set -> 1 flag enabled
> * @tx_type: one of HWTSTAMP_TX_*
> * @rx_filter: one of HWTSTAMP_FILTER_*
> *
> @@ -78,6 +78,19 @@ struct hwtstamp_config {
> int rx_filter;
> };
>
> +/* possible values for hwtstamp_config->flags */
> +enum hwtstamp_flags {
> + /*
> + * With this flag the user should aware that the PHC index
> + * get/set by syscall is not stable. e.g. the phc index of
> + * bond active interface may changed after failover.
> + */
> + HWTSTAMP_FLAGS_UNSTABLE_PHC = (1<<0),
Can we please find a different name? I see this, and I think,
"unstable ptp hw clock". Nobody would want to use such a clock.
How about HWTSTAMP_FLAG_BONDED_PHC_INDEX ?
> + /* add new constants above here */
> + __HWTSTAMP_FLAGS_CNT
> +};
I guess that the original intent of hwtstamp_config.flags was for user
space to SET flags that it wanted. Now this has become a place for
drivers to return values back. Please make the input/output
distinction clear in the comments.
Thanks,
Richard
Powered by blists - more mailing lists