bnxt_en: Get the RX packet timestamp
If the RX packet is timestamped by the hardware, the RX completion record will contain the lower 32-bit of the timestamp. This needs to be combined with the upper 16-bit of the periodic timestamp that we get from the timer. The previous snapshot in ptp->old_timer is used to make sure that the snapshot is not ahead of the RX timestamp and we adjust for wrap-around if needed. v2: Make ptp->old_time read access safe on 32-bit CPUs. Reviewed-by:Edwin Peer <edwin.peer@broadcom.com> Signed-off-by:
Pavan Chebbi <pavan.chebbi@broadcom.com> Signed-off-by:
Michael Chan <michael.chan@broadcom.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
Showing
- drivers/net/ethernet/broadcom/bnxt/bnxt.c 21 additions, 2 deletionsdrivers/net/ethernet/broadcom/bnxt/bnxt.c
- drivers/net/ethernet/broadcom/bnxt/bnxt.h 2 additions, 1 deletiondrivers/net/ethernet/broadcom/bnxt/bnxt.h
- drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c 16 additions, 0 deletionsdrivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
- drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.h 13 additions, 0 deletionsdrivers/net/ethernet/broadcom/bnxt/bnxt_ptp.h
Loading
Please register or sign in to comment