Skip to content

Commit 36e564b

Browse files
ferasdSaeed Mahameed
authored andcommitted
net/mlx5e: IPoIB, Use correct timestamp in child receive flow
The current implementation takes the child timestamp object from the parent since the rq in mlx5i_complete_rx_cqe belongs to the parent. This change fixes the issue by taking the correct timestamp. Fixes: 7e7f478 ("net/mlx5e: IPoIB, Use hash-table to map between QPN to child netdev") Signed-off-by: Feras Daoud <[email protected]> Signed-off-by: Saeed Mahameed <[email protected]>
1 parent 5c65c56 commit 36e564b

File tree

1 file changed

+6
-1
lines changed
  • drivers/net/ethernet/mellanox/mlx5/core

1 file changed

+6
-1
lines changed

drivers/net/ethernet/mellanox/mlx5/core/en_rx.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1175,7 +1175,9 @@ static inline void mlx5i_complete_rx_cqe(struct mlx5e_rq *rq,
11751175
u32 cqe_bcnt,
11761176
struct sk_buff *skb)
11771177
{
1178+
struct hwtstamp_config *tstamp;
11781179
struct net_device *netdev;
1180+
struct mlx5e_priv *priv;
11791181
char *pseudo_header;
11801182
u32 qpn;
11811183
u8 *dgid;
@@ -1194,6 +1196,9 @@ static inline void mlx5i_complete_rx_cqe(struct mlx5e_rq *rq,
11941196
return;
11951197
}
11961198

1199+
priv = mlx5i_epriv(netdev);
1200+
tstamp = &priv->tstamp;
1201+
11971202
g = (be32_to_cpu(cqe->flags_rqpn) >> 28) & 3;
11981203
dgid = skb->data + MLX5_IB_GRH_DGID_OFFSET;
11991204
if ((!g) || dgid[0] != 0xff)
@@ -1214,7 +1219,7 @@ static inline void mlx5i_complete_rx_cqe(struct mlx5e_rq *rq,
12141219
skb->ip_summed = CHECKSUM_COMPLETE;
12151220
skb->csum = csum_unfold((__force __sum16)cqe->check_sum);
12161221

1217-
if (unlikely(mlx5e_rx_hw_stamp(rq->tstamp)))
1222+
if (unlikely(mlx5e_rx_hw_stamp(tstamp)))
12181223
skb_hwtstamps(skb)->hwtstamp =
12191224
mlx5_timecounter_cyc2time(rq->clock, get_cqe_ts(cqe));
12201225

0 commit comments

Comments
 (0)