]> git.droids-corp.org - dpdk.git/commit
net/iavf: fix race condition with Rx timestamp offload
authorWenjun Wu <wenjun1.wu@intel.com>
Mon, 23 May 2022 04:49:00 +0000 (12:49 +0800)
committerQi Zhang <qi.z.zhang@intel.com>
Tue, 24 May 2022 02:53:37 +0000 (04:53 +0200)
commit149280731bf383e369262aa156b1a3d7e6fbbe6f
treef1df1416491b40a9fc8724702ff5525e9d8ed38b
parentbc0e85586eaf774a2a0d53900aa74b257d1505f7
net/iavf: fix race condition with Rx timestamp offload

In multi-cores cases for Rx timestamp offload, if packets arrive
too fast, aq command to get phc time will be pended.

This patch adds spinlock to fix this issue. To avoid phc time being
frequently overwritten, move related variables to iavf_rx_queue
structure, and each queue will handle timestamp calculation by itself.

Fixes: b5cd735132f6 ("net/iavf: enable Rx timestamp on flex descriptor")
Fixes: 33db16136e55 ("net/iavf: improve performance of Rx timestamp offload")
Signed-off-by: Wenjun Wu <wenjun1.wu@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
drivers/net/iavf/iavf.h
drivers/net/iavf/iavf_ethdev.c
drivers/net/iavf/iavf_rxtx.c
drivers/net/iavf/iavf_rxtx.h
drivers/net/iavf/iavf_vchnl.c