From mboxrd@z Thu Jan 1 00:00:00 1970 From: Willem de Bruijn Subject: Re: [PATCH v1 net-next 13/14] net/sched: Enforce usage of CLOCK_TAI for sch_etf Date: Thu, 28 Jun 2018 10:26:40 -0400 Message-ID: References: <20180627215950.6719-1-jesus.sanchez-palencia@intel.com> <20180627215950.6719-14-jesus.sanchez-palencia@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Cc: Network Development , Thomas Gleixner , jan.altenberg@linutronix.de, Vinicius Gomes , kurt.kanzenbach@linutronix.de, Henrik Austad , Richard Cochran , Levi Pearson , ilias.apalodimas@linaro.org, ivan.khoronzhuk@linaro.org, Miroslav Lichvar , Willem de Bruijn , Jamal Hadi Salim , Cong Wang , =?UTF-8?B?SmnFmcOtIFDDrXJrbw==?= To: Jesus Sanchez-Palencia Return-path: Received: from mail-io0-f196.google.com ([209.85.223.196]:46364 "EHLO mail-io0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S966385AbeF1O1R (ORCPT ); Thu, 28 Jun 2018 10:27:17 -0400 Received: by mail-io0-f196.google.com with SMTP id u23-v6so5413053ioc.13 for ; Thu, 28 Jun 2018 07:27:17 -0700 (PDT) In-Reply-To: <20180627215950.6719-14-jesus.sanchez-palencia@intel.com> Sender: netdev-owner@vger.kernel.org List-ID: On Wed, Jun 27, 2018 at 8:45 PM Jesus Sanchez-Palencia wrote: > > The qdisc and the SO_TXTIME ABIs allow for a clockid to be configured, > but it's been decided that usage of CLOCK_TAI should be enforced until > we decide to allow for other clockids to be used. The rationale here is > that PTP times are usually in the TAI scale, thus no other clocks should > be necessary. > > For now, the qdisc will return EINVAL if any clocks other than > CLOCK_TAI are used. > > Signed-off-by: Jesus Sanchez-Palencia > --- > net/sched/sch_etf.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/net/sched/sch_etf.c b/net/sched/sch_etf.c > index cd6cb5b69228..5514a8aa3bd5 100644 > --- a/net/sched/sch_etf.c > +++ b/net/sched/sch_etf.c > @@ -56,8 +56,8 @@ static inline int validate_input_params(struct tc_etf_qopt *qopt, > return -ENOTSUPP; > } > > - if (qopt->clockid >= MAX_CLOCKS) { > - NL_SET_ERR_MSG(extack, "Invalid clockid"); > + if (qopt->clockid != CLOCK_TAI) { > + NL_SET_ERR_MSG(extack, "Invalid clockid. CLOCK_TAI must be used"); Similar to the comment in patch 12, this should be squashed (into patch 6) to avoid incorrect behavior in a range of SHA1s.