Received: by 2002:ab2:6203:0:b0:1f5:f2ab:c469 with SMTP id o3csp2241309lqt; Mon, 22 Apr 2024 05:51:12 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVDlyKf+hbE/jEMcECcifklHfhhvTaWfPNUp/EqdfjNKqTPdZAeH+2FuAQKXTdmdZSl7aLgrDbJ0m4LWP/6YJmLnG1ZMeRwdDJgD1Q0Nw== X-Google-Smtp-Source: AGHT+IG76hTLoLSB8oHPhbqU41EcJ0k/bRyHhY3+3ujZvZqka1icUq4tmOmlGDantflHLywXOD+w X-Received: by 2002:a17:902:e944:b0:1e4:ad9b:f770 with SMTP id b4-20020a170902e94400b001e4ad9bf770mr12752291pll.23.1713790272582; Mon, 22 Apr 2024 05:51:12 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713790272; cv=pass; d=google.com; s=arc-20160816; b=F8opaSLAk1cXPuFz8McRKV1KyT5jgVje1tO9xJ7DsA6i4iLjHmw/OeNKyRSJ4kqnJF n/X/FxdEFoAy085QsrP5cZE+9v8ajRc1jB23uyTx9PAsWaLCn9x4WAJFchmlI+tqkUSj 1YJZ+CRkJlwcS7eV5BjNpuYB861Jtv+JKwKxcCfTkiHEuZN45m3sXNQ7L/ccoCorWmuM tGVGeyHV3grNS3lFeyEYWSdc/iDPS53TTqopNTOy9uxGQiNkEKR4VhxsETnEn3+ucjSg tyVC6lN3jrVnJdGkbbqd7L3FH+5jztPpEgMz6guwgoPdCdRA4MdPYPBGs0RluX5ZZsS7 mVQw== 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=OvSPqbTravq+uXV8NX6wI95ClFv5FR4JYxaALnEYaFI=; fh=vtlcgQ30nO0QjQR7y1Wfn7g9c11A+T6SWcSZ6WixcJI=; b=QoD/9elFpp7za6LrC0HaJjX1y0B+T0Kqxk/cjy18iqsqKvG81Q1QG2Kqba1MdRs4yv TML0+Xvo45xYoI34I82SpQBQv5zOOFSn9/+iKNVKUTQOFxZ3GHvxvATjN5xCkMOTprxb KiTVUHsFh66r9MVVBygHrJAlAAtTv7CuBcKEE2+xBWk7UeGQ8YI6MylOCAcgEBnpdwh2 x0JI2cbjgeThheQ+cMyrCjsoUu2DTsM+/pv/1ROj9cv8znH0D68gmA+pb35tWDHDgSvB 7MduJqkyZHxZUkH35dbiwhrV0A/1l76hsa9lXmkEcV249tZtdZQ9Xu4kIDPAsOlEfB2x VFjw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=EkSoMcXX; 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-153375-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-153375-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id d7-20020a170902854700b001e84273b12esi7626043plo.398.2024.04.22.05.51.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Apr 2024 05:51:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-153375-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=EkSoMcXX; 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-153375-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-153375-linux.lists.archive=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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 33B822820D6 for ; Mon, 22 Apr 2024 12:51:12 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id CB37214F13E; Mon, 22 Apr 2024 12:50:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="EkSoMcXX" Received: from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net [217.70.183.196]) (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 DFB3E14A0A0; Mon, 22 Apr 2024 12:50:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.196 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713790245; cv=none; b=jqHbh76cC/yB/AhD9mgybCpnaa1q9kWQmgUfGuopwnlJl7xhMt22kyWDvjSJb39t2DfgyjKg3fFemLEY3LOMDVTpQ+Vl+l0HKRk7wBzcCxSfbyUQatrZduOFDk5cZoZEUtsTRKSaEdqm8ZGtYLIsXy62hKiEjw+SeFM4Nrzv5pk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713790245; c=relaxed/simple; bh=+7AuBfrkVfvvlqBbnWwiB4WC75JvgZX/iPRvTxQaD3g=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=ZrRVUJMKBpaazbUTFiMeH8qDHe2EU3YjPINluUvFqQObCbmRU5x29+wyyroldgE1FhiCj5O6kyfu9MNtEyIqRwMjt4LpYzOHIn9bvQXufv6FA0F1aHeO3C8kzH1SMhw1S6E9tMoLyIsfA+xFpIsxmAeEPK8Gx9w5VHJQ2d91mcs= 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=EkSoMcXX; arc=none smtp.client-ip=217.70.183.196 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 CF84AE0010; Mon, 22 Apr 2024 12:50:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1713790240; 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=OvSPqbTravq+uXV8NX6wI95ClFv5FR4JYxaALnEYaFI=; b=EkSoMcXXV8If3yHSYgNJLHAgv4KZzt0u5nDo4chcF7qbBy2bg9ioBv6ov6t5BJxuHuhmX7 9WNH8SSSrtDZCgWWg6z94fxRO+GQ9MyPDnP8L5nUU7y4T6gJU/lJDlwyvD+9eChpSCvfFp z+rWJF52nCpHAOyezsLa1IaZJ4vSo9wTt2pEOMvulrdkO4pr7RM2xBglvqsBKbdGeEna2f AwPoYsmamnd7oSs0wS0j6BxPcatfhsgDHXOyc4MUB0DR2da/EZCIgIhnia2j7op2hZ1bFv O++nZKrIBDQeR7FtiTKMw+OUjjia8hc3AS/PvnxIkPSHkwc2bOPQrpPwodtIVg== From: Kory Maincent Date: Mon, 22 Apr 2024 14:50:19 +0200 Subject: [PATCH net-next v11 04/13] net: Make net_hwtstamp_validate accessible Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20240422-feature_ptp_netnext-v11-4-f14441f2a1d8@bootlin.com> References: <20240422-feature_ptp_netnext-v11-0-f14441f2a1d8@bootlin.com> In-Reply-To: <20240422-feature_ptp_netnext-v11-0-f14441f2a1d8@bootlin.com> To: Florian Fainelli , Broadcom internal kernel review list , Andrew Lunn , Heiner Kallweit , Russell King , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Richard Cochran , Radu Pirea , Jay Vosburgh , Andy Gospodarek , Nicolas Ferre , Claudiu Beznea , Willem de Bruijn , Jonathan Corbet , Horatiu Vultur , UNGLinuxDriver@microchip.com, Simon Horman , Vladimir Oltean Cc: Thomas Petazzoni , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, Maxime Chevallier , Rahul Rameshbabu , Kory Maincent X-Mailer: b4 0.13.0 X-GND-Sasl: kory.maincent@bootlin.com Make the net_hwtstamp_validate function accessible in prevision to use it from ethtool to validate the hwtstamp configuration before setting it. Reviewed-by: Florian Fainelli Signed-off-by: Kory Maincent --- Change in v8: - New patch Change in v10: - Remove export symbol as ethtool can't be built as a module. - Move the declaration to net/core/dev.h instead of netdevice.h --- net/core/dev.h | 1 + net/core/dev_ioctl.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/net/core/dev.h b/net/core/dev.h index 2236b14b798f..44004f17b32b 100644 --- a/net/core/dev.h +++ b/net/core/dev.h @@ -172,5 +172,6 @@ int dev_set_hwtstamp_phylib(struct net_device *dev, struct netlink_ext_ack *extack); int dev_get_hwtstamp_phylib(struct net_device *dev, struct kernel_hwtstamp_config *cfg); +int net_hwtstamp_validate(const struct kernel_hwtstamp_config *cfg); #endif diff --git a/net/core/dev_ioctl.c b/net/core/dev_ioctl.c index b8cf8c55fa2d..6aaa8326bf8f 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; -- 2.34.1