Commit d0d8d76
committed
Propagate DPDK mbuf RX timestamp to FreeBSD mbuf rcv_tstmp
Enable RTE_ETH_RX_OFFLOAD_TIMESTAMP on ports where the NIC supports it,
register the timestamp dynamic field and flag via
rte_mbuf_dyn_rx_timestamp_register() after rte_eth_dev_start() (when
the PMD has registered the dynfield), and copy it into the FreeBSD
mbuf's m_pkthdr.rcv_tstmp so that the existing SO_TIMESTAMP /
SCM_TIMESTAMP path delivers it to userspace.
Uses the DPDK 23.11 dynamic field API: checks the registered dynflag
mask per-packet (not the legacy RTE_MBUF_F_RX_IEEE1588_TMST) and reads
the timestamp via RTE_MBUF_DYNFIELD at the registered offset.
When HW timestamps are not available the offload is not enabled, the
dynflag is never set, and the new code path is never entered — fully
backward compatible.
Fixes: #10451 parent 81919cd commit d0d8d76
3 files changed
Lines changed: 37 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
| 57 | + | |
57 | 58 | | |
58 | 59 | | |
59 | 60 | | |
| |||
80 | 81 | | |
81 | 82 | | |
82 | 83 | | |
| 84 | + | |
| 85 | + | |
83 | 86 | | |
84 | 87 | | |
85 | 88 | | |
| |||
740 | 743 | | |
741 | 744 | | |
742 | 745 | | |
| 746 | + | |
| 747 | + | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
743 | 751 | | |
744 | 752 | | |
745 | 753 | | |
| |||
851 | 859 | | |
852 | 860 | | |
853 | 861 | | |
| 862 | + | |
| 863 | + | |
| 864 | + | |
| 865 | + | |
| 866 | + | |
| 867 | + | |
| 868 | + | |
| 869 | + | |
| 870 | + | |
| 871 | + | |
| 872 | + | |
| 873 | + | |
| 874 | + | |
| 875 | + | |
854 | 876 | | |
855 | 877 | | |
856 | 878 | | |
| |||
1459 | 1481 | | |
1460 | 1482 | | |
1461 | 1483 | | |
| 1484 | + | |
| 1485 | + | |
| 1486 | + | |
| 1487 | + | |
| 1488 | + | |
| 1489 | + | |
| 1490 | + | |
1462 | 1491 | | |
1463 | 1492 | | |
1464 | 1493 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1124 | 1124 | | |
1125 | 1125 | | |
1126 | 1126 | | |
| 1127 | + | |
| 1128 | + | |
| 1129 | + | |
| 1130 | + | |
| 1131 | + | |
| 1132 | + | |
| 1133 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
| 55 | + | |
55 | 56 | | |
56 | 57 | | |
0 commit comments