]> www.infradead.org Git - users/hch/misc.git/commit
iavf: handle set and get timestamps ops
authorJacob Keller <jacob.e.keller@intel.com>
Wed, 6 Nov 2024 17:37:30 +0000 (12:37 -0500)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Fri, 14 Feb 2025 18:58:08 +0000 (10:58 -0800)
commit51534239ef132afbc8cc65cf430aeaeec244a6ad
treeb2425d6343f988ec9b13d2c294b10cffe656010e
parent8447357e7b04d09dde4ad04d93672b9f0f47a66c
iavf: handle set and get timestamps ops

Add handlers for the .ndo_hwtstamp_get and .ndo_hwtstamp_set ops which
allow userspace to request timestamp enablement for the device. This
support allows standard Linux applications to request the timestamping
desired.

As with other devices that support timestamping all packets, the driver
will upgrade any request for timestamping of a specific type of packet
to HWTSTAMP_FILTER_ALL.

The current configuration is stored, so that it can be retrieved by
calling .ndo_hwtstamp_get

The Tx timestamps are not implemented yet so calling set ops for
Tx path will end with EOPNOTSUPP error code.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Reviewed-by: Rahul Rameshbabu <rrameshbabu@nvidia.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Reviewed-by: Alexander Lobakin <aleksander.lobakin@intel.com>
Tested-by: Rafal Romanowski <rafal.romanowski@intel.com>
Co-developed-by: Mateusz Polchlopek <mateusz.polchlopek@intel.com>
Signed-off-by: Mateusz Polchlopek <mateusz.polchlopek@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
drivers/net/ethernet/intel/iavf/iavf_main.c
drivers/net/ethernet/intel/iavf/iavf_ptp.c
drivers/net/ethernet/intel/iavf/iavf_ptp.h
drivers/net/ethernet/intel/iavf/iavf_txrx.h