Hi, > -----Original Message----- > From: Slava Ovsiienko <[email protected]> > Sent: Tuesday, January 3, 2023 1:12 PM > To: [email protected] > Cc: Matan Azrad <[email protected]>; Raslan Darawsheh > <[email protected]>; Ori Kam <[email protected]>; [email protected] > Subject: [PATCH] net/mlx5: fix read device clock in real time mode > > Since ConnectX-6DX the real time timestamp mode is supported. > The rte_eth_read_clock() routine queries current timestamp value from the > PMD. > > The mlx5 PMD has special infrastructure to schedule packet sending in real > time mode which can be engaged with tx_pp devarg. > This infrastructure provides the timestamp reading from the special queue > CEQs directly from the host memory in user space, without involving kernel > calls. > > The ConnectX-7 NIC has hardware capability to schedule packet sending > without special infrastructure and tx_pp devarg can be omitted. If there is no > tx_pp devarg specified the mlx5 uses kernel calls to query current timestamp > value. The kernel can be completely unaware about engaged real time > mode, also kernel might use its internal queue CQEs to get timestamps, that > is neither precise nor reliable, inconsistent values might be returned, > causing > send scheduling malfunction. > > The HCA PCI BAR provides the real time direct reading from hardware. > This patch maps PCI resource to the process address space on demand and > allows reading the real time timestamp values from the NIC directly. > > Fixes: b94d93ca73803 ("net/mlx5: support reading device clock") > Cc: [email protected] > > Signed-off-by: Viacheslav Ovsiienko <[email protected]>
Patch applied to next-net-mlx, Kindest regards, Raslan Darawsheh

