From patchwork Mon Feb 26 13:40:04 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?K=C3=B6ry_Maincent?= X-Patchwork-Id: 206635 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:a81b:b0:108:e6aa:91d0 with SMTP id bq27csp2082948dyb; Mon, 26 Feb 2024 05:43:59 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWQD7cQWtiPOk2r2hJLCtDO/0OcbeHT3WIsxQomHF93XimnajExfIbWd/LagGaqAEBWHFni4qJzdXYqFgXBguq15E1Xsg== X-Google-Smtp-Source: AGHT+IFBEb2+fcGlBesk8vxssK9c6kyZhYFxj/A5y3zitVK5vseqRjL49FLXb/gpXuLHjx6lnhG4 X-Received: by 2002:ac8:5914:0:b0:42e:79e7:9110 with SMTP id 20-20020ac85914000000b0042e79e79110mr6541984qty.2.1708955039386; Mon, 26 Feb 2024 05:43:59 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708955039; cv=pass; d=google.com; s=arc-20160816; b=Nb+31zwbx51HS3nQjV1RTasbo+j+LXzDU0mLYZkuUlPi7ZnwKp/J7XqoOOcmZoWOq9 OD6ATYlP4ggYLOE4xfqs1TZdlHGjjdgVznBDIVEenUER+24VrG2y5xIrWdXA7Gxqp5LA 9c+moC5rhk0IKaGUDymBfZUg7Mrl1IXaD6R7nT2yh0exbMnCJAycXsn2pwyVXGbHiJa6 xv6byu/IGxmixicnKhsyF0zJb61V0xfJpo88wYXk/G47IFFbIAbMBVzjd2GgCny1lNtI pOdhkXktjjeEhr0WWzZ7slTmqGHlCno4JRBDkTT4f6ul0tIyr/QOF220H5r4/4bRab67 3Ubw== 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=hrBO2wzt0J4arvEYzmCu+K7sTUcd+qHj9mVz8SibBag=; fh=vtlcgQ30nO0QjQR7y1Wfn7g9c11A+T6SWcSZ6WixcJI=; b=lJAI0Brb+/YQjcypKZ4CV3A4h5w644JVWO6AuwAGKGcWAdl8dwXaJXnqeALEsgJz8x G+HV/o4gRgmk0vMJ9pDj7wzsqTGr2fW1aEkjgMamNUxBMqy6AF1L9OAJQ6UDE0t1yCeB pbI0W1IfxHESdYDpN6NdfB1YmEDqfVQ5Xd1K4nRF/g7OyFB36YQT/wh6ety84XLWOApH r6A+IkDBydr0zlCNAwnjLImYO19qT1jtAkOsxPifdaH0KUBrKNa2J6pZ2wvmGgpmFATw W+sDahPLukvPPl5mHOojyspEOOvFDBTRcNz3f26KfSZdBjOZJGefqffQ3MO5PRZRy8il G0Dw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=JZXjSWLU; 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-81514-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-81514-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. [147.75.199.223]) by mx.google.com with ESMTPS id x22-20020ac84a16000000b0042e87608fb2si1705872qtq.359.2024.02.26.05.43.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Feb 2024 05:43:59 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-81514-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=JZXjSWLU; 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-81514-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-81514-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 329521C29671 for ; Mon, 26 Feb 2024 13:43:59 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9DF5B12E1E4; Mon, 26 Feb 2024 13:40:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="JZXjSWLU" Received: from relay2-d.mail.gandi.net (relay2-d.mail.gandi.net [217.70.183.194]) (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 787BD12CD96; Mon, 26 Feb 2024 13:40:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.194 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708954832; cv=none; b=hqKt+VG59oVeb4zq0zQ8Nfskv/hbihCaWxUrFshYyaxLE58SL6amulGZ67J6JC9egauK0Ga2COJCiDasO3MEj5ym9mdRHa7ZbOZkkebSSMmZpQkjBxVBTuzpHcVh8RIIFoLkypVrWDakhjS+kRE5Nk0aD3pTkAZbS9fCrDb/wLI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708954832; c=relaxed/simple; bh=mxBFK4Fb71lyE8xT3cEVQg0kPCMLh4VSthxx6LrQ+zs=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=etwhFUX6K4YwlEYLiIUDd2rDc/5cAdvIZ/l6h6EnjhdKmENbi98v30JT/t7EKBqvtkZSAIb1wBhFRPxyOx1EhzHn8Xqa0p8Xkgbzs2jtiXHtqM7CfJEx2DQDCx4uXnFt9chXGOPCwN+AmvJxzsVrHAVWse6vX6KoPbgfCb34efY= 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=JZXjSWLU; arc=none smtp.client-ip=217.70.183.194 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 CBD8940013; Mon, 26 Feb 2024 13:40:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1708954829; 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=hrBO2wzt0J4arvEYzmCu+K7sTUcd+qHj9mVz8SibBag=; b=JZXjSWLUrESjvPrFd6EacFInYe+qO37RXCU5SMvm+LcRYIuU5HzGg/Kn4TnEvuACtuF4jR PFlcnvboWwlgl+VOvLKZAoUauutf3cG40+3N3uUfuZBTIHaKhU4FIp3yf8m//RYjcgBiwY xjQHJUFWAPSdg7qydXEiqStxh4cI3NB/4wOZebJeN3vBN4U6BBqLIAhtkypbci+5KVsegF P5M14iCwWo9p6bNPZjE9nD9BEHZWQ3/sXYlJUSprVBEfyBV2VXi6Bf/x5qCDkgQoC9fAIs wBSmYCeKb44VcAtbcHr/oB55AOaCJ3l9ZDrXScvvRf+6H9fsDiOQRAdSHRKkQA== From: Kory Maincent Date: Mon, 26 Feb 2024 14:40:04 +0100 Subject: [PATCH net-next v9 13/13] netlink: specs: tsinfo: Enhance netlink attributes and add a set command Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240226-feature_ptp_netnext-v9-13-455611549f21@bootlin.com> References: <20240226-feature_ptp_netnext-v9-0-455611549f21@bootlin.com> In-Reply-To: <20240226-feature_ptp_netnext-v9-0-455611549f21@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.12.4 X-GND-Sasl: kory.maincent@bootlin.com X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791969239302216912 X-GMAIL-MSGID: 1791969239302216912 Add new attributed to tsinfo allowing to get the tsinfo and the hwtstamp from a phc provider (composed by a phc index and a phc qualifier) on a netdevice's link. Add simultaneously a set command to be able to set hwtstamp configuration for a specified phc provider. Signed-off-by: Kory Maincent --- Changes in v8: - New patch --- Documentation/netlink/specs/ethtool.yaml | 35 +++++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/Documentation/netlink/specs/ethtool.yaml b/Documentation/netlink/specs/ethtool.yaml index 197208f419dc..cfe48f8d6283 100644 --- a/Documentation/netlink/specs/ethtool.yaml +++ b/Documentation/netlink/specs/ethtool.yaml @@ -559,6 +559,15 @@ attribute-sets: - name: tx-lpi-timer type: u32 + - + name: tsinfo-hwtst-provider + attributes: + - + name: index + type: u32 + - + name: qualifier + type: u32 - name: tsinfo attributes: @@ -581,6 +590,13 @@ attribute-sets: - name: phc-index type: u32 + - + name: hwtst-provider + type: nest + nested-attributes: tsinfo-hwtst-provider + - + name: hwtst-flags + type: u32 - name: cable-result attributes: @@ -1373,7 +1389,7 @@ operations: notify: eee-get - name: tsinfo-get - doc: Get tsinfo params. + doc: Get tsinfo params or hwtstamp config. attribute-set: tsinfo @@ -1381,6 +1397,7 @@ operations: request: attributes: - header + - hwtst-provider reply: attributes: - header @@ -1388,6 +1405,8 @@ operations: - tx-types - rx-filters - phc-index + - hwtst-provider + - hwtst-flags dump: *tsinfo-get-op - name: cable-test-act @@ -1693,3 +1712,17 @@ operations: name: mm-ntf doc: Notification for change in MAC Merge configuration. notify: mm-get + - + name: tsinfo-set + doc: Set hwtstamp. + + attribute-set: tsinfo + + do: + request: + attributes: + - header + - tx-types + - rx-filters + - hwtst-provider + - hwtst-flags