Commit 36e564b7 authored by Feras Daoud's avatar Feras Daoud Committed by Saeed Mahameed

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: 7e7f4780 ("net/mlx5e: IPoIB, Use hash-table to map between QPN to child netdev")
Signed-off-by: default avatarFeras Daoud <ferasda@mellanox.com>
Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
parent 5c65c564
...@@ -1175,7 +1175,9 @@ static inline void mlx5i_complete_rx_cqe(struct mlx5e_rq *rq, ...@@ -1175,7 +1175,9 @@ static inline void mlx5i_complete_rx_cqe(struct mlx5e_rq *rq,
u32 cqe_bcnt, u32 cqe_bcnt,
struct sk_buff *skb) struct sk_buff *skb)
{ {
struct hwtstamp_config *tstamp;
struct net_device *netdev; struct net_device *netdev;
struct mlx5e_priv *priv;
char *pseudo_header; char *pseudo_header;
u32 qpn; u32 qpn;
u8 *dgid; u8 *dgid;
...@@ -1194,6 +1196,9 @@ static inline void mlx5i_complete_rx_cqe(struct mlx5e_rq *rq, ...@@ -1194,6 +1196,9 @@ static inline void mlx5i_complete_rx_cqe(struct mlx5e_rq *rq,
return; return;
} }
priv = mlx5i_epriv(netdev);
tstamp = &priv->tstamp;
g = (be32_to_cpu(cqe->flags_rqpn) >> 28) & 3; g = (be32_to_cpu(cqe->flags_rqpn) >> 28) & 3;
dgid = skb->data + MLX5_IB_GRH_DGID_OFFSET; dgid = skb->data + MLX5_IB_GRH_DGID_OFFSET;
if ((!g) || dgid[0] != 0xff) if ((!g) || dgid[0] != 0xff)
...@@ -1214,7 +1219,7 @@ static inline void mlx5i_complete_rx_cqe(struct mlx5e_rq *rq, ...@@ -1214,7 +1219,7 @@ static inline void mlx5i_complete_rx_cqe(struct mlx5e_rq *rq,
skb->ip_summed = CHECKSUM_COMPLETE; skb->ip_summed = CHECKSUM_COMPLETE;
skb->csum = csum_unfold((__force __sum16)cqe->check_sum); skb->csum = csum_unfold((__force __sum16)cqe->check_sum);
if (unlikely(mlx5e_rx_hw_stamp(rq->tstamp))) if (unlikely(mlx5e_rx_hw_stamp(tstamp)))
skb_hwtstamps(skb)->hwtstamp = skb_hwtstamps(skb)->hwtstamp =
mlx5_timecounter_cyc2time(rq->clock, get_cqe_ts(cqe)); mlx5_timecounter_cyc2time(rq->clock, get_cqe_ts(cqe));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment