Message ID | 20240216-feature_ptp_netnext-v8-3-510f42f444fb@bootlin.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-68916-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:c619:b0:108:e6aa:91d0 with SMTP id hn25csp606740dyb; Fri, 16 Feb 2024 07:56:30 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUHLtN0Hb7xtRgPcUhJleg2j9oGgyv8VcSfjueEkrBUwnEby8aGKp/TGJSqlud0vbK4HzQTerbsMvXmExlePqGki2kDdg== X-Google-Smtp-Source: AGHT+IGKqervXH8dX3/K+IkfaZFbH8YIDo4jhjIQsfFLLF6opN8EpRb4C38Wh+2/+6Px8aEiIEyK X-Received: by 2002:a05:6359:4115:b0:17b:2c27:edf8 with SMTP id kh21-20020a056359411500b0017b2c27edf8mr894170rwc.26.1708098989786; Fri, 16 Feb 2024 07:56:29 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708098989; cv=pass; d=google.com; s=arc-20160816; b=BiEZtHSfQF31kL0zC6mI8wo8JnZ162XiSDhg6afmx7u9jimYzUaOqq3d4Qg+g2UdYe axOHb+9n1o8YCAjJM29lKbxer4gwwzdZTlTiAn+6dNt5FCNg6KHw4ukYyHxxYtHKnfbW izlE0MqTxkXHhDU7rnqJYtkezX5n7rSPGi92z5E01bA3VLS2gjF2gtD1n6wHwrsA9NRp X3neJ244u8qPqB38BV6QHk2qK7cob7g5/7ONP4Y2bJS+0owlA7wfJeJfeR/I4hZBcs2d vUf8FXIyr9E7CKMP6nHM8w+6QgMJ/Gk/ux0DHzujijzE9UYnOXm0gaKzLhywsN9/zXlu liIg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :subject:date:from:dkim-signature; bh=Krxf1zoTW2/dTP98mTmQPbAwKT8zJbzlqXrQUciPC6k=; fh=vtlcgQ30nO0QjQR7y1Wfn7g9c11A+T6SWcSZ6WixcJI=; b=oV0238nxxgTbJJTMoLISQXRJx7ZI/CrdV6S9ArIMd76qhKIMofNLi4Dl3dSHvc0Ojk K05F0AOt6bMMPFsvRv3LPEdmD6LvsuMuHVdoI/7vNjGAZlqhU6tobsu9grbKcocVcpea zwwKKcRQnO8qH8tVoxx0Wkb/xIpcBMvTyMbZ96EiV788R9/zRg9+oCy43ZLs000ooqiH edbxxZ2EY0heRsUjzbXP1kR1MvhpIypUTcWSDxc8kblC4ONlXyNZWS6wGycQs+VyORRI 7PEYrAS4tbZWB1a15B5XFdlnXYVoC6wA2JfQMUgWBL4a6AF35jj5kHIfAFhNJUXMmjcp QLCw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b="Jw3//KLN"; arc=pass (i=1 spf=pass spfdomain=bootlin.com dkim=pass dkdomain=bootlin.com dmarc=pass fromdomain=bootlin.com); spf=pass (google.com: domain of linux-kernel+bounces-68916-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-68916-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id k8-20020a05620a07e800b00785db1133fbsi125962qkk.276.2024.02.16.07.56.29 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Feb 2024 07:56:29 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-68916-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b="Jw3//KLN"; arc=pass (i=1 spf=pass spfdomain=bootlin.com dkim=pass dkdomain=bootlin.com dmarc=pass fromdomain=bootlin.com); spf=pass (google.com: domain of linux-kernel+bounces-68916-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-68916-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 8CCEE1C2246A for <ouuuleilei@gmail.com>; Fri, 16 Feb 2024 15:56:29 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2DF721350FB; Fri, 16 Feb 2024 15:53:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="Jw3//KLN" Received: from relay1-d.mail.gandi.net (relay1-d.mail.gandi.net [217.70.183.193]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6D79F12FF8E; Fri, 16 Feb 2024 15:53:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.193 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708098791; cv=none; b=MSkVIZ0abD3OiI60fupxeBaUprcs6l6d7U4lJyHaUA/sNtvAOGrdxYXB/0rGlRfyYBa+xMMWacYh9E1o2hDx+VE9pEZTa1U92kZ7anNgKsn7ESPWykXbAMXFPOavMg21u95Bi/8zO/pF8/H73V3xRClTo2wBWybagx0b8NOjPJ0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708098791; c=relaxed/simple; bh=a3Ez87LivHSYXAG1lQnLDZ1ebs6AXCoTyp9njj4hkr8=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Yy5Jhyg3SJtFihGGYYXtda367MsjxZaIr8PDHpxKTKFmRJ0ojiTePL1xO5JbflBH9lbtDbQIlD9fjRc/109+O8l/C6wIuFNlL6WniCQaZtZggqAdUPXCRX8h7WIa4qFPbHncL6r7IyY+umW5C2DsfTxd17DmiFRRqJ/vD7SKrW0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=Jw3//KLN; arc=none smtp.client-ip=217.70.183.193 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Received: by mail.gandi.net (Postfix) with ESMTPSA id 81D3F240003; Fri, 16 Feb 2024 15:52:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1708098779; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Krxf1zoTW2/dTP98mTmQPbAwKT8zJbzlqXrQUciPC6k=; b=Jw3//KLNzFSYHoOaOmwIhAuBn5uIBYavb8UwBq4IfqyyRu+uXQHNZ2F6fABBHXaD6TUaLc gc/pTa1Ymo3jeubCjhObWEguoqKzeahszPxVH6wi2E5xlBQVGz5iAfOrbY3rqOTg3SnSop tO/9lWfo2GMuJbO1V9AaJIwjzERF33FEmpYfI16E/Ahyjgyk7dheTCEBGtaYlk9Mo2xLjs jLMUSNfs1yqGf2tpnZVi6rQFAEGe7XkDtUWA1w4or4LV7I84jkkCk/gtqT3UEcy+LXBbFY f8uFw+vKL+AUkEsKWlGn3iXcWPAyvio7puod2OPVpZECLXqAcUUItq0qVwRGtg== From: Kory Maincent <kory.maincent@bootlin.com> Date: Fri, 16 Feb 2024 16:52:21 +0100 Subject: [PATCH RFC net-next v8 03/13] net: Make net_hwtstamp_validate accessible Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20240216-feature_ptp_netnext-v8-3-510f42f444fb@bootlin.com> References: <20240216-feature_ptp_netnext-v8-0-510f42f444fb@bootlin.com> In-Reply-To: <20240216-feature_ptp_netnext-v8-0-510f42f444fb@bootlin.com> To: Florian Fainelli <florian.fainelli@broadcom.com>, Broadcom internal kernel review list <bcm-kernel-feedback-list@broadcom.com>, Andrew Lunn <andrew@lunn.ch>, Heiner Kallweit <hkallweit1@gmail.com>, Russell King <linux@armlinux.org.uk>, "David S. Miller" <davem@davemloft.net>, Eric Dumazet <edumazet@google.com>, Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>, Richard Cochran <richardcochran@gmail.com>, Radu Pirea <radu-nicolae.pirea@oss.nxp.com>, Jay Vosburgh <j.vosburgh@gmail.com>, Andy Gospodarek <andy@greyhouse.net>, Nicolas Ferre <nicolas.ferre@microchip.com>, Claudiu Beznea <claudiu.beznea@tuxon.dev>, Willem de Bruijn <willemdebruijn.kernel@gmail.com>, Jonathan Corbet <corbet@lwn.net>, Horatiu Vultur <horatiu.vultur@microchip.com>, UNGLinuxDriver@microchip.com, Simon Horman <horms@kernel.org>, Vladimir Oltean <vladimir.oltean@nxp.com> Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, Maxime Chevallier <maxime.chevallier@bootlin.com>, Rahul Rameshbabu <rrameshbabu@nvidia.com>, Kory Maincent <kory.maincent@bootlin.com> X-Mailer: b4 0.12.4 X-GND-Sasl: kory.maincent@bootlin.com X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791071606374962700 X-GMAIL-MSGID: 1791071606374962700 |
Series |
net: Make timestamping selectable
|
|
Commit Message
Köry Maincent
Feb. 16, 2024, 3:52 p.m. UTC
Make the net_hwtstamp_validate function accessible in prevision to use
it from ethtool to validate the hwtstamp configuration before setting it.
Signed-off-by: Kory Maincent <kory.maincent@bootlin.com>
---
Change in v8:
- New patch
---
include/linux/netdevice.h | 1 +
net/core/dev_ioctl.c | 3 ++-
2 files changed, 3 insertions(+), 1 deletion(-)
Comments
On 2/16/24 07:52, Kory Maincent wrote: > Make the net_hwtstamp_validate function accessible in prevision to use > it from ethtool to validate the hwtstamp configuration before setting it. > > Signed-off-by: Kory Maincent <kory.maincent@bootlin.com> Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index fa92085c29a8..37cccdc333c6 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h @@ -4002,6 +4002,7 @@ int generic_hwtstamp_get_lower(struct net_device *dev, int generic_hwtstamp_set_lower(struct net_device *dev, struct kernel_hwtstamp_config *kernel_cfg, struct netlink_ext_ack *extack); +int net_hwtstamp_validate(const struct kernel_hwtstamp_config *cfg); int dev_set_hwtstamp_phylib(struct net_device *dev, struct kernel_hwtstamp_config *cfg, struct netlink_ext_ack *extack); diff --git a/net/core/dev_ioctl.c b/net/core/dev_ioctl.c index 5d3b169d8f18..847254fd7f13 100644 --- a/net/core/dev_ioctl.c +++ b/net/core/dev_ioctl.c @@ -184,7 +184,7 @@ static int dev_ifsioc_locked(struct net *net, struct ifreq *ifr, unsigned int cm return err; } -static int net_hwtstamp_validate(const struct kernel_hwtstamp_config *cfg) +int net_hwtstamp_validate(const struct kernel_hwtstamp_config *cfg) { enum hwtstamp_tx_types tx_type; enum hwtstamp_rx_filters rx_filter; @@ -238,6 +238,7 @@ static int net_hwtstamp_validate(const struct kernel_hwtstamp_config *cfg) return 0; } +EXPORT_SYMBOL_GPL(net_hwtstamp_validate); static int dev_eth_ioctl(struct net_device *dev, struct ifreq *ifr, unsigned int cmd)