Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp3061267pxv; Sun, 4 Jul 2021 06:35:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwVu02E/pi0w/+ixSe4EPNMoR1jgTzDxsPzw32j8l67dc+ALaXB97alRcFi3M4NibJPK9yx X-Received: by 2002:a6b:d108:: with SMTP id l8mr7756041iob.65.1625405753624; Sun, 04 Jul 2021 06:35:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625405753; cv=none; d=google.com; s=arc-20160816; b=X75KnUe7Gpbg54y2AXdsX2RAq+3OiML/UJ870JLrKTveA5MLob4LSuKCDkfmYqXhNr HgbO/gRQ5VtwNMjWGiSoF4rr9g4kpIgTaTtCnXUtg/qgTbhVO8HbBjVn0y26HcB5luZj 8xDey3lC7MK3+gzEJxFS27by5OVbDa6mOvob/aCcBUKraj97eKWeH41uuBtnNRn2XK7G hGYQr5Dy3YVtYJE3DIXTV+3CDR55lNfMPuHVbyoImyZniRyIWfWJ2ws7deV7pk089/to thtUkoFtqGu29MtMTH7aZKRTzugnmMoe4JgGvBGzC5o073SO+w/5MLSr88PtCXL9hvsC IsnA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=kmTHLKYe7uN/HHD833T9elNqKTkZ445a6iSqpPqctYI=; b=XH0piDPcwJdLVmeCfWuPfpa7R6iKXkyksarfX7ADnkQkdP4YPzwN7avZeAYx9ZFKxb 4wKWFuB5ATE7m5xzhYAatLqm3QYNGy6mfN4V8gcqejDrhivcp/xKA1jSv0Uo7SjQPdSq 5CF99QKhJ6TaMZMjpdoXo9pBL4iE/dAPw3d+rnPEwSjm4KfdkuDdJFr2KNNYdP8Yz/nl gGeFyDsTRWfAbNNrTdiFPifyyt9Uo8WtaUV20z5QCuCSj1DIWSwng7I9yc5N6Q3uYVlS pqehQrVaDCHEk+HTx8eBik/GbkEaaUHcasD0dc+VXOhufpgbfDzKz0HMe8FoXVJHAuvb t3Gg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=WmkvO46u; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j25si10196938jaj.93.2021.07.04.06.35.42; Sun, 04 Jul 2021 06:35:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=WmkvO46u; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229547AbhGDNgL (ORCPT + 99 others); Sun, 4 Jul 2021 09:36:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33840 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229499AbhGDNgL (ORCPT ); Sun, 4 Jul 2021 09:36:11 -0400 Received: from mail-pf1-x42f.google.com (mail-pf1-x42f.google.com [IPv6:2607:f8b0:4864:20::42f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 11AEDC061574; Sun, 4 Jul 2021 06:33:36 -0700 (PDT) Received: by mail-pf1-x42f.google.com with SMTP id y2so846535pff.11; Sun, 04 Jul 2021 06:33:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=kmTHLKYe7uN/HHD833T9elNqKTkZ445a6iSqpPqctYI=; b=WmkvO46u0eH3efciHLO00/eGk4YxD9EiZzsUVUhJi+zF8htkowH3u5rWRteWzW4Y4O jLaRbQh4E0O3kR1mumNtQwRngGslHtSFT56Rr/R0ONOJ5rhgle3ELXnK+JA4jO3xjEUV wPLaGLpRCRKr8l5Wjkp4tUAxCyFvIKOovMWjhVVHqNNP8nOg6xrE1/9ZanwGPygtZ5N/ GzCH3wpclWgXN0b5hPSdK0GDumopXYYo52AQCIhHsxJMNTiQrWUBBA3ObMqBfzMyJlDb PRn09Wb2d6UL83vIg/04RuMIkW7R/JjB3nbJUvC2amWsSYKPPyiBQHYIEIDbFi2XRCut rcrA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=kmTHLKYe7uN/HHD833T9elNqKTkZ445a6iSqpPqctYI=; b=Iezc0F36b4gWW+UjKncmf9+Ak6shMdhQ92kfbCqC3qeqwxzPU1p+TARdLRKm1smwfz Qo/3gm3ywm3SXegt0cCDGgIwYKBr5kxiK2tRL6Wa8NgDrC8CdMoLBCnMkSdvGzAU/DQp GdpQAoT/ZPIycZT33YSveLZLIlEcefB6+1+0Ba7F/Fx0Stss7Fssw+fCUORz8R14FLgb t5Tenb5HvXRFkxtzX4oH/aLTxmPlc+1GRWV/A49/habApvKs8kixjIYijbJDRDnjnOA7 PVlyoPTc6vTr7DkwLgLWlSRcSw58eIsnH5BOraI1CpAjY3Fwb06h24I0mCNqZSqrgx8J 5A/g== X-Gm-Message-State: AOAM530yO6SaW46Mj0Dk0Gbh13LGSJkDwPMmE2X88rhxXI0BAU0JIQBA Ol2FO5jU7kjwQ46tsx2lEh0kgp3YqrI= X-Received: by 2002:a63:5912:: with SMTP id n18mr10513858pgb.108.1625405615365; Sun, 04 Jul 2021 06:33:35 -0700 (PDT) Received: from hoboy.vegasvil.org ([2601:645:c000:35:e2d5:5eff:fea5:802f]) by smtp.gmail.com with ESMTPSA id e1sm9572761pfd.16.2021.07.04.06.33.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 04 Jul 2021 06:33:34 -0700 (PDT) Date: Sun, 4 Jul 2021 06:33:31 -0700 From: Richard Cochran To: Yangbo Lu Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, mptcp@lists.linux.dev, "David S . Miller" , Jakub Kicinski , Mat Martineau , Matthieu Baerts , Shuah Khan , Michal Kubecek , Florian Fainelli , Andrew Lunn , Rui Sousa , Sebastien Laveze Subject: Re: [net-next, v5, 08/11] net: sock: extend SO_TIMESTAMPING for PHC binding Message-ID: <20210704133331.GA4268@hoboy.vegasvil.org> References: <20210630081202.4423-1-yangbo.lu@nxp.com> <20210630081202.4423-9-yangbo.lu@nxp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210630081202.4423-9-yangbo.lu@nxp.com> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jun 30, 2021 at 04:11:59PM +0800, Yangbo Lu wrote: > Since PTP virtual clock support is added, there can be > several PTP virtual clocks based on one PTP physical > clock for timestamping. > > This patch is to extend SO_TIMESTAMPING API to support > PHC (PTP Hardware Clock) binding by adding a new flag > SOF_TIMESTAMPING_BIND_PHC. When PTP virtual clocks are > in use, user space can configure to bind one for > timestamping, but PTP physical clock is not supported > and not needed to bind. Would it not be better to simply bind automatically? Like this pseudo code: if (hw_timestamping_requested() && interface_is_vclock()) { bind_vclock(); } It would be great to avoid forcing user space to use a new option. Especially because NOT setting the option makes no sense. Or maybe there is a use case for omitting the option? Thoughts? Thanks, Richard