idpf: add Tx timestamp flows
authorMilena Olech <milena.olech@intel.com>
Wed, 16 Apr 2025 12:19:23 +0000 (14:19 +0200)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Fri, 16 May 2025 16:13:02 +0000 (09:13 -0700)
commit1a49cf814fe1edf94615c7b08aff65d9f2d439a3
treee0c40e03a64e3dfaaaf3e3d26cce14f96c032d64
parent4901e83a94ef0a8baf27916f31daf59b0a68547f
idpf: add Tx timestamp flows

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.

Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
Co-developed-by: Josh Hay <joshua.a.hay@intel.com>
Signed-off-by: Josh Hay <joshua.a.hay@intel.com>
Signed-off-by: Milena Olech <milena.olech@intel.com>
Tested-by: Samuel Salin <Samuel.salin@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
drivers/net/ethernet/intel/idpf/idpf.h
drivers/net/ethernet/intel/idpf/idpf_ethtool.c
drivers/net/ethernet/intel/idpf/idpf_lan_txrx.h
drivers/net/ethernet/intel/idpf/idpf_lib.c
drivers/net/ethernet/intel/idpf/idpf_ptp.c
drivers/net/ethernet/intel/idpf/idpf_ptp.h
drivers/net/ethernet/intel/idpf/idpf_txrx.c
drivers/net/ethernet/intel/idpf/idpf_txrx.h
drivers/net/ethernet/intel/idpf/idpf_virtchnl.c
drivers/net/ethernet/intel/idpf/idpf_virtchnl_ptp.c