lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1a1ab6eb-9bfc-4298-ba1e-a6f4229ce091@gmail.com>
Date: Thu, 8 May 2025 09:29:20 +0300
From: Tariq Toukan <ttoukan.linux@...il.com>
To: Stanislav Fomichev <stfomichev@...il.com>, netdev@...r.kernel.org
Cc: davem@...emloft.net, edumazet@...gle.com, kuba@...nel.org,
 pabeni@...hat.com, saeedm@...dia.com, tariqt@...dia.com,
 andrew+netdev@...n.ch, linux-rdma@...r.kernel.org,
 linux-kernel@...r.kernel.org, leon@...nel.org,
 Carolina Jubran <cjubran@...dia.com>
Subject: Re: [PATCH net-next] net/mlx5: support software TX timestamp



On 07/05/2025 0:55, Stanislav Fomichev wrote:
> Having a software timestamp (along with existing hardware one) is
> useful to trace how the packets flow through the stack.
> mlx5e_tx_skb_update_hwts_flags is called from tx paths
> to setup HW timestamp; extend it to add software one as well.
> 
> Signed-off-by: Stanislav Fomichev <stfomichev@...il.com>
> ---
>   drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c | 1 +
>   drivers/net/ethernet/mellanox/mlx5/core/en_tx.c      | 1 +
>   2 files changed, 2 insertions(+)
> 
> diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c b/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c
> index fdf9e9bb99ac..e399d7a3d6cb 100644
> --- a/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c
> +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c
> @@ -1689,6 +1689,7 @@ int mlx5e_ethtool_get_ts_info(struct mlx5e_priv *priv,
>   		return 0;
>   
>   	info->so_timestamping = SOF_TIMESTAMPING_TX_HARDWARE |
> +				SOF_TIMESTAMPING_TX_SOFTWARE |
>   				SOF_TIMESTAMPING_RX_HARDWARE |
>   				SOF_TIMESTAMPING_RAW_HARDWARE;
>   
> diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_tx.c b/drivers/net/ethernet/mellanox/mlx5/core/en_tx.c
> index 4fd853d19e31..f6dd26ad29e5 100644
> --- a/drivers/net/ethernet/mellanox/mlx5/core/en_tx.c
> +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_tx.c
> @@ -341,6 +341,7 @@ static void mlx5e_tx_skb_update_hwts_flags(struct sk_buff *skb)
>   {
>   	if (unlikely(skb_shinfo(skb)->tx_flags & SKBTX_HW_TSTAMP))
>   		skb_shinfo(skb)->tx_flags |= SKBTX_IN_PROGRESS;
> +	skb_tx_timestamp(skb);

Doesn't this interfere with skb_tstamp_tx call in the completion flow 
(mlx5e_consume_skb)?

What happens if both flags (SKBTX_SW_TSTAMP / SKBTX_HW_TSTAMP) are set 
Is it possible?

>   }
>   
>   static void mlx5e_tx_check_stop(struct mlx5e_txqsq *sq)


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ