diff options
author | Larysa Zaremba <larysa.zaremba@intel.com> | 2023-12-05 22:08:34 +0100 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2023-12-13 16:16:40 -0800 |
commit | 9031d5f491b95710a1cf871818c7c9730ec50a1b (patch) | |
tree | 99c6e1a83463198c85a7ce8c250b71e2d00018be /drivers/net/ethernet/intel/ice/ice_base.c | |
parent | d951c14ad237b087f0d1377c44932fcc0b322c40 (diff) | |
download | linux-9031d5f491b95710a1cf871818c7c9730ec50a1b.tar.gz linux-9031d5f491b95710a1cf871818c7c9730ec50a1b.tar.bz2 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_base.c')
-rw-r--r-- | drivers/net/ethernet/intel/ice/ice_base.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/intel/ice/ice_base.c b/drivers/net/ethernet/intel/ice/ice_base.c index 7fa43827a3f0..2d83f3c029e7 100644 --- a/drivers/net/ethernet/intel/ice/ice_base.c +++ b/drivers/net/ethernet/intel/ice/ice_base.c @@ -575,6 +575,7 @@ int ice_vsi_cfg_rxq(struct ice_rx_ring *ring) xdp_init_buff(&ring->xdp, ice_rx_pg_size(ring) / 2, &ring->xdp_rxq); ring->xdp.data = NULL; + ring->xdp_ext.pkt_ctx = &ring->pkt_ctx; err = ice_setup_rx_ctx(ring); if (err) { dev_err(dev, "ice_setup_rx_ctx failed for RxQ %d, err %d\n", |