Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp473556ybi; Tue, 16 Jul 2019 23:50:08 -0700 (PDT) X-Google-Smtp-Source: APXvYqxDI/T315Yw6sal+9mtsQi/tj+E5LceFlA4aZPYU6NwIX9LMiMAIwDkMFR9gNpmJtydAWtE X-Received: by 2002:a17:902:8489:: with SMTP id c9mr41640320plo.327.1563346208726; Tue, 16 Jul 2019 23:50:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563346208; cv=none; d=google.com; s=arc-20160816; b=QOzpLe/IWTFoyY0tjMaL7SEBviGwB+ctLyYWA9xNDArfzhjrEsgH17sRFcu5eQbi7C Eum1aB9LtagzpgAFWrqjqTH2FIuY/PofNhl/DaDTTv3ZugI/7SGDfIPXJhLv5eKje9Rl uqfOVz2QcKg5EPkIxXOTDVHp+n+UGKCefPzoomIBsFV10JEq45QDo+/UrOsfy+kNuyji AY+ntggQ7jPH+9GVEF036n7g/ENIuLEQycKVnShyrlzy6G2/Llp32ym63HPFcFTxibzB RST3+ShwsBSBN/f4gJRWaJZdM1SWCJWoTuAWL0DgIW8asOvR1xB0mZkcEKUVeohIUwvz G+TQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from; bh=AvSgqg7Z3Y5VOWyVPMYi7m8rl6m1zJfBnRl3inoGgHU=; b=ZEk4prOYn2Tav5UoU5Ip99V5REKL1JNvxn088+gtGuVjA0yZaP8PViOMExUjFHqU77 gB3Q5+EnJ6PJUxvAklDGAVGZQ4O/uq+MT4JFryIdxBfOtC3QNelbibjAy8zDNA18aLje xLRuA7hiLYq9gY0HG3++DotN0UBVQ35RyeUjYzWRj/U/1meNw0Kknvq0PexVyazOKRjJ fjofTvtKbK5C+v+oDa8RemK0Z8ukj6Jlyp9hLEReQsID/++Ri9UtrhyxsS8XqaKqcXaB /QWd5cwSYw4V2PQcTBIj8FweZu+RlzmMi1mbXmjk051fGX7NfcH8XNtxm/FnKjHOQvlV QBDQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e16si16163361pgt.2.2019.07.16.23.49.52; Tue, 16 Jul 2019 23:50:08 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727416AbfGQGtR (ORCPT + 99 others); Wed, 17 Jul 2019 02:49:17 -0400 Received: from mga12.intel.com ([192.55.52.136]:34318 "EHLO mga12.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725912AbfGQGtR (ORCPT ); Wed, 17 Jul 2019 02:49:17 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 16 Jul 2019 23:49:16 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,273,1559545200"; d="scan'208";a="167877158" Received: from pipin.fi.intel.com (HELO pipin) ([10.237.72.175]) by fmsmga008.fm.intel.com with ESMTP; 16 Jul 2019 23:49:14 -0700 From: Felipe Balbi To: Richard Cochran Cc: netdev@vger.kernel.org, Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H . Peter Anvin" , x86@kernel.org, linux-kernel@vger.kernel.org, "Christopher S . Hall" Subject: Re: [RFC PATCH 4/5] PTP: Add flag for non-periodic output In-Reply-To: <20190716163927.GA2125@localhost> References: <20190716072038.8408-1-felipe.balbi@linux.intel.com> <20190716072038.8408-5-felipe.balbi@linux.intel.com> <20190716163927.GA2125@localhost> Date: Wed, 17 Jul 2019 09:49:13 +0300 Message-ID: <87k1ch2m1i.fsf@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Richard, Richard Cochran writes: > On Tue, Jul 16, 2019 at 10:20:37AM +0300, Felipe Balbi wrote: >> When this new flag is set, we can use single-shot output. >> >> Signed-off-by: Felipe Balbi >> --- >> include/uapi/linux/ptp_clock.h | 4 +++- >> 1 file changed, 3 insertions(+), 1 deletion(-) >> >> diff --git a/include/uapi/linux/ptp_clock.h b/include/uapi/linux/ptp_clock.h >> index 674db7de64f3..439cbdfc3d9b 100644 >> --- a/include/uapi/linux/ptp_clock.h >> +++ b/include/uapi/linux/ptp_clock.h >> @@ -67,7 +67,9 @@ struct ptp_perout_request { >> struct ptp_clock_time start; /* Absolute start time. */ >> struct ptp_clock_time period; /* Desired period, zero means disable. */ >> unsigned int index; /* Which channel to configure. */ >> - unsigned int flags; /* Reserved for future use. */ >> + >> +#define PTP_PEROUT_ONE_SHOT BIT(0) >> + unsigned int flags; /* Bit 0 -> oneshot output. */ >> unsigned int rsv[4]; /* Reserved for future use. */ > > Unfortunately, the code never checked that .flags and .rsv are zero, > and so the de-facto ABI makes extending these fields impossible. That > was my mistake from the beginning. > > In order to actually support extensions, you will first have to > introduce a new ioctl. No worries, I'll work on this after vacations (I'll off for 2 weeks starting next week). I thought about adding a new IOCTL until I saw that rsv field. Oh well :-) -- balbi