net/ice: fix race condition for multi-cores
PATCH 1/1 net/ice: fix race condition for multi-cores
In multi-cores cases for Rx timestamp offload, to avoid phc time being frequently overwritten, move related variables from ice_adapter to ice_rx_queue structure, and each queue will handle timestamp calculation by itself.
--- drivers/net/ice/ice_ethdev.h | 3 --- drivers/net/ice/ice_rxtx.c | 48 ++++++++++++++++++++++---------------------- drivers/net/ice/ice_rxtx.h | 3 +++ 3 files changed, 27 insertions(+), 27 deletions(-)
drivers/net/ice/ice_ethdev.h +0 -3
@@ -606,9 +606,6 @@ struct ice_adapter {struct rte_timecounter tx_tstamp_tc;bool ptp_ena;uint64_t time_hw; -uint32_t hw_time_high;/* high 32 bits of timestamp */ -uint32_t hw_time_low;/* low 32 bits of timestamp */ -uint64_t hw_time_update;/* SW time of HW record updating */ struct ice_fdir_prof_info fdir_prof_info[ICE_MAX_PTGS ];struct ice_rss_prof_info rss_prof_info[ICE_MAX_PTGS ];/* True if DCF state of the associated PF is on */
drivers/net/ice/ice_rxtx.c +24 -24
93 lines not on this page · raw message
drivers/net/ice/ice_rxtx.h +3 -0
@@ -95,6 +95,9 @@ struct ice_rx_queue {uint32_t time_high;uint32_t hw_register_set;const struct rte_memzone *mz; +uint32_t hw_time_high;/* high 32 bits of timestamp */ +uint32_t hw_time_low;/* low 32 bits of timestamp */ +uint64_t hw_time_update;/* SW time of HW record updating */ };struct ice_tx_entry {
Signature · 1 line
2.9.5
Quoted 16 lines
-----Original Message-----
From: Su, Simei <[email protected]>
Sent: Wednesday, June 8, 2022 10:46 AM
To: Zhang, Qi Z <[email protected]>; Yang, Qiming <[email protected]>
Cc: [email protected]; Wu, Wenjun1 <[email protected]>; Su, Simei <[email protected]>; [email protected]
Subject: [PATCH] net/ice: fix race condition for multi-coresIn multi-cores cases for Rx timestamp offload, to avoid phc time being frequently overwritten, move related variables from
ice_adaptertoice_rx_queuestructure, and each queue will handle timestamp calculation by itself.
Quoted 6 lines
Fixes 953e74e6b73a ("net/ice: enable Rx timestamp on flex descriptor")Fixes 5543827fc6df ("net/ice: improve performance of Rx timestampoffload")
Cc: [email protected]Signed-off-by Simei Su <[email protected]>
Applied to dpdk-next-net-intel.
Thanks
Qi