Commit 91baaf96 authored by Carolina Jubran's avatar Carolina Jubran Committed by Jakub Kicinski
Browse files

net/mlx5e: Rename timestamp fields to hwtstamp_config



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: default avatarCarolina Jubran <cjubran@nvidia.com>
Reviewed-by: default avatarCosmin Ratiu <cratiu@nvidia.com>
Signed-off-by: default avatarTariq Toukan <tariqt@nvidia.com>
Link: https://patch.msgid.link/1761819910-1011051-5-git-send-email-tariqt@nvidia.com


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent fee18237
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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;
+1 −1
Original line number Diff line number Diff line
@@ -713,7 +713,7 @@ static int mlx5e_init_ptp_rq(struct mlx5e_ptp *c, struct mlx5e_params *params,
	rq->netdev       = priv->netdev;
	rq->priv         = priv;
	rq->clock        = mdev->clock;
	rq->tstamp       = &priv->tstamp;
	rq->hwtstamp_config = &priv->hwtstamp_config;
	rq->mdev         = mdev;
	rq->hw_mtu       = MLX5E_SW2HW_MTU(params, params->sw_mtu);
	rq->stats        = &c->priv->ptp_stats.rq;
+2 −1
Original line number Diff line number Diff line
@@ -318,7 +318,8 @@ mlx5e_rx_reporter_diagnose_common_ptp_config(struct mlx5e_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);
}
+1 −1
Original line number Diff line number Diff line
@@ -47,7 +47,7 @@ static void mlx5e_init_trap_rq(struct mlx5e_trap *t, struct mlx5e_params *params
	rq->netdev       = priv->netdev;
	rq->priv         = priv;
	rq->clock        = mdev->clock;
	rq->tstamp       = &priv->tstamp;
	rq->hwtstamp_config = &priv->hwtstamp_config;
	rq->mdev         = mdev;
	rq->hw_mtu       = MLX5E_SW2HW_MTU(params, params->sw_mtu);
	rq->stats        = &priv->trap_stats.rq;
+1 −1
Original line number Diff line number Diff line
@@ -179,7 +179,7 @@ static int mlx5e_xdp_rx_timestamp(const struct xdp_md *ctx, u64 *timestamp)
{
	const struct mlx5e_xdp_buff *_ctx = (void *)ctx;

	if (unlikely(!mlx5e_rx_hw_stamp(_ctx->rq->tstamp)))
	if (unlikely(!mlx5e_rx_hw_stamp(_ctx->rq->hwtstamp_config)))
		return -ENODATA;

	*timestamp =  mlx5e_cqe_ts_to_ns(_ctx->rq->ptp_cyc2time,
Loading