aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/intel/ice/ice_txrx.h
diff options
context:
space:
mode:
authorLarysa Zaremba <larysa.zaremba@intel.com>2023-12-05 22:08:34 +0100
committerAlexei Starovoitov <ast@kernel.org>2023-12-13 16:16:40 -0800
commit9031d5f491b95710a1cf871818c7c9730ec50a1b (patch)
tree99c6e1a83463198c85a7ce8c250b71e2d00018be /drivers/net/ethernet/intel/ice/ice_txrx.h
parentice: Introduce ice_xdp_buff (diff)
downloadlinux-9031d5f491b95710a1cf871818c7c9730ec50a1b.tar.xz
linux-9031d5f491b95710a1cf871818c7c9730ec50a1b.zip
ice: Support HW timestamp hint
Use previously refactored code and create a function that allows XDP code to read HW timestamp. Also, introduce packet context, where hints-related data will be stored. ice_xdp_buff contains only a pointer to this structure, to avoid copying it in ZC mode later in the series. HW timestamp is the first supported hint in the driver, so also add xdp_metadata_ops. Reviewed-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com> Signed-off-by: Larysa Zaremba <larysa.zaremba@intel.com> Link: https://lore.kernel.org/r/20231205210847.28460-6-larysa.zaremba@intel.com Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'drivers/net/ethernet/intel/ice/ice_txrx.h')
-rw-r--r--drivers/net/ethernet/intel/ice/ice_txrx.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/net/ethernet/intel/ice/ice_txrx.h b/drivers/net/ethernet/intel/ice/ice_txrx.h
index cd93394fab17..ce3434c73a4b 100644
--- a/drivers/net/ethernet/intel/ice/ice_txrx.h
+++ b/drivers/net/ethernet/intel/ice/ice_txrx.h
@@ -257,9 +257,14 @@ enum ice_rx_dtype {
ICE_RX_DTYPE_SPLIT_ALWAYS = 2,
};
+struct ice_pkt_ctx {
+ u64 cached_phctime;
+};
+
struct ice_xdp_buff {
struct xdp_buff xdp_buff;
const union ice_32b_rx_flex_desc *eop_desc;
+ const struct ice_pkt_ctx *pkt_ctx;
};
/* Required for compatibility with xdp_buffs from xsk_pool */
@@ -328,6 +333,10 @@ struct ice_rx_ring {
struct xdp_buff xdp;
};
/* CL3 - 3rd cacheline starts here */
+ union {
+ struct ice_pkt_ctx pkt_ctx;
+ u64 cached_phctime;
+ };
struct bpf_prog *xdp_prog;
u16 rx_offset;
@@ -346,7 +355,6 @@ struct ice_rx_ring {
struct ice_rx_ring *next; /* pointer to next ring in q_vector */
struct xsk_buff_pool *xsk_pool;
dma_addr_t dma; /* physical address of ring */
- u64 cached_phctime;
u16 rx_buf_len;
u8 dcb_tc; /* Traffic class of ring */
u8 ptp_rx;