[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <SJ0PR11MB58653DFEF39C9A133AA1F8988F512@SJ0PR11MB5865.namprd11.prod.outlook.com>
Date: Mon, 4 Nov 2024 11:01:02 +0000
From: "Romanowski, Rafal" <rafal.romanowski@...el.com>
To: "Polchlopek, Mateusz" <mateusz.polchlopek@...el.com>,
"intel-wired-lan@...ts.osuosl.org" <intel-wired-lan@...ts.osuosl.org>
CC: "netdev@...r.kernel.org" <netdev@...r.kernel.org>, "Keller, Jacob E"
<jacob.e.keller@...el.com>, "Drewek, Wojciech" <wojciech.drewek@...el.com>,
Rahul Rameshbabu <rrameshbabu@...dia.com>, Simon Horman <horms@...nel.org>,
"Polchlopek, Mateusz" <mateusz.polchlopek@...el.com>
Subject: RE: [Intel-wired-lan] [PATCH iwl-next v12 07/14] iavf: add support
for indirect access to PHC time
> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@...osl.org> On Behalf Of
> Mateusz Polchlopek
> Sent: Tuesday, October 22, 2024 1:41 PM
> To: intel-wired-lan@...ts.osuosl.org
> Cc: netdev@...r.kernel.org; Keller, Jacob E <jacob.e.keller@...el.com>; Drewek,
> Wojciech <wojciech.drewek@...el.com>; Rahul Rameshbabu
> <rrameshbabu@...dia.com>; Simon Horman <horms@...nel.org>; Polchlopek,
> Mateusz <mateusz.polchlopek@...el.com>
> Subject: [Intel-wired-lan] [PATCH iwl-next v12 07/14] iavf: add support for
> indirect access to PHC time
>
> From: Jacob Keller <jacob.e.keller@...el.com>
>
> Implement support for reading the PHC time indirectly via the
> VIRTCHNL_OP_1588_PTP_GET_TIME operation.
>
> Based on some simple tests with ftrace, the latency of the indirect clock access
> appears to be about ~110 microseconds. This is due to the cost of preparing a
> message to send over the virtchnl queue.
>
> This is expected, due to the increased jitter caused by sending messages over
> virtchnl. It is not easy to control the precise time that the message is sent by the
> VF, or the time that the message is responded to by the PF, or the time that the
> message sent from the PF is received by the VF.
>
> For sending the request, note that many PTP related operations will require
> sending of VIRTCHNL messages. Instead of adding a separate AQ flag and storage
> for each operation, setup a simple queue mechanism for queuing up virtchnl
> messages.
>
> Each message will be converted to a iavf_ptp_aq_cmd structure which ends with
> a flexible array member. A single AQ flag is added for processing messages from
> this queue. In principle this could be extended to handle arbitrary virtchnl
> messages. For now it is kept to PTP-specific as the need is primarily for handling
> PTP-related commands.
>
> Use this to implement .gettimex64 using the indirect method via the virtchnl
> command. The response from the PF is processed and stored into the
> cached_phc_time. A wait queue is used to allow the PTP clock gettime request to
> sleep until the message is sent from the PF.
>
> Signed-off-by: Jacob Keller <jacob.e.keller@...el.com>
> Reviewed-by: Wojciech Drewek <wojciech.drewek@...el.com>
> Reviewed-by: Rahul Rameshbabu <rrameshbabu@...dia.com>
> Reviewed-by: Simon Horman <horms@...nel.org>
> Signed-off-by: Mateusz Polchlopek <mateusz.polchlopek@...el.com>
Tested-by: Rafal Romanowski <rafal.romanowski@...el.com>
Powered by blists - more mailing lists