On 4/14/2025 3:45 AM, Milena Olech wrote:
> Add functions to request Tx timestamp for the PTP packets, read the Tx
> timestamp when the completion tag for that packet is being received,
> extend the Tx timestamp value and set the supported timestamping modes.
> 
> Tx timestamp is requested for the PTP packets by setting a TSYN bit and
> index value in the Tx context descriptor. The driver assumption is that
> the Tx timestamp value is ready to be read when the completion tag is
> received. Then the driver schedules delayed work and the Tx timestamp
> value read is requested through virtchnl message. At the end, the Tx
> timestamp value is extended to 64-bit and provided back to the skb.
> 
> Co-developed-by: Josh Hay <[email protected]>
> Signed-off-by: Josh Hay <[email protected]>
> Signed-off-by: Milena Olech <[email protected]>
> ---
> v10 -> v11: change timestamp extension algorithm
> v8 -> v9: update kernel_hwtstamp_config when timestamp mode is set,
> check link status in timestamp callbacks idpf_hwtstamp_get/set
> v7 -> v8: change the type of delta calculated when the timestamp is
> extended to 64 bit based on the device clock value
> v6 -> v7: change the method for preparing flow desciptor to set
> tstamp fields to 0 indirectly
> v5 -> v6: change locking mechanism in get_ts_info, clean timestamp
> fields when preparing flow descriptor to prevent collisions with
> PHY timestamping
> v4 -> v5: fix the spin_unlock_bh when the Tx timestamp is requested
> and the list of free latches is empty
> v3 -> v4: change Tx timestamp filters based on the PTP capabilities,
> use list_for_each_entry_safe when deleting list items, rewrite
> function that extends Tx timestamp value to 64 bits, minor fixes
> v2 -> v3: change get_timestamp_filter function name, split stats
> into vport-based and tx queue-based
> v1 -> v2: add timestamping stats, use ndo_hwtamp_get/ndo_hwstamp_set
> 
Reviewed-by: Jacob Keller <[email protected]>

Reply via email to