r325506 (3cf8254f1ea9666c9cd7bd55e56b4c8543505113) extended struct pkthdr to add packet timestamp in mbuf(9) chain. cxgbe(4) and mlx5en(4) seem to support this feature. Use the timestamp for bpf(4) if it is available. This patch was lightly tested on Chelsio T502-BT.
Details
Details
Check timestamp sanity with supported controllers via hwrxtstmp/-hwrxtstmp ifconfig parameters.
Diff Detail
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
Comment Actions
Please upload patches with context.
sys/net/bpf.c | ||
---|---|---|
2279 | Please use mbuf_tstmp2timespec(), somebody might add more precision to it one day. |
Comment Actions
I think you should use "1000000000ULL" to always get unsigned results, but I'm not an expert. Else code looks good.
sys/net/bpf.c | ||
---|---|---|
2279 | Thanks, I didn't see that. |
Comment Actions
I used mbuf_tstmp2timespec() as @kib suggested. Note this function does not use ULL either.