net/ice: improve performance of Rx timestamp offload
authorWenjun Wu <wenjun1.wu@intel.com>
Mon, 28 Feb 2022 07:36:07 +0000 (15:36 +0800)
committerQi Zhang <qi.z.zhang@intel.com>
Mon, 18 Apr 2022 05:47:18 +0000 (07:47 +0200)
commit5543827fc6df39eabd51e2ca81f4462c291ea8d9
tree9944a5e485fdf034a1aa0fc15d36557547b1221c
parent1b73c2d1a1bd97863a08de15bb492acfab56184e
net/ice: improve performance of Rx timestamp offload

Previously, each time a burst of packets is received, SW reads HW
register and assembles it and the timestamp from descriptor together to
get the complete 64 bits timestamp.

This patch optimizes the algorithm. The SW only needs to check the
monotonicity of the low 32bits timestamp to avoid crossing borders.
Each time before SW receives a burst of packets, it should check the
time difference between current time and last update time to avoid
the low 32 bits timestamp cycling twice.

The patch proved a 50% ~ 70% single core performance improvement on a
main stream Xeon server, this fix the performance gap for some use cases.

Fixes: f9c561ffbccc ("net/ice: fix performance for Rx timestamp")
Cc: stable@dpdk.org
Signed-off-by: Wenjun Wu <wenjun1.wu@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
drivers/net/ice/ice_ethdev.h
drivers/net/ice/ice_rxtx.c