mirror of
https://github.com/torvalds/linux.git
synced 2026-07-28 01:55:51 +02:00
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: Carolina Jubran <cjubran@nvidia.com> Reviewed-by: Cosmin Ratiu <cratiu@nvidia.com> Signed-off-by: Tariq Toukan <tariqt@nvidia.com> Link: https://patch.msgid.link/1761819910-1011051-5-git-send-email-tariqt@nvidia.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
fee182371a
commit
91baaf96f5
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ static int mlx5e_init_xsk_rq(struct mlx5e_channel *c,
|
|||
rq->pdev = c->pdev;
|
||||
rq->netdev = c->netdev;
|
||||
rq->priv = c->priv;
|
||||
rq->tstamp = &c->priv->tstamp;
|
||||
rq->hwtstamp_config = &c->priv->hwtstamp_config;
|
||||
rq->clock = mdev->clock;
|
||||
rq->icosq = &c->icosq;
|
||||
rq->ix = c->ix;
|
||||
|
|
|
|||
|
|
@ -2273,7 +2273,7 @@ static int set_pflag_rx_cqe_compress(struct net_device *netdev,
|
|||
if (!MLX5_CAP_GEN(mdev, cqe_compression))
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
rx_filter = priv->tstamp.rx_filter != HWTSTAMP_FILTER_NONE;
|
||||
rx_filter = priv->hwtstamp_config.rx_filter != HWTSTAMP_FILTER_NONE;
|
||||
err = mlx5e_modify_rx_cqe_compression_locked(priv, enable, rx_filter);
|
||||
if (err)
|
||||
return err;
|
||||
|
|
|
|||
|
|
@ -735,7 +735,7 @@ static int mlx5e_init_rxq_rq(struct mlx5e_channel *c, struct mlx5e_params *param
|
|||
rq->pdev = c->pdev;
|
||||
rq->netdev = c->netdev;
|
||||
rq->priv = c->priv;
|
||||
rq->tstamp = &c->priv->tstamp;
|
||||
rq->hwtstamp_config = &c->priv->hwtstamp_config;
|
||||
rq->clock = mdev->clock;
|
||||
rq->icosq = &c->icosq;
|
||||
rq->ix = c->ix;
|
||||
|
|
@ -3444,8 +3444,8 @@ int mlx5e_safe_reopen_channels(struct mlx5e_priv *priv)
|
|||
|
||||
void mlx5e_timestamp_init(struct mlx5e_priv *priv)
|
||||
{
|
||||
priv->tstamp.tx_type = HWTSTAMP_TX_OFF;
|
||||
priv->tstamp.rx_filter = HWTSTAMP_FILTER_NONE;
|
||||
priv->hwtstamp_config.tx_type = HWTSTAMP_TX_OFF;
|
||||
priv->hwtstamp_config.rx_filter = HWTSTAMP_FILTER_NONE;
|
||||
}
|
||||
|
||||
static void mlx5e_modify_admin_state(struct mlx5_core_dev *mdev,
|
||||
|
|
@ -4805,7 +4805,7 @@ int mlx5e_hwtstamp_set(struct mlx5e_priv *priv, struct ifreq *ifr)
|
|||
if (err)
|
||||
goto err_unlock;
|
||||
|
||||
memcpy(&priv->tstamp, &config, sizeof(config));
|
||||
memcpy(&priv->hwtstamp_config, &config, sizeof(config));
|
||||
mutex_unlock(&priv->state_lock);
|
||||
|
||||
/* might need to fix some features */
|
||||
|
|
@ -4820,7 +4820,7 @@ int mlx5e_hwtstamp_set(struct mlx5e_priv *priv, struct ifreq *ifr)
|
|||
|
||||
int mlx5e_hwtstamp_get(struct mlx5e_priv *priv, struct ifreq *ifr)
|
||||
{
|
||||
struct hwtstamp_config *cfg = &priv->tstamp;
|
||||
struct hwtstamp_config *cfg = &priv->hwtstamp_config;
|
||||
|
||||
if (!MLX5_CAP_GEN(priv->mdev, device_frequency_khz))
|
||||
return -EOPNOTSUPP;
|
||||
|
|
|
|||
|
|
@ -1602,7 +1602,7 @@ static inline bool mlx5e_build_rx_skb(struct mlx5_cqe64 *cqe,
|
|||
stats->lro_bytes += cqe_bcnt;
|
||||
}
|
||||
|
||||
if (unlikely(mlx5e_rx_hw_stamp(rq->tstamp)))
|
||||
if (unlikely(mlx5e_rx_hw_stamp(rq->hwtstamp_config)))
|
||||
skb_hwtstamps(skb)->hwtstamp = mlx5e_cqe_ts_to_ns(rq->ptp_cyc2time,
|
||||
rq->clock, get_cqe_ts(cqe));
|
||||
skb_record_rx_queue(skb, rq->ix);
|
||||
|
|
@ -2708,7 +2708,7 @@ static inline void mlx5i_complete_rx_cqe(struct mlx5e_rq *rq,
|
|||
stats->csum_none++;
|
||||
}
|
||||
|
||||
if (unlikely(mlx5e_rx_hw_stamp(&priv->tstamp)))
|
||||
if (unlikely(mlx5e_rx_hw_stamp(&priv->hwtstamp_config)))
|
||||
skb_hwtstamps(skb)->hwtstamp = mlx5e_cqe_ts_to_ns(rq->ptp_cyc2time,
|
||||
rq->clock, get_cqe_ts(cqe));
|
||||
skb_record_rx_queue(skb, rq->ix);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user