From nobody Sat Feb 7 18:15:58 2026 Received: from BN1PR04CU002.outbound.protection.outlook.com (mail-eastus2azon11010041.outbound.protection.outlook.com [52.101.56.41]) (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 44BA12F6591; Thu, 30 Oct 2025 10:26:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.56.41 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761819973; cv=fail; b=rd1u0GImiTzsDkglWGsYKFxexYSdIHGf5TfwdFQdmgVrN5kyjB/k9wPi7HcwrLoq/7tH97p9wn3CIY7EsGAPA7IKpum/xJyUsLdDawIU9xpHVFcJS61VpLqYRC65SvfYRzuO7CaBUBrHrFWklbJRzYd9JtCLiVxDmuOTOGPWaUs= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761819973; c=relaxed/simple; bh=FZgE7Vko7pNQ20l2qAA2z7pVtqtH12JY3f432wwvZn0=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=P0xXN6O5hdRVAPhGEm2FKubTQTRGVvfFjCXQ8B2cr5SW3orsmMSbg2NJY5zjXEhZm52o+a83zG1olyvc8+FyDhUlJpFqX9E6dxV8Fw4mKJdCxvN2NeQ9arb0P3hPvKmLQUTcsbizIvPOj+ooHz4pNeT6+bLhc4FQdDk4bNBn2Xs= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com; spf=fail smtp.mailfrom=nvidia.com; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b=M7pLV8te; arc=fail smtp.client-ip=52.101.56.41 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=nvidia.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b="M7pLV8te" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=MLP0UI5YWukxo75UeqRsqod5gzZBj27zKHvpv0Wio5vOv+yTFbWchFUBidrNDaXlToBbRYkyifoJaL7qwXWL1anUx18CjXR0Z8mC03BR2UgttlILv+F7NejsfZgIyBNfpsi1nPgexXc6DOMVNi1A+SEBnbFcTJdFkyA8azDWuFKRqlwmOWWIAKJqGzdtduFOE3rbOMjaEukaQtp4W+NkgoKz8jyh/FfULNWdNqCvUORBMNcra/Rto2sciD+sKwhz0hWBYVdcUkYs+GqLsXugnOU5ZK4m17JXc55pKUlIbt3HOwGFyPY64UDwJc7J39T2wqGB7G88wSkvcicqbWxLvg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=yvok0no1W2mfk7GoUo2RxHOvtGPDJMpEvWcGJEhLLKo=; b=E3BThBE56kDMcwhk+aezckZlZtlBnt07A8oKGFU1/dovWp7cZxw+qw6IFOMSgGKppQwCkC0fqCEbpQdENTBoYCHCAmSb9lnjzbx7ZKAaFA7T/Mq1rvYXIfHoNBVPQoG0Os73V6XfpRu76jWRDGcvu8k/9AJYkvvIMgYhBROsye8zIEqRoxcxB+wt57Mvgo28jKiu/ZdEr5PqRsIm/oStYU97DLjeMe+2bvCYEYacTJVLoTS32CDbQo8PEFQnvb781W8stp3oE3IU82JltnS43dvyJAURqofdmNcPUUK45mqxcPswruAmVFFHfjvdJVzKQcIyGrvmNmLMZcXcxOffDg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) smtp.rcpttodomain=google.com smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=yvok0no1W2mfk7GoUo2RxHOvtGPDJMpEvWcGJEhLLKo=; b=M7pLV8teEB1HuJzD8+ZPMlAfSZbyEPMM8czrxFXeD/R8Abf/l26LFfCVbJNREu+pidOsMoQw6thZBuRykDwP99NLnLGkRjtm17HaoxLFwWf+I4s8hIIaNqqc0EqpaavQR1yWOj5qNVy3F4xalPiyEI3yQBfeQSZUSgouOgOLRn7ghzIER+CzUC/St9koYSvaGpmGS4b55N++6oR3QYwCiWEK+5YIynOCOPzCq/nAvrqQcwQZqIvfdjhDGFwA2K0DZqunfaWrpPrwBRKMZtQ9IEvMwMbihC9ugIw4i07o2EYAVmCF5K6qPnrHIP/wt0TM0Del201k9dsP6ueY4aD65A== Received: from BL0PR05CA0014.namprd05.prod.outlook.com (2603:10b6:208:91::24) by DS0PR12MB9348.namprd12.prod.outlook.com (2603:10b6:8:1a0::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9275.13; Thu, 30 Oct 2025 10:26:07 +0000 Received: from BL6PEPF0001AB58.namprd02.prod.outlook.com (2603:10b6:208:91:cafe::1d) by BL0PR05CA0014.outlook.office365.com (2603:10b6:208:91::24) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9298.4 via Frontend Transport; Thu, 30 Oct 2025 10:25:58 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.160) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.160 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.160; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.160) by BL6PEPF0001AB58.mail.protection.outlook.com (10.167.241.10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9275.10 via Frontend Transport; Thu, 30 Oct 2025 10:26:07 +0000 Received: from rnnvmail205.nvidia.com (10.129.68.10) by mail.nvidia.com (10.129.200.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.20; Thu, 30 Oct 2025 03:25:53 -0700 Received: from rnnvmail202.nvidia.com (10.129.68.7) by rnnvmail205.nvidia.com (10.129.68.10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.20; Thu, 30 Oct 2025 03:25:52 -0700 Received: from vdi.nvidia.com (10.127.8.10) by mail.nvidia.com (10.129.68.7) with Microsoft SMTP Server id 15.2.2562.20 via Frontend Transport; Thu, 30 Oct 2025 03:25:47 -0700 From: Tariq Toukan To: Eric Dumazet , Jakub Kicinski , Paolo Abeni , Andrew Lunn , "David S. Miller" CC: Saeed Mahameed , Leon Romanovsky , Jason Gunthorpe , Tariq Toukan , Mark Bloch , Alexei Starovoitov , Daniel Borkmann , Jesper Dangaard Brouer , "John Fastabend" , Richard Cochran , , , , , Gal Pressman , Carolina Jubran , Cosmin Ratiu Subject: [PATCH net-next 1/6] net/mlx5e: Remove redundant tstamp pointer from channel structures Date: Thu, 30 Oct 2025 12:25:05 +0200 Message-ID: <1761819910-1011051-2-git-send-email-tariqt@nvidia.com> X-Mailer: git-send-email 2.8.0 In-Reply-To: <1761819910-1011051-1-git-send-email-tariqt@nvidia.com> References: <1761819910-1011051-1-git-send-email-tariqt@nvidia.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-NV-OnPremToCloud: ExternallySecured X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BL6PEPF0001AB58:EE_|DS0PR12MB9348:EE_ X-MS-Office365-Filtering-Correlation-Id: 3cafba00-56e1-4f70-19db-08de179ebd1a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|36860700013|1800799024|7416014|82310400026|376014; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?Y5JZSjCTlofMloQlcRnJ6wlOf8v38dqX5PVOh/AYYF+3/nBvdBpyeC3j8zJV?= =?us-ascii?Q?TM0hXCJj0MUxyYIFGkbSMByJ3FcHE5k+uHpzYgB+I39QlCwTtZweLVMzTO42?= =?us-ascii?Q?FCpnTpwD4l/dL4ADKMc9JesDefuM25FhYR3MlOBo0fQH11hpSo7Oy/brdWD3?= =?us-ascii?Q?a3Jsm4gM1LyjX7vdqgQitEZumRBRUp00V6mCpsoR9jhP++ApZsI9Sw436p9f?= =?us-ascii?Q?8Dhf3RL3ANb8T2daLkukpqKnTGeMA5ohJ9eF20IpYDfMBR2rCHxPbcpXjFSA?= =?us-ascii?Q?hW+H2q4DeF1YbV9NUp5Goc0gs4AkMc7OKzgEor5xymqaRn9zrwEFArhpSRzq?= =?us-ascii?Q?jypYIJQTSFTxxRHea1qU7NfFjKH5Md+NDUUM2fhEc31XeG9ZZMS3qsG1b5Wl?= =?us-ascii?Q?M4hrN6HYyOBaEXiQ43tWUEnzzI387Fd1heKxSUwx7YH9/U9Dch2Q5bn0HbwE?= =?us-ascii?Q?Abs5mIhCP4GaCWvJ1zld6mYn3Px9vVncPg4/OHk/BZKFf0MZowbxlL/T+lMw?= =?us-ascii?Q?jCB5Ry/ssvqFE8mgBhbx7ptunglYGlJFo076bfw6e+CeYGM+lwibAqUMmzIC?= =?us-ascii?Q?BIAXFUACGn6u8pnPlz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ascii?Q?kkzXFNSs+HZuWjj610XCg/8YSsDrXQAoY+cG0X8FfnKvISbxfZndbY8OPRfU?= =?us-ascii?Q?zzwIezDiBx40Mc1nsrA=3D?= X-Forefront-Antispam-Report: CIP:216.228.117.160;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.nvidia.com;PTR:dc6edge1.nvidia.com;CAT:NONE;SFS:(13230040)(36860700013)(1800799024)(7416014)(82310400026)(376014);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Oct 2025 10:26:07.6200 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 3cafba00-56e1-4f70-19db-08de179ebd1a X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a;Ip=[216.228.117.160];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BL6PEPF0001AB58.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR12MB9348 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Carolina Jubran Remove the tstamp pointer field from mlx5e_channel, mlx5e_ptp, and mlx5e_trap structures, since it was only used to reference the tstamp field in the priv structure. Instead, directly use the tstamp field from priv when initializing RQ structures. Also remove the unused hwtstamp_config field from mlx5_clock structure as part of the cleanup. Signed-off-by: Carolina Jubran Reviewed-by: Cosmin Ratiu Signed-off-by: Tariq Toukan --- drivers/net/ethernet/mellanox/mlx5/core/en.h | 1 - drivers/net/ethernet/mellanox/mlx5/core/en/ptp.c | 1 - drivers/net/ethernet/mellanox/mlx5/core/en/ptp.h | 1 - drivers/net/ethernet/mellanox/mlx5/core/en/trap.c | 1 - drivers/net/ethernet/mellanox/mlx5/core/en/trap.h | 1 - drivers/net/ethernet/mellanox/mlx5/core/en/xsk/setup.c | 2 +- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 3 +-- drivers/net/ethernet/mellanox/mlx5/core/lib/clock.h | 1 - 8 files changed, 2 insertions(+), 9 deletions(-) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en.h b/drivers/net/eth= ernet/mellanox/mlx5/core/en.h index 14e3207b14e7..5485cf014926 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en.h +++ b/drivers/net/ethernet/mellanox/mlx5/core/en.h @@ -784,7 +784,6 @@ struct mlx5e_channel { /* control */ struct mlx5e_priv *priv; struct mlx5_core_dev *mdev; - struct hwtstamp_config *tstamp; DECLARE_BITMAP(state, MLX5E_CHANNEL_NUM_STATES); int ix; int vec_ix; diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en/ptp.c b/drivers/net= /ethernet/mellanox/mlx5/core/en/ptp.c index c93ee969ea64..96a78b6d4904 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en/ptp.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en/ptp.c @@ -896,7 +896,6 @@ int mlx5e_ptp_open(struct mlx5e_priv *priv, struct mlx5= e_params *params, =20 c->priv =3D priv; c->mdev =3D priv->mdev; - c->tstamp =3D &priv->tstamp; c->pdev =3D mlx5_core_dma_dev(priv->mdev); c->netdev =3D priv->netdev; c->mkey_be =3D cpu_to_be32(priv->mdev->mlx5e_res.hw_objs.mkey); diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en/ptp.h b/drivers/net= /ethernet/mellanox/mlx5/core/en/ptp.h index 1b3c9648220b..1c0e0a86a9ac 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en/ptp.h +++ b/drivers/net/ethernet/mellanox/mlx5/core/en/ptp.h @@ -64,7 +64,6 @@ struct mlx5e_ptp { /* control */ struct mlx5e_priv *priv; struct mlx5_core_dev *mdev; - struct hwtstamp_config *tstamp; DECLARE_BITMAP(state, MLX5E_PTP_STATE_NUM_STATES); struct mlx5_sq_bfreg *bfreg; }; diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en/trap.c b/drivers/ne= t/ethernet/mellanox/mlx5/core/en/trap.c index 996fcdb5a29d..db6932b0cedf 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en/trap.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en/trap.c @@ -144,7 +144,6 @@ static struct mlx5e_trap *mlx5e_open_trap(struct mlx5e_= priv *priv) =20 t->priv =3D priv; t->mdev =3D priv->mdev; - t->tstamp =3D &priv->tstamp; t->pdev =3D mlx5_core_dma_dev(priv->mdev); t->netdev =3D priv->netdev; t->mkey_be =3D cpu_to_be32(priv->mdev->mlx5e_res.hw_objs.mkey); diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en/trap.h b/drivers/ne= t/ethernet/mellanox/mlx5/core/en/trap.h index aa3f17658c6d..394e917ea2b0 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en/trap.h +++ b/drivers/net/ethernet/mellanox/mlx5/core/en/trap.h @@ -22,7 +22,6 @@ struct mlx5e_trap { /* control */ struct mlx5e_priv *priv; struct mlx5_core_dev *mdev; - struct hwtstamp_config *tstamp; DECLARE_BITMAP(state, MLX5E_CHANNEL_NUM_STATES); =20 struct mlx5e_params params; diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en/xsk/setup.c b/drive= rs/net/ethernet/mellanox/mlx5/core/en/xsk/setup.c index dbd88eb5c082..dc5a4afa4974 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en/xsk/setup.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en/xsk/setup.c @@ -71,7 +71,7 @@ static int mlx5e_init_xsk_rq(struct mlx5e_channel *c, rq->pdev =3D c->pdev; rq->netdev =3D c->netdev; rq->priv =3D c->priv; - rq->tstamp =3D c->tstamp; + rq->tstamp =3D &c->priv->tstamp; rq->clock =3D mdev->clock; rq->icosq =3D &c->icosq; rq->ix =3D c->ix; diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c b/drivers/ne= t/ethernet/mellanox/mlx5/core/en_main.c index 9c46511e7b43..20f55542433d 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c @@ -735,7 +735,7 @@ static int mlx5e_init_rxq_rq(struct mlx5e_channel *c, s= truct mlx5e_params *param rq->pdev =3D c->pdev; rq->netdev =3D c->netdev; rq->priv =3D c->priv; - rq->tstamp =3D c->tstamp; + rq->tstamp =3D &c->priv->tstamp; rq->clock =3D mdev->clock; rq->icosq =3D &c->icosq; rq->ix =3D c->ix; @@ -2803,7 +2803,6 @@ static int mlx5e_open_channel(struct mlx5e_priv *priv= , int ix, =20 c->priv =3D priv; c->mdev =3D mdev; - c->tstamp =3D &priv->tstamp; c->ix =3D ix; c->vec_ix =3D vec_ix; c->sd_ix =3D mlx5_sd_ch_ix_get_dev_ix(mdev, ix); diff --git a/drivers/net/ethernet/mellanox/mlx5/core/lib/clock.h b/drivers/= net/ethernet/mellanox/mlx5/core/lib/clock.h index c18a652c0faa..aff3aed62c74 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/lib/clock.h +++ b/drivers/net/ethernet/mellanox/mlx5/core/lib/clock.h @@ -54,7 +54,6 @@ struct mlx5_timer { =20 struct mlx5_clock { seqlock_t lock; - struct hwtstamp_config hwtstamp_config; struct ptp_clock *ptp; struct ptp_clock_info ptp_info; struct mlx5_pps pps_info; --=20 2.31.1 From nobody Sat Feb 7 18:15:58 2026 Received: from CH1PR05CU001.outbound.protection.outlook.com (mail-northcentralusazon11010029.outbound.protection.outlook.com [52.101.193.29]) (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 8F13C351FD6; Thu, 30 Oct 2025 10:26:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.193.29 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761819977; cv=fail; b=ROqCxJQKytjjOSiLo9yrHN2sFfuhqWsacSJe98stytuyCnTdPIAhOX5Dh3uGkzxaeYEm0HtV3h9ABL9qRcrmSM6w/nQDlnlH+YdC3VPHreCBfmSppf9prJik7BlgJsz+uvWPzzlQ11AJyFXKKtfeGuNc4Y06CEKij0ezk07Dqt0= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761819977; c=relaxed/simple; bh=LFTVevuolyl90YP3SK6lO5CAN8Ss8stifZTpDeHl4Us=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=dQ8SEP1flagJkOvF03SYUAg6EU8c81iH57qvqNC+em4J7qSBQ5maCJB7Hv3pIJpLKsWxXKsyjIMeZDkkCadqwGDnZGcx1M6j6keFE1sD5tkIR42pPfY3Tb+bzmKTXRY0jo6kssbXgNZnsBEzOqbQjDijhabXJ6QAza8JfSj6Hoo= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com; spf=fail smtp.mailfrom=nvidia.com; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b=LCFpcGvO; arc=fail smtp.client-ip=52.101.193.29 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=nvidia.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b="LCFpcGvO" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=i3RXgFhq0vvXAZtQc966amIFB+cEq9HsIXmEvSfP5F2ovtiQOAptfiSjlsTukHM8izcIcw1KM1iwl0DPLdXXfiZXsRpswoF20+Rwi/hiBjg8fFGv/4TwftRNoN9/uctEzQciNRPteKfpSUhA+wDSit6tOVCCczG21R34yWdZ7vLCWpVdu8SknoTgvz0ZqOhNY7aHn5NCyIhmC/9BebkoCvz7HbFmO/ql6N7+Qtp77JfMIxBMRw2AWHJhFJOS406Fxrl7cJu7vb+ixjDEioTPKcP1OhvH3nE1xgJx2PC7wXpqU0oKDcimjUL3dKcfRvrQ2YS3W08v99/Xa7/we1ryMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=CkrzRjeei7bowf/yfIoGYKcpYLUsd9ldwE5zKNJC0XU=; b=eOcjuUtG1/8S8jJ71+TZ7PifNlGs0r5Agmt2ISYru3zxRMf0T6700hi8DnWYDCJPx777uo3xyVvbA04V0cTJoBU26gi7fOjraHULUHG4j85sK5hDmU+Qyw1K52h+z1KoQeFpIEC1RNGDOYfywYnuwTZvCmMj1G/MWd10/rfJyK2UrIXTLfSLg92tcchM9XNreSUyhI3sb0KOvmOx+cnCQxc61TeDkaH2z67Njtjzf0bc949YIzyAQBxR4kPkDFzq1a5Xs7vYQskSXkl/Cgm7c27rwNBckWfLIGX2tNW7PXf5wPzvTxMEcJF0pDs2Z7QBupky02rK9fZ62f7ZiyOzuw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) smtp.rcpttodomain=google.com smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=CkrzRjeei7bowf/yfIoGYKcpYLUsd9ldwE5zKNJC0XU=; b=LCFpcGvOicyxPl+G5DdTrMa6359u/B5FrHjCbfdQL3vtUCwdd3eu/E46DL6q3HKg/XD/tiC7aQHxELAneNxARzrbS/UgEwdULH00MRHMGaGwWVvSJMBmnlT2i1RSGAHJb3RuAUlZrnvbhybhZGwS3VhrYaDR5YTpoxqUStsVEdFauHZWZBtS6DHeVVvTNwW2oqkFTuDRZwEUHXM6EkHBMHTQpuIkj1vLeZLPvh3jD9iFHxH4vfhapVU8v66N6iwpc+AgUSK6CaSbGLwAuOKW4JrGQqgEwSJlVRggHrgQdWxPenTIZ0qV8s3vmLC8GQTfcmWGNcRl5FIukM3oQrI/9Q== Received: from BL0PR05CA0015.namprd05.prod.outlook.com (2603:10b6:208:91::25) by DS7PR12MB6213.namprd12.prod.outlook.com (2603:10b6:8:97::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9275.14; Thu, 30 Oct 2025 10:26:11 +0000 Received: from BL6PEPF0001AB59.namprd02.prod.outlook.com (2603:10b6:208:91:cafe::e6) by BL0PR05CA0015.outlook.office365.com (2603:10b6:208:91::25) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9275.13 via Frontend Transport; Thu, 30 Oct 2025 10:26:11 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.160) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.160 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.160; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.160) by BL6PEPF0001AB59.mail.protection.outlook.com (10.167.241.11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9275.10 via Frontend Transport; Thu, 30 Oct 2025 10:26:11 +0000 Received: from rnnvmail205.nvidia.com (10.129.68.10) by mail.nvidia.com (10.129.200.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.20; Thu, 30 Oct 2025 03:25:59 -0700 Received: from rnnvmail202.nvidia.com (10.129.68.7) by rnnvmail205.nvidia.com (10.129.68.10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.20; Thu, 30 Oct 2025 03:25:58 -0700 Received: from vdi.nvidia.com (10.127.8.10) by mail.nvidia.com (10.129.68.7) with Microsoft SMTP Server id 15.2.2562.20 via Frontend Transport; Thu, 30 Oct 2025 03:25:53 -0700 From: Tariq Toukan To: Eric Dumazet , Jakub Kicinski , Paolo Abeni , Andrew Lunn , "David S. Miller" CC: Saeed Mahameed , Leon Romanovsky , Jason Gunthorpe , Tariq Toukan , Mark Bloch , Alexei Starovoitov , Daniel Borkmann , Jesper Dangaard Brouer , "John Fastabend" , Richard Cochran , , , , , Gal Pressman , Carolina Jubran , Cosmin Ratiu Subject: [PATCH net-next 2/6] net/mlx5e: Remove unnecessary tstamp local variable in mlx5i_complete_rx_cqe Date: Thu, 30 Oct 2025 12:25:06 +0200 Message-ID: <1761819910-1011051-3-git-send-email-tariqt@nvidia.com> X-Mailer: git-send-email 2.8.0 In-Reply-To: <1761819910-1011051-1-git-send-email-tariqt@nvidia.com> References: <1761819910-1011051-1-git-send-email-tariqt@nvidia.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-NV-OnPremToCloud: ExternallySecured X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BL6PEPF0001AB59:EE_|DS7PR12MB6213:EE_ X-MS-Office365-Filtering-Correlation-Id: 693e16e4-a015-4676-a962-08de179ebf5e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|7416014|36860700013|82310400026|376014; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?VjiTcyBls+Bs2BaFwNhu6j9/Uk8DpzEsquBrTIPc12ntBuXkDDUTk4hDOCAN?= =?us-ascii?Q?DvkbYa9WeLV6RIiTfl23keYEqGgPneFPLGhxtqeeEOeCZ97hV2tfD3iS7Wvf?= =?us-ascii?Q?OgU8ZA2NrhyhBe5mb0Hb5HA+/ImIRifoisN3fqx/UixotT7zsrHzFlCj6qhj?= =?us-ascii?Q?GvZZxJUmikiMOQ5c1Hr+j4f3Z/lODJXIBg7j/jWWQtxkcpGQny2RRpA2nGQJ?= =?us-ascii?Q?V5jzh5xjH9uTfUI/LE3OdhCDPG8O3SH8c8FL3O8huG4UIu0QDv/HSXFkE+wE?= =?us-ascii?Q?vCy2vjPXia6FmgTypszZjdqg6ZrByuPsdXfjLaeSpfEA7ZmN9+nlT3pDHbOC?= =?us-ascii?Q?qMB7EHISO0apufF9LdEjUsQ0yWEG1hj9dc/a8iR4XBaB6cWs3SXsAx3p7P5w?= =?us-ascii?Q?pzD/Rw8Ed0Mlel+ywQUvTCgjoTvoG4wbJdlCOKBGYu+C9TqA1utZdGR4CdTP?= =?us-ascii?Q?Y4gHla/OUKwncTRzftKJan++1YslXDz04eqCq3vPlsftKdqkE7gJRU8tUaKD?= =?us-ascii?Q?XoV/PJ2XMpalQouxlzq1Vn/macYEE0AwNHPhAjSiDerY8dtiycqvTt3VjcyN?= =?us-ascii?Q?77TrP7sZV+SzVgyRRe9EiBPoHg7aqtEDB3AaYTRS9zr6T7yfgZAxeo4RH5Xx?= =?us-ascii?Q?/0i89CgGB/8QqRxj6EIfpYUuKDOuoYFjDxIrJKX/xfhIYGqtI5At2ggd68+J?= =?us-ascii?Q?B/KWHcAJNfRxYJ7io7G+WXmEQA/BYMBLu6+SmuYoZhHiVIzLCThSleIcpfIa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:mail.nvidia.com;PTR:dc6edge1.nvidia.com;CAT:NONE;SFS:(13230040)(1800799024)(7416014)(36860700013)(82310400026)(376014);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Oct 2025 10:26:11.4077 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 693e16e4-a015-4676-a962-08de179ebf5e X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a;Ip=[216.228.117.160];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BL6PEPF0001AB59.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS7PR12MB6213 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Carolina Jubran Remove the tstamp local variable in mlx5i_complete_rx_cqe() and directly pass the tstamp field from priv to mlx5e_rx_hw_stamp(). The local variable was only used once and provided no additional value. Signed-off-by: Carolina Jubran Reviewed-by: Cosmin Ratiu Signed-off-by: Tariq Toukan --- drivers/net/ethernet/mellanox/mlx5/core/en_rx.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_rx.c b/drivers/net/= ethernet/mellanox/mlx5/core/en_rx.c index 1c79adc51a04..cc2d90ed5378 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en_rx.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_rx.c @@ -2646,7 +2646,6 @@ static inline void mlx5i_complete_rx_cqe(struct mlx5e= _rq *rq, u32 cqe_bcnt, struct sk_buff *skb) { - struct hwtstamp_config *tstamp; struct mlx5e_rq_stats *stats; struct net_device *netdev; struct mlx5e_priv *priv; @@ -2670,7 +2669,6 @@ static inline void mlx5i_complete_rx_cqe(struct mlx5e= _rq *rq, } =20 priv =3D mlx5i_epriv(netdev); - tstamp =3D &priv->tstamp; stats =3D &priv->channel_stats[rq->ix]->rq; =20 flags_rqpn =3D be32_to_cpu(cqe->flags_rqpn); @@ -2706,7 +2704,7 @@ static inline void mlx5i_complete_rx_cqe(struct mlx5e= _rq *rq, stats->csum_none++; } =20 - if (unlikely(mlx5e_rx_hw_stamp(tstamp))) + if (unlikely(mlx5e_rx_hw_stamp(&priv->tstamp))) skb_hwtstamps(skb)->hwtstamp =3D mlx5e_cqe_ts_to_ns(rq->ptp_cyc2time, rq->clock, get_cqe_ts(cqe)); skb_record_rx_queue(skb, rq->ix); --=20 2.31.1 From nobody Sat Feb 7 18:15:58 2026 Received: from SN4PR2101CU001.outbound.protection.outlook.com (mail-southcentralusazon11012024.outbound.protection.outlook.com [40.93.195.24]) (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 2DE2E3559E5; Thu, 30 Oct 2025 10:26:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.93.195.24 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761819984; cv=fail; b=kwOu8giiH7p0Mddqkuq6ReLld1EHEKY20LTCmO2LGKDltm6iVAmAHbKVPUBbpZsUT0ZBrkXhJhfLPOOACEMVm3kVL8idUfnX+4Syi9hYh3BfMu4VYVeRgXQ+wCPWBcTXYCvBysw9I55AamhYk2vCNbs2JSFx25sDLvQigZbLs3M= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761819984; c=relaxed/simple; bh=QgqbTVB1dN9VI9lWn1pWWF+uFbSB6k/3pIfCj2vNLeE=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=KKKKjyx/fUSgUFIuS6bcBX790F2iDrY0kZQpLMGoMH9HWz4fnEm5+1bZriagYmKr4PJcMlm2+EXxo4HYHbprop8TVR/ca9Dp8CLjuQLijm23hxDoHk+wYdUEDlmyPO6hTo5te1sW4x7eMoaj0jJ9Czc5HYcq1v2bbvba2TESoJE= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com; spf=fail smtp.mailfrom=nvidia.com; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b=skdK5yV+; arc=fail smtp.client-ip=40.93.195.24 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=nvidia.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b="skdK5yV+" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=IC+/8XyztPhToYVRIJ744JxRECA8lInWjsJL0KXoG/we/dnv5KseU7ZGehYSEPEeI+QuUmBgsCz6iBiR0C37EKfUlK6ZtSHyN9v7bA/q/QRYR5nLmnoy6A1k1iIF602DSn15dNAhRkP4nGGVprIIVwETAX60+yXN85lrE70pktQV+f6z1l6Uyomp40CtwpfKb+Z2scIteHxAUhYDPKBmaTOGgAanla5Wbuan92eYNHoC/i68YsyxhRtM2IN68HM235q3DfoTQQ84/KsekTrhgfbm9zWEmg2LYJQozfOUEUN2Mn7O06vqXat5MQt92mw9PLaatKWruE37l6Ds3qfx6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=acPTaCYYGcmIVy4VyHIHr7goSCgIpxsyXGn3BtJ/nlw=; b=WNvqtgQ5AK9JVa2/q7ReHtBAqPt6tXBHrIG/6DY/D3qUSk9P8+l8kOfD46zUjFfGtwSjh//uQDEQ/7iXdAe1vIX6o+sw+Pnjt1kfTGBLvyjqKtxwG5IK3zNteXdQHi6QKKEaglHCxUEFYQIkMUUCM7uHhA9EzOQ7LBCb0F2PwWKCrFtSeD+Pun5Henp7TT83Zubm7dpf0gYdqI/Y/HLb9GvxrNV0+m4BNs4A2q1Z8LwVbS5hOe2k/koEWkRfR5E0szgHHUVafGpCMGcxw7jSQDmKinCwBpOf4xHYrsPE/XjZEezoia0gFpqXEJoXn8kGhVI4m7Uqe8aqxE1GH2nn8Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) smtp.rcpttodomain=google.com smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=acPTaCYYGcmIVy4VyHIHr7goSCgIpxsyXGn3BtJ/nlw=; b=skdK5yV+Jren/lg7JEnnaiZX5fQGzXCKH582RK+X8XxmhDFAXoWYuAqkMdeK65obINKzWX7m9x+ZmmkOB00EsUhVur90SpJ1gJd6pBKPlDQF5BhB79PHw2GXwU3arnyeqFy8WUMD8jujiVjgc8pmKBgun9F3PtHHTcpSBbk7i9oP7VpgmWSzgCFm3OLFsBr3NRm0Pk3kqXs4QL8PNg14KxsNFIklfDcToXBpzsGt7a8EmssmdhMsQMxGw+HJc45MctkIhRP9PIvUPvmqteoM9mZPTAAcspWMtzXZEEiUPx5hwcwH9ims25TLYSyVzIcPm1qqu6mXzGSG+hm1572lGQ== Received: from BL0PR05CA0012.namprd05.prod.outlook.com (2603:10b6:208:91::22) by DM4PR12MB6496.namprd12.prod.outlook.com (2603:10b6:8:bd::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9253.18; Thu, 30 Oct 2025 10:26:19 +0000 Received: from BL6PEPF0001AB58.namprd02.prod.outlook.com (2603:10b6:208:91:cafe::a8) by BL0PR05CA0012.outlook.office365.com (2603:10b6:208:91::22) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9275.13 via Frontend Transport; Thu, 30 Oct 2025 10:26:19 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.160) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.160 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.160; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.160) by BL6PEPF0001AB58.mail.protection.outlook.com (10.167.241.10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9275.10 via Frontend Transport; Thu, 30 Oct 2025 10:26:18 +0000 Received: from rnnvmail204.nvidia.com (10.129.68.6) by mail.nvidia.com (10.129.200.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.20; Thu, 30 Oct 2025 03:26:04 -0700 Received: from rnnvmail202.nvidia.com (10.129.68.7) by rnnvmail204.nvidia.com (10.129.68.6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.20; Thu, 30 Oct 2025 03:26:03 -0700 Received: from vdi.nvidia.com (10.127.8.10) by mail.nvidia.com (10.129.68.7) with Microsoft SMTP Server id 15.2.2562.20 via Frontend Transport; Thu, 30 Oct 2025 03:25:58 -0700 From: Tariq Toukan To: Eric Dumazet , Jakub Kicinski , Paolo Abeni , Andrew Lunn , "David S. Miller" CC: Saeed Mahameed , Leon Romanovsky , Jason Gunthorpe , Tariq Toukan , Mark Bloch , Alexei Starovoitov , Daniel Borkmann , Jesper Dangaard Brouer , "John Fastabend" , Richard Cochran , , , , , Gal Pressman , Carolina Jubran , Cosmin Ratiu Subject: [PATCH net-next 3/6] net/mlx5e: Rename hwstamp functions to hwtstamp Date: Thu, 30 Oct 2025 12:25:07 +0200 Message-ID: <1761819910-1011051-4-git-send-email-tariqt@nvidia.com> X-Mailer: git-send-email 2.8.0 In-Reply-To: <1761819910-1011051-1-git-send-email-tariqt@nvidia.com> References: <1761819910-1011051-1-git-send-email-tariqt@nvidia.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-NV-OnPremToCloud: ExternallySecured X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BL6PEPF0001AB58:EE_|DM4PR12MB6496:EE_ X-MS-Office365-Filtering-Correlation-Id: 586a0c6d-d1ba-4af5-4e80-08de179ec3ca X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|1800799024|82310400026|7416014|36860700013; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?qKyPGV8tjNkw/s0Cepa2RKQM8GM33Lnc75m3B/XapaKXcSLcQo17UdYgqbQd?= =?us-ascii?Q?tUvLSZBHGAFB0335W90+hBqr3agOBWTRrJZnvRVSNvD9AbxZ1CCml592S7NF?= =?us-ascii?Q?XOkq/RFCgxfibbGHgM5TaHLCYwKYOvMbCuRDkL0uY0bLnrjdeVWkULDUmXV2?= =?us-ascii?Q?fjhcBYeeH9ywUhfL4GMyxO+8DZLj7dEYkBXaQJFt9m2kX3Qe4NdhNIlIJjYO?= =?us-ascii?Q?WHO1FmMHWKVZo0gGW4sMgQNg04UAg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?us-ascii?Q?JzBXonTmCimiWYMWGVKO+BInTFM2VVgZnYtHUeqoHA+Ce6mLXbJrZYK5uT13?= =?us-ascii?Q?SyqwUN0elb+OawhoTq8hoeua2cO3WeYrf7Is+YrWR3DLLPHjX4pPSnfK9GJx?= =?us-ascii?Q?Whv6a8NfWgvzhD9gSO7vvdjRpfT1aC4bJrG9SCVFpvyb7Xiy/yMVIMSTm6UF?= =?us-ascii?Q?OsfiXNQS9RjPNEK26g7lJcCAE/WWNVD9RdSfZsE4rIo/xAH2byHdUlKc6BoJ?= =?us-ascii?Q?7M+0L/NDh+jZkujTom8m/UnAQvIfTOEwA/HY8Kay5oE4CqNN1NpDktOjMezm?= =?us-ascii?Q?bC+XBNBdHZW/wqiMJvM69cmYfT+W2t4UKFULu5n5gRqO1tusld7Z6Xv0tXWd?= =?us-ascii?Q?Pwf456lzSskx5+M0J+NmXYTHxat1W3IC2FHuiKS0+0UYpghK+R8AX9aS1Bby?= =?us-ascii?Q?U8mTUmMoSK3Ik4K8U6s=3D?= X-Forefront-Antispam-Report: CIP:216.228.117.160;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.nvidia.com;PTR:dc6edge1.nvidia.com;CAT:NONE;SFS:(13230040)(376014)(1800799024)(82310400026)(7416014)(36860700013);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Oct 2025 10:26:18.8340 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 586a0c6d-d1ba-4af5-4e80-08de179ec3ca X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a;Ip=[216.228.117.160];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BL6PEPF0001AB58.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR12MB6496 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Carolina Jubran Rename mlx5e_hwstamp_set/get() functions to mlx5e_hwtstamp_set/get() to better reflect that these functions handle hardware timestamping, not just hardware stamping. Signed-off-by: Carolina Jubran Reviewed-by: Cosmin Ratiu Signed-off-by: Tariq Toukan --- drivers/net/ethernet/mellanox/mlx5/core/en.h | 4 ++-- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 8 ++++---- drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en.h b/drivers/net/eth= ernet/mellanox/mlx5/core/en.h index 5485cf014926..ebd7493888d7 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en.h +++ b/drivers/net/ethernet/mellanox/mlx5/core/en.h @@ -1026,8 +1026,8 @@ void mlx5e_self_test(struct net_device *ndev, struct = ethtool_test *etest, u64 *buf); void mlx5e_set_rx_mode_work(struct work_struct *work); =20 -int mlx5e_hwstamp_set(struct mlx5e_priv *priv, struct ifreq *ifr); -int mlx5e_hwstamp_get(struct mlx5e_priv *priv, struct ifreq *ifr); +int mlx5e_hwtstamp_set(struct mlx5e_priv *priv, struct ifreq *ifr); +int mlx5e_hwtstamp_get(struct mlx5e_priv *priv, struct ifreq *ifr); int mlx5e_modify_rx_cqe_compression_locked(struct mlx5e_priv *priv, bool v= al, bool rx_filter); =20 int mlx5e_vlan_rx_add_vid(struct net_device *dev, __always_unused __be16 p= roto, diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c b/drivers/ne= t/ethernet/mellanox/mlx5/core/en_main.c index 20f55542433d..2ecbd735584e 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c @@ -4740,7 +4740,7 @@ static int mlx5e_hwstamp_config_ptp_rx(struct mlx5e_p= riv *priv, bool ptp_rx) &new_params.ptp_rx, true); } =20 -int mlx5e_hwstamp_set(struct mlx5e_priv *priv, struct ifreq *ifr) +int mlx5e_hwtstamp_set(struct mlx5e_priv *priv, struct ifreq *ifr) { struct hwtstamp_config config; bool rx_cqe_compress_def; @@ -4818,7 +4818,7 @@ int mlx5e_hwstamp_set(struct mlx5e_priv *priv, struct= ifreq *ifr) return err; } =20 -int mlx5e_hwstamp_get(struct mlx5e_priv *priv, struct ifreq *ifr) +int mlx5e_hwtstamp_get(struct mlx5e_priv *priv, struct ifreq *ifr) { struct hwtstamp_config *cfg =3D &priv->tstamp; =20 @@ -4834,9 +4834,9 @@ static int mlx5e_ioctl(struct net_device *dev, struct= ifreq *ifr, int cmd) =20 switch (cmd) { case SIOCSHWTSTAMP: - return mlx5e_hwstamp_set(priv, ifr); + return mlx5e_hwtstamp_set(priv, ifr); case SIOCGHWTSTAMP: - return mlx5e_hwstamp_get(priv, ifr); + return mlx5e_hwtstamp_get(priv, ifr); default: return -EOPNOTSUPP; } diff --git a/drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c b/driver= s/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c index 79ae3a51a4b3..11d950f58ae3 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c @@ -563,9 +563,9 @@ int mlx5i_ioctl(struct net_device *dev, struct ifreq *i= fr, int cmd) =20 switch (cmd) { case SIOCSHWTSTAMP: - return mlx5e_hwstamp_set(priv, ifr); + return mlx5e_hwtstamp_set(priv, ifr); case SIOCGHWTSTAMP: - return mlx5e_hwstamp_get(priv, ifr); + return mlx5e_hwtstamp_get(priv, ifr); default: return -EOPNOTSUPP; } --=20 2.31.1 From nobody Sat Feb 7 18:15:58 2026 Received: from MW6PR02CU001.outbound.protection.outlook.com (mail-westus2azon11012065.outbound.protection.outlook.com [52.101.48.65]) (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 57785351FA7; Thu, 30 Oct 2025 10:26:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.48.65 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761819991; cv=fail; b=pJ0PTi+PH+sWLCmLV0KARHiLGs9UKMazyqFJzrQAPVnfUXT/6B/v50xlWAKVjRx4L+PRtR3NYell0MpOvrVd62GzsbMRFs/pL3pJ9/gwNiTy7ChZBiHALfpseulraGpcP5hj4V7ffRsQQTIoyT5JcCj8TAdka6PGfKVtKCJyaUE= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761819991; c=relaxed/simple; bh=jkg53qXTb4vkhasC0o8p3gmvGgwSQTRKYTmTVlmGyb8=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=QSmxvWbEkk7PtEadOmyMYmARLAbmpEe7tdwAsbSE633M781roCUhZhWrT+38/PEjSQ9XbPCEJmQyBCJ4cuh2Tz/ayIm7fRhqVvjjSCnbDrRSFzhhCAOk3BnC/sCkTlMs3QwYPc8syfgoLd3hU1AgTOP6tAk7Y7swsczeXp/pan4= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com; spf=fail smtp.mailfrom=nvidia.com; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b=ZIJkYOkB; arc=fail smtp.client-ip=52.101.48.65 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=nvidia.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b="ZIJkYOkB" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=NH28E7mvzUW77oefj0yRJqlkXVAz0L49Ky+cM0RvltbTqwb7gQHqw6l/kGQJyTSDFpGFv/kuau/ay1mC4qSX9AhSfG8TnIev2jUmvSjVHbCxlSHYHrEGm/W+g7+u1NHrlxEHY0RH1Quv4f3qIWPUK7PWBM04yprbA/XOPWKumZWtA6VCKftfScZe48BTyG998lZ54IM2U+S+7oie7pd2dEwtG56IcNInAcyRwF7v6Zt8YLSoQJBfsAspJDPX6oXrllNiEsBbIJ+zV7aP6Dvc1f8IT7Ii13wQqXqSAhkdS84BAhjQP++td+oQzbUxqGUcWxU00kuQbPNeTaC2ksTSGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=byQ+RnWlGUwYqi6w9EvJsRqiKkdX2WCq+tT855Rzfw8=; b=KI+ooE1amXie3QzsQrYNeK3G6iGKIVq7X4hC3xHpZbYk6hyhkx6LwCZ26xLEWfBBdousMFH1qg16D88H1gCIgBl1GpYPvjnk7dE4NRYfk1KBWrqlCIQJaYteaZFWg/4wTUkXoM4JrfP1OFjWemQp1zBGJ5O07WKjYJ8W72AmgVP8KheDBOxR6LmiIcqJB79ru7Uj6tPwDdGOeghCVHlKOmc3s0iF5Rp8Qqe6dHT3AqDTMIGZzDmPatZXA6XSqSTpQQkjMiioTVQQtUGP5rrWkvxmLLRjJj7OKNp6HDTg1aUFRc9RugawmGIVccbCrbTlz8f6YRci/sdR6+nGaUh97g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) smtp.rcpttodomain=google.com smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=byQ+RnWlGUwYqi6w9EvJsRqiKkdX2WCq+tT855Rzfw8=; b=ZIJkYOkB/03ooPEXeN69vg88pUira01kvH87Q4+MCQaf4/xkL7MHCofcmFhg8NROcWnR2b0LEezk2KXDf7VsK6DvnrwPIMw8idubLhUtMl7vZzS7Qj41OAnUjtOJcnZP9Kz6H4bZaxF8nt/kKWANZAdtd1uTfRbNifXuFKZnCuYJ1BAqMBCzK5P+32mTHw5eUWMPS9KUB3WpcO8Ozz1fyFHonoQkj0ktUlaUQvRuM8MXFY/2m1fFa598c+UA5QndZDJBi3MrkZ2rQ7b9ICvhhOJxZuIUL0kT0t3oCjjGJROUDfzxUD+FmZud4+XqVpqi7mmmlz/rgeXrip20RKlTeg== Received: from BYAPR05CA0055.namprd05.prod.outlook.com (2603:10b6:a03:74::32) by MW4PR12MB6778.namprd12.prod.outlook.com (2603:10b6:303:1e8::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9253.18; Thu, 30 Oct 2025 10:26:24 +0000 Received: from MWH0EPF000989EB.namprd02.prod.outlook.com (2603:10b6:a03:74:cafe::58) by BYAPR05CA0055.outlook.office365.com (2603:10b6:a03:74::32) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9298.5 via Frontend Transport; Thu, 30 Oct 2025 10:26:24 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.161) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.161 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.161; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.161) by MWH0EPF000989EB.mail.protection.outlook.com (10.167.241.138) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9275.10 via Frontend Transport; Thu, 30 Oct 2025 10:26:24 +0000 Received: from rnnvmail205.nvidia.com (10.129.68.10) by mail.nvidia.com (10.129.200.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.14; Thu, 30 Oct 2025 03:26:10 -0700 Received: from rnnvmail202.nvidia.com (10.129.68.7) by rnnvmail205.nvidia.com (10.129.68.10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.20; Thu, 30 Oct 2025 03:26:09 -0700 Received: from vdi.nvidia.com (10.127.8.10) by mail.nvidia.com (10.129.68.7) with Microsoft SMTP Server id 15.2.2562.20 via Frontend Transport; Thu, 30 Oct 2025 03:26:04 -0700 From: Tariq Toukan To: Eric Dumazet , Jakub Kicinski , Paolo Abeni , Andrew Lunn , "David S. Miller" CC: Saeed Mahameed , Leon Romanovsky , Jason Gunthorpe , Tariq Toukan , Mark Bloch , Alexei Starovoitov , Daniel Borkmann , Jesper Dangaard Brouer , "John Fastabend" , Richard Cochran , , , , , Gal Pressman , Carolina Jubran , Cosmin Ratiu Subject: [PATCH net-next 4/6] net/mlx5e: Rename timestamp fields to hwtstamp_config Date: Thu, 30 Oct 2025 12:25:08 +0200 Message-ID: <1761819910-1011051-5-git-send-email-tariqt@nvidia.com> X-Mailer: git-send-email 2.8.0 In-Reply-To: <1761819910-1011051-1-git-send-email-tariqt@nvidia.com> References: <1761819910-1011051-1-git-send-email-tariqt@nvidia.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-NV-OnPremToCloud: ExternallySecured X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MWH0EPF000989EB:EE_|MW4PR12MB6778:EE_ X-MS-Office365-Filtering-Correlation-Id: c950b6fb-96cb-43a2-16bb-08de179ec6fc X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|82310400026|7416014|376014|1800799024|36860700013; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?Qw4/cxuTr5Uyi3ut7QweIYnxzeNafT6UuZI3Dg5zEAiN7iDg2aXkeCqN7ZT8?= =?us-ascii?Q?gXPET8yC6h+lJw4L/l3kKTWB9zSfGiGC39rGjf+zIU9lfrSYJv9xY7Z8wMEB?= =?us-ascii?Q?XVjigu7cSbmRkzMtjmHm9eA24DdZGqIRb91ItFF+xOwx+7R3q5o/bzJSoxc2?= =?us-ascii?Q?FufVGxfLao6rkgF6x6maOQQzCes8EEQDbPN9A2H7s8yC7dSKEk6r/HLN1YJo?= =?us-ascii?Q?fqcjU4MSqrG4OIWrPyo83uOSyWfJuEpl43Unr2yTLOAgvpKIrRkmNos4KHL4?= =?us-ascii?Q?iEHXWx5owNB+F965UIS3Z+pUqhw4/j3RCoNg8meL9JraEd8hVUJu6d02uKok?= =?us-ascii?Q?0L3tELnLSAZBxIxb2wuZ8J2RDCoRktH/BYL2cuCcgpMQzFvOsunEJiX73WVm?= =?us-ascii?Q?Ql4J3hsC4K136mIblv0JoMjdhuxXeEO2Wifo/oA5TLNn2F2E0Vg/smKzydw8?= =?us-ascii?Q?eTd+5ZAHg885t3pUUs3D6AHwQ45nU1iZGGHSJBxWIAAXVY2jwdkf1JGghLla?= =?us-ascii?Q?4azavmVVvVhaOPsEML3hXTWfjZ4gROvHErLD8ekhGo+TWg9HAFaEiYCVT6zh?= =?us-ascii?Q?4BRzdDjYE1ReFIsHr9D7g+h4b17IP3XBk9J/1g93v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9oFT+N+9SLQyAnnUp4CLD7/iMtdtiVP5z?= =?us-ascii?Q?HNorGYzulmzyVZfbeY8=3D?= X-Forefront-Antispam-Report: CIP:216.228.117.161;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.nvidia.com;PTR:dc6edge2.nvidia.com;CAT:NONE;SFS:(13230040)(82310400026)(7416014)(376014)(1800799024)(36860700013);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Oct 2025 10:26:24.2916 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c950b6fb-96cb-43a2-16bb-08de179ec6fc X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a;Ip=[216.228.117.161];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: MWH0EPF000989EB.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW4PR12MB6778 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Carolina Jubran Rename hardware timestamp-related fields from 'tstamp' to 'hwtstamp_config' throughout the MLX5 driver. The new name is more descriptive as it clearly indicates these fields contain hardware timestamp configuration. Signed-off-by: Carolina Jubran Reviewed-by: Cosmin Ratiu Signed-off-by: Tariq Toukan --- drivers/net/ethernet/mellanox/mlx5/core/en.h | 4 ++-- drivers/net/ethernet/mellanox/mlx5/core/en/ptp.c | 2 +- .../net/ethernet/mellanox/mlx5/core/en/reporter_rx.c | 3 ++- drivers/net/ethernet/mellanox/mlx5/core/en/trap.c | 2 +- drivers/net/ethernet/mellanox/mlx5/core/en/xdp.c | 2 +- drivers/net/ethernet/mellanox/mlx5/core/en/xsk/setup.c | 2 +- drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c | 2 +- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 10 +++++----- drivers/net/ethernet/mellanox/mlx5/core/en_rx.c | 4 ++-- 9 files changed, 16 insertions(+), 15 deletions(-) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en.h b/drivers/net/eth= ernet/mellanox/mlx5/core/en.h index ebd7493888d7..eb3eef1a496e 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en.h +++ b/drivers/net/ethernet/mellanox/mlx5/core/en.h @@ -696,7 +696,7 @@ struct mlx5e_rq { struct mlx5e_rq_stats *stats; struct mlx5e_cq cq; struct mlx5e_cq_decomp cqd; - struct hwtstamp_config *tstamp; + struct hwtstamp_config *hwtstamp_config; struct mlx5_clock *clock; struct mlx5e_icosq *icosq; struct mlx5e_priv *priv; @@ -917,7 +917,7 @@ struct mlx5e_priv { u8 max_opened_tc; bool tx_ptp_opened; bool rx_ptp_opened; - struct hwtstamp_config tstamp; + struct hwtstamp_config hwtstamp_config; u16 q_counter[MLX5_SD_MAX_GROUP_SZ]; u16 drop_rq_q_counter; struct notifier_block events_nb; diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en/ptp.c b/drivers/net= /ethernet/mellanox/mlx5/core/en/ptp.c index 96a78b6d4904..12e10feb30f0 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en/ptp.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en/ptp.c @@ -713,7 +713,7 @@ static int mlx5e_init_ptp_rq(struct mlx5e_ptp *c, struc= t mlx5e_params *params, rq->netdev =3D priv->netdev; rq->priv =3D priv; rq->clock =3D mdev->clock; - rq->tstamp =3D &priv->tstamp; + rq->hwtstamp_config =3D &priv->hwtstamp_config; rq->mdev =3D mdev; rq->hw_mtu =3D MLX5E_SW2HW_MTU(params, params->sw_mtu); rq->stats =3D &c->priv->ptp_stats.rq; diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en/reporter_rx.c b/dri= vers/net/ethernet/mellanox/mlx5/core/en/reporter_rx.c index b1415992ffa2..0686fbdd5a05 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en/reporter_rx.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en/reporter_rx.c @@ -318,7 +318,8 @@ mlx5e_rx_reporter_diagnose_common_ptp_config(struct mlx= 5e_priv *priv, struct mlx struct devlink_fmsg *fmsg) { mlx5e_health_fmsg_named_obj_nest_start(fmsg, "PTP"); - devlink_fmsg_u32_pair_put(fmsg, "filter_type", priv->tstamp.rx_filter); + devlink_fmsg_u32_pair_put(fmsg, "filter_type", + priv->hwtstamp_config.rx_filter); mlx5e_rx_reporter_diagnose_generic_rq(&ptp_ch->rq, fmsg); mlx5e_health_fmsg_named_obj_nest_end(fmsg); } diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en/trap.c b/drivers/ne= t/ethernet/mellanox/mlx5/core/en/trap.c index db6932b0cedf..da8c44f46edb 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en/trap.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en/trap.c @@ -47,7 +47,7 @@ static void mlx5e_init_trap_rq(struct mlx5e_trap *t, stru= ct mlx5e_params *params rq->netdev =3D priv->netdev; rq->priv =3D priv; rq->clock =3D mdev->clock; - rq->tstamp =3D &priv->tstamp; + rq->hwtstamp_config =3D &priv->hwtstamp_config; rq->mdev =3D mdev; rq->hw_mtu =3D MLX5E_SW2HW_MTU(params, params->sw_mtu); rq->stats =3D &priv->trap_stats.rq; diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en/xdp.c b/drivers/net= /ethernet/mellanox/mlx5/core/en/xdp.c index 5d51600935a6..80f9fc10877a 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en/xdp.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en/xdp.c @@ -179,7 +179,7 @@ static int mlx5e_xdp_rx_timestamp(const struct xdp_md *= ctx, u64 *timestamp) { const struct mlx5e_xdp_buff *_ctx =3D (void *)ctx; =20 - if (unlikely(!mlx5e_rx_hw_stamp(_ctx->rq->tstamp))) + if (unlikely(!mlx5e_rx_hw_stamp(_ctx->rq->hwtstamp_config))) return -ENODATA; =20 *timestamp =3D mlx5e_cqe_ts_to_ns(_ctx->rq->ptp_cyc2time, diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en/xsk/setup.c b/drive= rs/net/ethernet/mellanox/mlx5/core/en/xsk/setup.c index dc5a4afa4974..5981c71cae2d 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en/xsk/setup.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en/xsk/setup.c @@ -71,7 +71,7 @@ static int mlx5e_init_xsk_rq(struct mlx5e_channel *c, rq->pdev =3D c->pdev; rq->netdev =3D c->netdev; rq->priv =3D c->priv; - rq->tstamp =3D &c->priv->tstamp; + rq->hwtstamp_config =3D &c->priv->hwtstamp_config; rq->clock =3D mdev->clock; rq->icosq =3D &c->icosq; rq->ix =3D c->ix; diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c b/drivers= /net/ethernet/mellanox/mlx5/core/en_ethtool.c index 53e5ae252eac..47a3770fb0f7 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c @@ -2273,7 +2273,7 @@ static int set_pflag_rx_cqe_compress(struct net_devic= e *netdev, if (!MLX5_CAP_GEN(mdev, cqe_compression)) return -EOPNOTSUPP; =20 - rx_filter =3D priv->tstamp.rx_filter !=3D HWTSTAMP_FILTER_NONE; + rx_filter =3D priv->hwtstamp_config.rx_filter !=3D HWTSTAMP_FILTER_NONE; err =3D mlx5e_modify_rx_cqe_compression_locked(priv, enable, rx_filter); if (err) return err; diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c b/drivers/ne= t/ethernet/mellanox/mlx5/core/en_main.c index 2ecbd735584e..5b2491e19baa 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c @@ -735,7 +735,7 @@ static int mlx5e_init_rxq_rq(struct mlx5e_channel *c, s= truct mlx5e_params *param rq->pdev =3D c->pdev; rq->netdev =3D c->netdev; rq->priv =3D c->priv; - rq->tstamp =3D &c->priv->tstamp; + rq->hwtstamp_config =3D &c->priv->hwtstamp_config; rq->clock =3D mdev->clock; rq->icosq =3D &c->icosq; rq->ix =3D c->ix; @@ -3444,8 +3444,8 @@ int mlx5e_safe_reopen_channels(struct mlx5e_priv *pri= v) =20 void mlx5e_timestamp_init(struct mlx5e_priv *priv) { - priv->tstamp.tx_type =3D HWTSTAMP_TX_OFF; - priv->tstamp.rx_filter =3D HWTSTAMP_FILTER_NONE; + priv->hwtstamp_config.tx_type =3D HWTSTAMP_TX_OFF; + priv->hwtstamp_config.rx_filter =3D HWTSTAMP_FILTER_NONE; } =20 static void mlx5e_modify_admin_state(struct mlx5_core_dev *mdev, @@ -4805,7 +4805,7 @@ int mlx5e_hwtstamp_set(struct mlx5e_priv *priv, struc= t ifreq *ifr) if (err) goto err_unlock; =20 - memcpy(&priv->tstamp, &config, sizeof(config)); + memcpy(&priv->hwtstamp_config, &config, sizeof(config)); mutex_unlock(&priv->state_lock); =20 /* might need to fix some features */ @@ -4820,7 +4820,7 @@ int mlx5e_hwtstamp_set(struct mlx5e_priv *priv, struc= t ifreq *ifr) =20 int mlx5e_hwtstamp_get(struct mlx5e_priv *priv, struct ifreq *ifr) { - struct hwtstamp_config *cfg =3D &priv->tstamp; + struct hwtstamp_config *cfg =3D &priv->hwtstamp_config; =20 if (!MLX5_CAP_GEN(priv->mdev, device_frequency_khz)) return -EOPNOTSUPP; diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_rx.c b/drivers/net/= ethernet/mellanox/mlx5/core/en_rx.c index cc2d90ed5378..727a561e8ffc 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en_rx.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_rx.c @@ -1598,7 +1598,7 @@ static inline bool mlx5e_build_rx_skb(struct mlx5_cqe= 64 *cqe, stats->lro_bytes +=3D cqe_bcnt; } =20 - if (unlikely(mlx5e_rx_hw_stamp(rq->tstamp))) + if (unlikely(mlx5e_rx_hw_stamp(rq->hwtstamp_config))) skb_hwtstamps(skb)->hwtstamp =3D mlx5e_cqe_ts_to_ns(rq->ptp_cyc2time, rq->clock, get_cqe_ts(cqe)); skb_record_rx_queue(skb, rq->ix); @@ -2704,7 +2704,7 @@ static inline void mlx5i_complete_rx_cqe(struct mlx5e= _rq *rq, stats->csum_none++; } =20 - if (unlikely(mlx5e_rx_hw_stamp(&priv->tstamp))) + if (unlikely(mlx5e_rx_hw_stamp(&priv->hwtstamp_config))) skb_hwtstamps(skb)->hwtstamp =3D mlx5e_cqe_ts_to_ns(rq->ptp_cyc2time, rq->clock, get_cqe_ts(cqe)); skb_record_rx_queue(skb, rq->ix); --=20 2.31.1 From nobody Sat Feb 7 18:15:58 2026 Received: from BL2PR02CU003.outbound.protection.outlook.com (mail-eastusazon11011018.outbound.protection.outlook.com [52.101.52.18]) (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 51925351FC3; Thu, 30 Oct 2025 10:26:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.52.18 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761819994; cv=fail; b=euF8C6vYrLzG9S75bWx7l6XI1hK8pHB4abpL+KoEuK4uD7f1kJbYzyWBa1lqKCc6XAL3R8yRbWbZGaQqSFKVl5v7DQqxIAJ0iFPMz0fCIzmfPSWx3bGYdCRxXu/hKoz+/Tqr6MFEJ5jd6789tYxBiRv2qa2+Xn3mZeILxBFSZYo= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761819994; c=relaxed/simple; bh=trACKxqs31w82cjB3spS7x0Qn8U3zCh0O9sHSxidYTo=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=PVeKSUZfVRszVYteMOBWRAsoKx2o24xqr4mnXBgfUleC8ovDg78VijL9DhkJGmjhsK3XL843WgIeffcWLaDhsYhMZfDVgAxhfTfLC5sWK+X1A1sAbRSqzo1yHTViQg0z7A318VRgXEMS7wGSBOTszT1LBRobRms+XjcsipRqKf0= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com; spf=fail smtp.mailfrom=nvidia.com; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b=kkQY/LCE; arc=fail smtp.client-ip=52.101.52.18 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=nvidia.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b="kkQY/LCE" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=CRhcg8EJhYwwjSuEqIIsX/OiSJ28x39W2ui3C5MDczZzUy6C06rwrnT0gHwKydFZgpnm12pg3JE3szJjnJ8pkiUNyJMH3YkUYktRSSufV1TNSZFSaEem0f7umxjfUFDakamNZQ/lQCMx59ebWCfakm6Zmsoy+9e9AniB0c0yG7XLdhzmtzjwJnkEzx2vE1PaNA9bae80cI2XcGe3PeJmWJw2F4Wyexm6Jy0uP/iB933QGAyKA4wYp5GBf3RdJgJjqee/ZZIBC2bHOQJvZwyvxONGwZGC7MHyGmv8BryY5xxBQNCUFebaueTMrPyuoTBtlzHQD2/lWRtnT0i76BmGsg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=pz96eVpK1zBwecxI1QBcNm1q9fzXJPe4TRMBb2URUqc=; b=g8oYfOYc070LNHUi7tqxobbep1aGqRWjI+Z/XBAUS64AES1VBf702w2c79lxjfHwu/thRQTJ96bzjXW+HrDLRFrTB1K3LMocf86/8SeWGHoLmnnzxy9tvOnX6sxhMNsxQkbhwcbG/2BwOw0Tn9DfWaYTni75jQrKMXSIwo/LkD82shHQ9nH7i4ehTJsZzxlrtxWXlzbE+ZOLz3+BCpRk8+P07fS7GMFbjnD+QFLjJDMFgONN1p/sty0Kt88np6hWWGY62VTfu8B5P/VRTrQEOufNemwItU4WGtOcRttvck14ygfU65CQXIspATNsbcGj4Ru3P/mcCpSxOB0CNgrOew== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) smtp.rcpttodomain=google.com smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=pz96eVpK1zBwecxI1QBcNm1q9fzXJPe4TRMBb2URUqc=; b=kkQY/LCEZQgEliV0fcpiANQoPOmr7q2+VqPJEbM3t5Wg8HPu3wE+qCqlZ8AyIQ2QVjr4otJB2p6Y3lgU9qAwepzvLItEIDtqZYIZPagfI8lgsXZdnC6pUtu4kLYlgWmGunVPsuWAvxVN4M4UlucasIlQw+QQXu2jEITi6jJOPNDE5CABIYlbEpodgkv5pNK4Caygeuc3wsNab1Jq4itsNk62hXboNVkh6555jnAn76i/H99a52SfJ5ZzbcDhLRL3Gj0Zo43WpneV+BCuHK4JZIZsFV2Cw/WzkQxCJZHqH6pqmr03kC7rRDgo5o0xzqgNKWS3SWn4Q5wf8yruNNfnyQ== Received: from BYAPR04CA0015.namprd04.prod.outlook.com (2603:10b6:a03:40::28) by CH3PR12MB9172.namprd12.prod.outlook.com (2603:10b6:610:198::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9275.13; Thu, 30 Oct 2025 10:26:30 +0000 Received: from MWH0EPF000989E5.namprd02.prod.outlook.com (2603:10b6:a03:40:cafe::44) by BYAPR04CA0015.outlook.office365.com (2603:10b6:a03:40::28) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9275.14 via Frontend Transport; Thu, 30 Oct 2025 10:26:31 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.161) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.161 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.161; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.161) by MWH0EPF000989E5.mail.protection.outlook.com (10.167.241.132) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9275.10 via Frontend Transport; Thu, 30 Oct 2025 10:26:29 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.14; Thu, 30 Oct 2025 03:26:15 -0700 Received: from rnnvmail202.nvidia.com (10.129.68.7) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.20; Thu, 30 Oct 2025 03:26:15 -0700 Received: from vdi.nvidia.com (10.127.8.10) by mail.nvidia.com (10.129.68.7) with Microsoft SMTP Server id 15.2.2562.20 via Frontend Transport; Thu, 30 Oct 2025 03:26:10 -0700 From: Tariq Toukan To: Eric Dumazet , Jakub Kicinski , Paolo Abeni , Andrew Lunn , "David S. Miller" CC: Saeed Mahameed , Leon Romanovsky , Jason Gunthorpe , Tariq Toukan , Mark Bloch , Alexei Starovoitov , Daniel Borkmann , Jesper Dangaard Brouer , "John Fastabend" , Richard Cochran , , , , , Gal Pressman , Carolina Jubran , Cosmin Ratiu Subject: [PATCH net-next 5/6] IB/IPoIB: Add support for hwtstamp get/set ndos Date: Thu, 30 Oct 2025 12:25:09 +0200 Message-ID: <1761819910-1011051-6-git-send-email-tariqt@nvidia.com> X-Mailer: git-send-email 2.8.0 In-Reply-To: <1761819910-1011051-1-git-send-email-tariqt@nvidia.com> References: <1761819910-1011051-1-git-send-email-tariqt@nvidia.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-NV-OnPremToCloud: ExternallySecured X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MWH0EPF000989E5:EE_|CH3PR12MB9172:EE_ X-MS-Office365-Filtering-Correlation-Id: 21c8299e-635d-4a96-056f-08de179eca1c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|7416014|82310400026|376014|1800799024|36860700013; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?Nd7VerEJXiVqkKm6HqcK6En7UM2+rHcExjvUvjXIObq1rQXuZlJO9ma9GE6C?= =?us-ascii?Q?YEhFYuQLjQ0XH2HM25A4CNbrdRRh07c1/PQavhpy7iFgxSB1z/01Gqn1+InY?= =?us-ascii?Q?hH2g6l4qQNOrMw0vmd4syPMpfxoq7okNpi3ktVX8dH+Gw73tDmjFtx07xhZF?= =?us-ascii?Q?YFnyDpbTZ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JTaQpmU?= =?us-ascii?Q?mD2LEF+Y5LP9orWAKrNDOynxbbWLI/T+IJDaZ9WOohOHEIp98SCHfwcHge60?= =?us-ascii?Q?l6oYanltrRWBX3MzaFY9X9k94PNDPhXTZnr/Wu6Zu7pPPhEJjAoaEqR53u9u?= =?us-ascii?Q?lIbHPUdBePXdIPpHHbBfQpg8uzOOarVWAVp6Bw0xZANgPlv4PiePLnia1BHS?= =?us-ascii?Q?efM+bRo0drNu3N/+We/m9G5HYzfudk0ZthZrNiglLH2FV1LKNpW+C3KCM6R3?= =?us-ascii?Q?zJ6kEgrqXkdrMNMRcg4gjm6nLlscqIZ7CyV+2PGfHoDhgQuCHpEti8AUQmrR?= =?us-ascii?Q?ojEAelSylWtKllvHVHeK6o8srPXyiZSPptC4jaCMqx8LEHXGHdCglZ88o7Zo?= =?us-ascii?Q?Tmg49jak1xHt/ZzSC9qb4w7g9l6mqApP3yZNTGCBhZD4E5FGTuB2Bk7FItrA?= =?us-ascii?Q?W6IHtmWCaELFHY7dJ3ENzK/TSTHS/YGxAGlonL6L77LqlJuE6NIkbKCefGZd?= =?us-ascii?Q?gOKtKjCjxRuVI97IS1Y=3D?= X-Forefront-Antispam-Report: CIP:216.228.117.161;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.nvidia.com;PTR:dc6edge2.nvidia.com;CAT:NONE;SFS:(13230040)(7416014)(82310400026)(376014)(1800799024)(36860700013);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Oct 2025 10:26:29.5378 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 21c8299e-635d-4a96-056f-08de179eca1c X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a;Ip=[216.228.117.161];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: MWH0EPF000989E5.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH3PR12MB9172 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Carolina Jubran Add support for the ndo_hwtstamp_get and ndo_hwtstamp_set operations in IPoIB. This allows lower devices to handle hardware timestamp configuration through the new ndos instead of the legacy ioctls. Signed-off-by: Carolina Jubran Signed-off-by: Tariq Toukan --- drivers/infiniband/ulp/ipoib/ipoib_main.c | 29 +++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/drivers/infiniband/ulp/ipoib/ipoib_main.c b/drivers/infiniband= /ulp/ipoib/ipoib_main.c index 5b4d76e97437..300afc27c561 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib_main.c +++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c @@ -1825,6 +1825,31 @@ static int ipoib_ioctl(struct net_device *dev, struc= t ifreq *ifr, return priv->rn_ops->ndo_eth_ioctl(dev, ifr, cmd); } =20 +static int ipoib_hwtstamp_get(struct net_device *dev, + struct kernel_hwtstamp_config *config) +{ + struct ipoib_dev_priv *priv =3D ipoib_priv(dev); + + if (!priv->rn_ops->ndo_hwtstamp_get) + /* legacy */ + return dev_eth_ioctl(dev, config->ifr, SIOCGHWTSTAMP); + + return priv->rn_ops->ndo_hwtstamp_get(dev, config); +} + +static int ipoib_hwtstamp_set(struct net_device *dev, + struct kernel_hwtstamp_config *config, + struct netlink_ext_ack *extack) +{ + struct ipoib_dev_priv *priv =3D ipoib_priv(dev); + + if (!priv->rn_ops->ndo_hwtstamp_set) + /* legacy */ + return dev_eth_ioctl(dev, config->ifr, SIOCSHWTSTAMP); + + return priv->rn_ops->ndo_hwtstamp_set(dev, config, extack); +} + static int ipoib_dev_init(struct net_device *dev) { struct ipoib_dev_priv *priv =3D ipoib_priv(dev); @@ -2149,6 +2174,8 @@ static const struct net_device_ops ipoib_netdev_ops_p= f =3D { .ndo_set_mac_address =3D ipoib_set_mac, .ndo_get_stats64 =3D ipoib_get_stats, .ndo_eth_ioctl =3D ipoib_ioctl, + .ndo_hwtstamp_get =3D ipoib_hwtstamp_get, + .ndo_hwtstamp_set =3D ipoib_hwtstamp_set, }; =20 static const struct net_device_ops ipoib_netdev_ops_vf =3D { @@ -2164,6 +2191,8 @@ static const struct net_device_ops ipoib_netdev_ops_v= f =3D { .ndo_get_iflink =3D ipoib_get_iflink, .ndo_get_stats64 =3D ipoib_get_stats, .ndo_eth_ioctl =3D ipoib_ioctl, + .ndo_hwtstamp_get =3D ipoib_hwtstamp_get, + .ndo_hwtstamp_set =3D ipoib_hwtstamp_set, }; =20 static const struct net_device_ops ipoib_netdev_default_pf =3D { --=20 2.31.1 From nobody Sat Feb 7 18:15:58 2026 Received: from CY7PR03CU001.outbound.protection.outlook.com (mail-westcentralusazon11010031.outbound.protection.outlook.com [40.93.198.31]) (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 DDE5734F491; Thu, 30 Oct 2025 10:26:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.93.198.31 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761820008; cv=fail; b=kt9vAThcyBOr5onJ+0Sld7Qja772mY0TiCLrb6ww6VDzo1jvrSxk5Cfv+U6vAf/PAo8iXmAQUc2aiwHDB6z2+Fux3wU0WXU9iXYLNC3XPxY5bFXUxV99U3VcplcXNZUm9/SDG81+96KDOhffbUNJIBrTgbRFwY+MlxDCUdYw1Zw= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761820008; c=relaxed/simple; bh=/wIpdTVUlj2XqjEJvohDQ093NP3PWg9aP1UY6mdqkK8=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=BNvFe3bCiZ+kMGEaBQmKwDZbxvigFzmvq3ja4c3gYB58Ix8F0HrkhshcaOSRDDB9yvdfvKBZrYp0M10p/Eg8kBWk7ZLBnNc4vaG2UfOEqEzUp7d6QGvyk9k0x42dYnTFS0KB4TmF3s97ANQ2sTig/zqJ+L2QoM1yLIi+mSL5dp4= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com; spf=fail smtp.mailfrom=nvidia.com; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b=cl/8a77c; arc=fail smtp.client-ip=40.93.198.31 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=nvidia.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b="cl/8a77c" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=U554lwHnzCm+yNXGAQcMP/uaiRLTA9fRf/wLu0V2yHy1/dnNkWlukgPtiK+LPD/UZoPZIyP9fRO1xQiEpORIbUpjKJtwmJ0vTiOZKQ/BwpFklf3pssWcpMrhuAczN3jWZ8QhBiBIlaPf3SJGaqhPsjkWXUQqsYE+iqtZ/jSlIchGc6HUTHS7t8/MrxYV1/frzem8bgETVftNa/rjN4HehqqABo2R4b97iId3Ie0eaX7qfCb8Uws5fi8CKu8J8uH2Wanyc/OyAydghxUSQBVr2d1STAUSbqE71x2N6/k3L+CQcqSkZ55rWMUyObHg45I0uyMzHJmil7T97OqC9pHPoA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=wlJZ6EkDjRoQ9WLTa3dfaNZU5XUF0He6qVwKCN5W7OQ=; b=zOxXhoCGnmtPL3suB/WuZw3M+jrsKTO/qz5uxDr98qpiRXeVyTkUFGwcK+Torzg8tDAkJaE+2wvUwEBUFcmX+pbETURsslF03VNGdjOVTESlNlRuYUndB2xTf5wWpqSDJHjlqqkWndK8rvs8WLrQauOONYtrxWiVZBBOfqKxLLZCp6Kae1t71fX3j2ArixlkXRCdE5hZP0G5Nr3JSpYVlRZG7tS3fKInSIgLzOWn5qtcxSB2gVPZ2q96CnZgeJAI3rv5B1xv7UN9XBK1kt3LwSM4fHcMHo3xFMItcWF+JHj44fADJTVE/lMkCn2lT1W6CEacB0cSDICJHo5qMRVS3w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) smtp.rcpttodomain=google.com smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=wlJZ6EkDjRoQ9WLTa3dfaNZU5XUF0He6qVwKCN5W7OQ=; b=cl/8a77cl5JgN2XxFh6Kse6/z1ERdUPe1hdwQg9HbkG9i5Rc0DYmzKnN6YNA4Hxb15VexoB8vx+1UgtH7kCTdiB3BPZ8/PIf0tLiqwKP+7Up1YX8kS5DVc0Pt4FTSWMT8S7H3TWHOn1gCwCSjHu+or1wumtATggHiP0G+W9R1xYzVAQfWXJqaGrL/j380e7THk0RrYLcyEwAjGABqXIIwHY6hk45Ek7KpH5wQ8QAoFZQk4lNsfIRuL6l8MsYAy9jITaOhfNN/QSvMqw9Sx5PGxHRd8yQ/gJCyKORVB7vPtELttejT49k7PVGovrBXWJuqrEEQf5xzcaRrYD56JFydA== Received: from BLAPR03CA0016.namprd03.prod.outlook.com (2603:10b6:208:32b::21) by CY8PR12MB8214.namprd12.prod.outlook.com (2603:10b6:930:76::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9275.14; Thu, 30 Oct 2025 10:26:41 +0000 Received: from BL6PEPF0001AB52.namprd02.prod.outlook.com (2603:10b6:208:32b:cafe::eb) by BLAPR03CA0016.outlook.office365.com (2603:10b6:208:32b::21) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9253.19 via Frontend Transport; Thu, 30 Oct 2025 10:26:41 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.160) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.160 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.160; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.160) by BL6PEPF0001AB52.mail.protection.outlook.com (10.167.241.4) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9253.7 via Frontend Transport; Thu, 30 Oct 2025 10:26:41 +0000 Received: from rnnvmail205.nvidia.com (10.129.68.10) by mail.nvidia.com (10.129.200.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.20; Thu, 30 Oct 2025 03:26:22 -0700 Received: from rnnvmail202.nvidia.com (10.129.68.7) by rnnvmail205.nvidia.com (10.129.68.10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.20; Thu, 30 Oct 2025 03:26:20 -0700 Received: from vdi.nvidia.com (10.127.8.10) by mail.nvidia.com (10.129.68.7) with Microsoft SMTP Server id 15.2.2562.20 via Frontend Transport; Thu, 30 Oct 2025 03:26:15 -0700 From: Tariq Toukan To: Eric Dumazet , Jakub Kicinski , Paolo Abeni , Andrew Lunn , "David S. Miller" CC: Saeed Mahameed , Leon Romanovsky , Jason Gunthorpe , Tariq Toukan , Mark Bloch , Alexei Starovoitov , Daniel Borkmann , Jesper Dangaard Brouer , "John Fastabend" , Richard Cochran , , , , , Gal Pressman , Carolina Jubran , Cosmin Ratiu Subject: [PATCH net-next 6/6] net/mlx5e: Convert to new hwtstamp_get/set interface Date: Thu, 30 Oct 2025 12:25:10 +0200 Message-ID: <1761819910-1011051-7-git-send-email-tariqt@nvidia.com> X-Mailer: git-send-email 2.8.0 In-Reply-To: <1761819910-1011051-1-git-send-email-tariqt@nvidia.com> References: <1761819910-1011051-1-git-send-email-tariqt@nvidia.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-NV-OnPremToCloud: ExternallySecured X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BL6PEPF0001AB52:EE_|CY8PR12MB8214:EE_ X-MS-Office365-Filtering-Correlation-Id: ef267c33-02a1-4f6b-e2a1-08de179ed127 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|36860700013|1800799024|82310400026|7416014|376014; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?gOHOI9BcIxxyPqqJ2xszvuS+NSQZJ/ZKTu4s+ORKIrw5S0pSp6kkr8rkhZsv?= =?us-ascii?Q?gruVpx4lRzNgXyEQgk9eJlWdZ/A8LuHhctBJBVgkCQ/lGPdPeleTXwQSXNdX?= =?us-ascii?Q?c5V3nF8p93Dl9avFDwaki9FBXPeaEeeTVm12MCHfI9nXqwbBomX3DJtUf4I/?= =?us-ascii?Q?4gCObKuPT1RGMNBC3z9GoHghE9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rbuCAIKwbfHexBF70348oG25fxNtgFHrRQA+p43IKo9FePI1lDQp9Ut2Yyt?= =?us-ascii?Q?kocj14Cel4dj8kzElzbcUCusJ0ybgxLyaFKGfb4MGqwIIZiLdti8VtRvpuGe?= =?us-ascii?Q?qsLfcVr09az5cLv9CiyygWrv7RoPdjiDtjiw/p3G6KDjuaY0YWFz/naFXICl?= =?us-ascii?Q?+Ai/YgNUIEhItUEUOMLu96b//jsWD9bFxHayvSgVBvEBsVTsxyhxZZAv5eGZ?= =?us-ascii?Q?za23NvXRVN8iWuciPEa2obzcmj5OTg3267RD7Lgz/conw4UbMR0cut49JgIn?= =?us-ascii?Q?UNjgcVuB5/Bu4EUPQfDbLbmOIZGctlPNn2mLMvwUGEjwV5Cb4UMYgEeAMCGz?= =?us-ascii?Q?DSumA27i+ynt6hkZhGPHW5XCtoaxk1QwKnJwDKs3A6T4Ki8eBKRlC+jM2ITG?= =?us-ascii?Q?GIt7Mgq3hlXK9sXWDk4T6/OcOYJwhPLypHewffGh5O1dzzSA9zE4zsPL5RXq?= =?us-ascii?Q?V38knF0TzpfzWTBUL9c=3D?= X-Forefront-Antispam-Report: CIP:216.228.117.160;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.nvidia.com;PTR:dc6edge1.nvidia.com;CAT:NONE;SFS:(13230040)(36860700013)(1800799024)(82310400026)(7416014)(376014);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Oct 2025 10:26:41.2771 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: ef267c33-02a1-4f6b-e2a1-08de179ed127 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a;Ip=[216.228.117.160];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BL6PEPF0001AB52.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY8PR12MB8214 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Carolina Jubran Migrate from the legacy ioctl hardware timestamping interface to the ndo_hwtstamp_get/set operations. Signed-off-by: Carolina Jubran Reviewed-by: Cosmin Ratiu Signed-off-by: Tariq Toukan --- drivers/net/ethernet/mellanox/mlx5/core/en.h | 11 ++-- .../net/ethernet/mellanox/mlx5/core/en/txrx.h | 2 +- .../net/ethernet/mellanox/mlx5/core/en_main.c | 59 ++++++++++--------- .../ethernet/mellanox/mlx5/core/ipoib/ipoib.c | 34 ++++++----- .../ethernet/mellanox/mlx5/core/ipoib/ipoib.h | 6 +- .../mellanox/mlx5/core/ipoib/ipoib_vlan.c | 9 +-- 6 files changed, 66 insertions(+), 55 deletions(-) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en.h b/drivers/net/eth= ernet/mellanox/mlx5/core/en.h index eb3eef1a496e..fd107906bc28 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en.h +++ b/drivers/net/ethernet/mellanox/mlx5/core/en.h @@ -696,7 +696,7 @@ struct mlx5e_rq { struct mlx5e_rq_stats *stats; struct mlx5e_cq cq; struct mlx5e_cq_decomp cqd; - struct hwtstamp_config *hwtstamp_config; + struct kernel_hwtstamp_config *hwtstamp_config; struct mlx5_clock *clock; struct mlx5e_icosq *icosq; struct mlx5e_priv *priv; @@ -917,7 +917,7 @@ struct mlx5e_priv { u8 max_opened_tc; bool tx_ptp_opened; bool rx_ptp_opened; - struct hwtstamp_config hwtstamp_config; + struct kernel_hwtstamp_config hwtstamp_config; u16 q_counter[MLX5_SD_MAX_GROUP_SZ]; u16 drop_rq_q_counter; struct notifier_block events_nb; @@ -1026,8 +1026,11 @@ void mlx5e_self_test(struct net_device *ndev, struct= ethtool_test *etest, u64 *buf); void mlx5e_set_rx_mode_work(struct work_struct *work); =20 -int mlx5e_hwtstamp_set(struct mlx5e_priv *priv, struct ifreq *ifr); -int mlx5e_hwtstamp_get(struct mlx5e_priv *priv, struct ifreq *ifr); +int mlx5e_hwtstamp_set(struct mlx5e_priv *priv, + struct kernel_hwtstamp_config *config, + struct netlink_ext_ack *extack); +int mlx5e_hwtstamp_get(struct mlx5e_priv *priv, + struct kernel_hwtstamp_config *config); int mlx5e_modify_rx_cqe_compression_locked(struct mlx5e_priv *priv, bool v= al, bool rx_filter); =20 int mlx5e_vlan_rx_add_vid(struct net_device *dev, __always_unused __be16 p= roto, diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en/txrx.h b/drivers/ne= t/ethernet/mellanox/mlx5/core/en/txrx.h index 6760bb0336df..7e191e1569e8 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en/txrx.h +++ b/drivers/net/ethernet/mellanox/mlx5/core/en/txrx.h @@ -92,7 +92,7 @@ int mlx5e_poll_rx_cq(struct mlx5e_cq *cq, int budget); void mlx5e_free_rx_descs(struct mlx5e_rq *rq); void mlx5e_free_rx_missing_descs(struct mlx5e_rq *rq); =20 -static inline bool mlx5e_rx_hw_stamp(struct hwtstamp_config *config) +static inline bool mlx5e_rx_hw_stamp(struct kernel_hwtstamp_config *config) { return config->rx_filter =3D=3D HWTSTAMP_FILTER_ALL; } diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c b/drivers/ne= t/ethernet/mellanox/mlx5/core/en_main.c index 5b2491e19baa..bd7777199a01 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c @@ -4740,22 +4740,23 @@ static int mlx5e_hwstamp_config_ptp_rx(struct mlx5e= _priv *priv, bool ptp_rx) &new_params.ptp_rx, true); } =20 -int mlx5e_hwtstamp_set(struct mlx5e_priv *priv, struct ifreq *ifr) +int mlx5e_hwtstamp_set(struct mlx5e_priv *priv, + struct kernel_hwtstamp_config *config, + struct netlink_ext_ack *extack) { - struct hwtstamp_config config; bool rx_cqe_compress_def; bool ptp_rx; int err; =20 if (!MLX5_CAP_GEN(priv->mdev, device_frequency_khz) || - (mlx5_clock_get_ptp_index(priv->mdev) =3D=3D -1)) + (mlx5_clock_get_ptp_index(priv->mdev) =3D=3D -1)) { + NL_SET_ERR_MSG_MOD(extack, + "Timestamps are not supported on this device"); return -EOPNOTSUPP; - - if (copy_from_user(&config, ifr->ifr_data, sizeof(config))) - return -EFAULT; + } =20 /* TX HW timestamp */ - switch (config.tx_type) { + switch (config->tx_type) { case HWTSTAMP_TX_OFF: case HWTSTAMP_TX_ON: break; @@ -4767,7 +4768,7 @@ int mlx5e_hwtstamp_set(struct mlx5e_priv *priv, struc= t ifreq *ifr) rx_cqe_compress_def =3D priv->channels.params.rx_cqe_compress_def; =20 /* RX HW timestamp */ - switch (config.rx_filter) { + switch (config->rx_filter) { case HWTSTAMP_FILTER_NONE: ptp_rx =3D false; break; @@ -4786,7 +4787,7 @@ int mlx5e_hwtstamp_set(struct mlx5e_priv *priv, struc= t ifreq *ifr) case HWTSTAMP_FILTER_PTP_V2_SYNC: case HWTSTAMP_FILTER_PTP_V2_DELAY_REQ: case HWTSTAMP_FILTER_NTP_ALL: - config.rx_filter =3D HWTSTAMP_FILTER_ALL; + config->rx_filter =3D HWTSTAMP_FILTER_ALL; /* ptp_rx is set if both HW TS is set and CQE * compression is set */ @@ -4798,48 +4799,51 @@ int mlx5e_hwtstamp_set(struct mlx5e_priv *priv, str= uct ifreq *ifr) } =20 if (!mlx5e_profile_feature_cap(priv->profile, PTP_RX)) - err =3D mlx5e_hwstamp_config_no_ptp_rx(priv, - config.rx_filter !=3D HWTSTAMP_FILTER_NONE); + err =3D mlx5e_hwstamp_config_no_ptp_rx( + priv, config->rx_filter !=3D HWTSTAMP_FILTER_NONE); else err =3D mlx5e_hwstamp_config_ptp_rx(priv, ptp_rx); if (err) goto err_unlock; =20 - memcpy(&priv->hwtstamp_config, &config, sizeof(config)); + priv->hwtstamp_config =3D *config; mutex_unlock(&priv->state_lock); =20 /* might need to fix some features */ netdev_update_features(priv->netdev); =20 - return copy_to_user(ifr->ifr_data, &config, - sizeof(config)) ? -EFAULT : 0; + return 0; err_unlock: mutex_unlock(&priv->state_lock); return err; } =20 -int mlx5e_hwtstamp_get(struct mlx5e_priv *priv, struct ifreq *ifr) +static int mlx5e_hwtstamp_set_ndo(struct net_device *netdev, + struct kernel_hwtstamp_config *config, + struct netlink_ext_ack *extack) { - struct hwtstamp_config *cfg =3D &priv->hwtstamp_config; + struct mlx5e_priv *priv =3D netdev_priv(netdev); + + return mlx5e_hwtstamp_set(priv, config, extack); +} =20 +int mlx5e_hwtstamp_get(struct mlx5e_priv *priv, + struct kernel_hwtstamp_config *config) +{ if (!MLX5_CAP_GEN(priv->mdev, device_frequency_khz)) return -EOPNOTSUPP; =20 - return copy_to_user(ifr->ifr_data, cfg, sizeof(*cfg)) ? -EFAULT : 0; + *config =3D priv->hwtstamp_config; + + return 0; } =20 -static int mlx5e_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) +static int mlx5e_hwtstamp_get_ndo(struct net_device *dev, + struct kernel_hwtstamp_config *config) { struct mlx5e_priv *priv =3D netdev_priv(dev); =20 - switch (cmd) { - case SIOCSHWTSTAMP: - return mlx5e_hwtstamp_set(priv, ifr); - case SIOCGHWTSTAMP: - return mlx5e_hwtstamp_get(priv, ifr); - default: - return -EOPNOTSUPP; - } + return mlx5e_hwtstamp_get(priv, config); } =20 #ifdef CONFIG_MLX5_ESWITCH @@ -5280,13 +5284,14 @@ const struct net_device_ops mlx5e_netdev_ops =3D { .ndo_set_features =3D mlx5e_set_features, .ndo_fix_features =3D mlx5e_fix_features, .ndo_change_mtu =3D mlx5e_change_nic_mtu, - .ndo_eth_ioctl =3D mlx5e_ioctl, .ndo_set_tx_maxrate =3D mlx5e_set_tx_maxrate, .ndo_features_check =3D mlx5e_features_check, .ndo_tx_timeout =3D mlx5e_tx_timeout, .ndo_bpf =3D mlx5e_xdp, .ndo_xdp_xmit =3D mlx5e_xdp_xmit, .ndo_xsk_wakeup =3D mlx5e_xsk_wakeup, + .ndo_hwtstamp_get =3D mlx5e_hwtstamp_get_ndo, + .ndo_hwtstamp_set =3D mlx5e_hwtstamp_set_ndo, #ifdef CONFIG_MLX5_EN_ARFS .ndo_rx_flow_steer =3D mlx5e_rx_flow_steer, #endif diff --git a/drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c b/driver= s/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c index 11d950f58ae3..906b1fbc27aa 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c @@ -45,6 +45,23 @@ static int mlx5i_open(struct net_device *netdev); static int mlx5i_close(struct net_device *netdev); static int mlx5i_change_mtu(struct net_device *netdev, int new_mtu); =20 +int mlx5i_hwtstamp_set(struct net_device *dev, + struct kernel_hwtstamp_config *config, + struct netlink_ext_ack *extack) +{ + struct mlx5e_priv *epriv =3D mlx5i_epriv(dev); + + return mlx5e_hwtstamp_set(epriv, config, extack); +} + +int mlx5i_hwtstamp_get(struct net_device *dev, + struct kernel_hwtstamp_config *config) +{ + struct mlx5e_priv *epriv =3D mlx5i_epriv(dev); + + return mlx5e_hwtstamp_get(epriv, config); +} + static const struct net_device_ops mlx5i_netdev_ops =3D { .ndo_open =3D mlx5i_open, .ndo_stop =3D mlx5i_close, @@ -52,7 +69,8 @@ static const struct net_device_ops mlx5i_netdev_ops =3D { .ndo_init =3D mlx5i_dev_init, .ndo_uninit =3D mlx5i_dev_cleanup, .ndo_change_mtu =3D mlx5i_change_mtu, - .ndo_eth_ioctl =3D mlx5i_ioctl, + .ndo_hwtstamp_get =3D mlx5i_hwtstamp_get, + .ndo_hwtstamp_set =3D mlx5i_hwtstamp_set, }; =20 /* IPoIB mlx5 netdev profile */ @@ -557,20 +575,6 @@ int mlx5i_dev_init(struct net_device *dev) return 0; } =20 -int mlx5i_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) -{ - struct mlx5e_priv *priv =3D mlx5i_epriv(dev); - - switch (cmd) { - case SIOCSHWTSTAMP: - return mlx5e_hwtstamp_set(priv, ifr); - case SIOCGHWTSTAMP: - return mlx5e_hwtstamp_get(priv, ifr); - default: - return -EOPNOTSUPP; - } -} - void mlx5i_dev_cleanup(struct net_device *dev) { struct mlx5e_priv *priv =3D mlx5i_epriv(dev); diff --git a/drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.h b/driver= s/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.h index 2ab6437a1c49..d67d5a72bb41 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.h +++ b/drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.h @@ -88,7 +88,11 @@ struct net_device *mlx5i_pkey_get_netdev(struct net_devi= ce *netdev, u32 qpn); /* Shared ndo functions */ int mlx5i_dev_init(struct net_device *dev); void mlx5i_dev_cleanup(struct net_device *dev); -int mlx5i_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd); +int mlx5i_hwtstamp_set(struct net_device *dev, + struct kernel_hwtstamp_config *config, + struct netlink_ext_ack *extack); +int mlx5i_hwtstamp_get(struct net_device *dev, + struct kernel_hwtstamp_config *config); =20 /* Parent profile functions */ int mlx5i_init(struct mlx5_core_dev *mdev, struct net_device *netdev); diff --git a/drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib_vlan.c b/d= rivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib_vlan.c index 028a76944d82..04444dad3a0d 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib_vlan.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib_vlan.c @@ -140,7 +140,6 @@ static int mlx5i_pkey_close(struct net_device *netdev); static int mlx5i_pkey_dev_init(struct net_device *dev); static void mlx5i_pkey_dev_cleanup(struct net_device *netdev); static int mlx5i_pkey_change_mtu(struct net_device *netdev, int new_mtu); -static int mlx5i_pkey_ioctl(struct net_device *dev, struct ifreq *ifr, int= cmd); =20 static const struct net_device_ops mlx5i_pkey_netdev_ops =3D { .ndo_open =3D mlx5i_pkey_open, @@ -149,7 +148,8 @@ static const struct net_device_ops mlx5i_pkey_netdev_op= s =3D { .ndo_get_stats64 =3D mlx5i_get_stats, .ndo_uninit =3D mlx5i_pkey_dev_cleanup, .ndo_change_mtu =3D mlx5i_pkey_change_mtu, - .ndo_eth_ioctl =3D mlx5i_pkey_ioctl, + .ndo_hwtstamp_get =3D mlx5i_hwtstamp_get, + .ndo_hwtstamp_set =3D mlx5i_hwtstamp_set, }; =20 /* Child NDOs */ @@ -184,11 +184,6 @@ static int mlx5i_pkey_dev_init(struct net_device *dev) return mlx5i_dev_init(dev); } =20 -static int mlx5i_pkey_ioctl(struct net_device *dev, struct ifreq *ifr, int= cmd) -{ - return mlx5i_ioctl(dev, ifr, cmd); -} - static void mlx5i_pkey_dev_cleanup(struct net_device *netdev) { mlx5i_parent_put(netdev); --=20 2.31.1