diff options
| author | Jesper Dangaard Brouer <[email protected]> | 2023-04-18 13:30:57 +0000 |
|---|---|---|
| committer | Daniel Borkmann <[email protected]> | 2023-04-27 16:42:19 +0000 |
| commit | d677266755c6e55c43b6755673a1eeae3d452e87 (patch) | |
| tree | 3375b54a9c192b6d182a9c03530def413356633e /drivers/net/ethernet/intel/igc/igc.h | |
| parent | igc: Add XDP hints kfuncs for RX hash (diff) | |
| download | kernel-d677266755c6e55c43b6755673a1eeae3d452e87.tar.gz kernel-d677266755c6e55c43b6755673a1eeae3d452e87.zip | |
igc: Add XDP hints kfuncs for RX timestamp
The NIC hardware RX timestamping mechanism adds an optional tailored
header before the MAC header containing packet reception time. Optional
depending on RX descriptor TSIP status bit (IGC_RXDADV_STAT_TSIP). In
case this bit is set driver does offset adjustments to packet data start
and extracts the timestamp.
The timestamp need to be extracted before invoking the XDP bpf_prog,
because this area just before the packet is also accessible by XDP via
data_meta context pointer (and helper bpf_xdp_adjust_meta). Thus, an XDP
bpf_prog can potentially overwrite this and corrupt data that we want to
extract with the new kfunc for reading the timestamp.
Signed-off-by: Jesper Dangaard Brouer <[email protected]>
Signed-off-by: Daniel Borkmann <[email protected]>
Acked-by: Song Yoong Siang <[email protected]>
Link: https://lore.kernel.org/bpf/168182465791.616355.2583922957423587914.stgit@firesoul
Diffstat (limited to 'drivers/net/ethernet/intel/igc/igc.h')
| -rw-r--r-- | drivers/net/ethernet/intel/igc/igc.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/intel/igc/igc.h b/drivers/net/ethernet/intel/igc/igc.h index c609a2e648f8..18d4af934d8c 100644 --- a/drivers/net/ethernet/intel/igc/igc.h +++ b/drivers/net/ethernet/intel/igc/igc.h @@ -503,6 +503,7 @@ struct igc_rx_buffer { struct igc_xdp_buff { struct xdp_buff xdp; union igc_adv_rx_desc *rx_desc; + ktime_t rx_ts; /* data indication bit IGC_RXDADV_STAT_TSIP */ }; struct igc_q_vector { |
