intel-wired-lan.lists.osuosl.org archive mirror
 help / color / mirror / Atom feed
From: Mateusz Polchlopek <mateusz.polchlopek@intel.com>
To: intel-wired-lan@lists.osuosl.org
Cc: netdev@vger.kernel.org, anthony.l.nguyen@intel.com,
	horms@kernel.org,
	Mateusz Polchlopek <mateusz.polchlopek@intel.com>
Subject: [Intel-wired-lan] [PATCH iwl-next v5 00/12] Add support for Rx timestamping for both ice and iavf drivers.
Date: Thu, 18 Apr 2024 01:24:48 -0400	[thread overview]
Message-ID: <20240418052500.50678-1-mateusz.polchlopek@intel.com> (raw)

Initially, during VF creation it registers the PTP clock in
the system and negotiates with PF it's capabilities. In the
meantime the PF enables the Flexible Descriptor for VF.
Only this type of descriptor allows to receive Rx timestamps.

Enabling virtual clock would be possible, though it would probably
perform poorly due to the lack of direct time access.

Enable timestamping should be done using SIOCSHWTSTAMP ioctl,
e.g.
hwstamp_ctl -i $VF -r 14

In order to report the timestamps to userspace, the VF extends
timestamp to 40b.

To support this feature the flexible descriptors and PTP part
in iavf driver have been introduced.

---
v5:
- fixed all new issues generated by this series in kernel-doc

v4:
- fixed duplicated argument in iavf_virtchnl.c reported by coccicheck
https://lore.kernel.org/netdev/20240410121706.6223-1-mateusz.polchlopek@intel.com/

v3:
- added RB in commit 6
- removed inline keyword in commit 9
- fixed sparse issues in commit 9 and commit 10
- used GENMASK_ULL when possible in commit 9
https://lore.kernel.org/netdev/20240403131927.87021-1-mateusz.polchlopek@intel.com/

v2:
- fixed warning related to wrong specifier to dev_err_once in
  commit 7
- fixed warnings related to unused variables in commit 9
https://lore.kernel.org/netdev/20240327132543.15923-1-mateusz.polchlopek@intel.com/

v1:
- initial series
https://lore.kernel.org/netdev/20240326115116.10040-1-mateusz.polchlopek@intel.com/
---

Jacob Keller (10):
  virtchnl: add support for enabling PTP on iAVF
  virtchnl: add enumeration for the rxdid format
  iavf: add support for negotiating flexible RXDID format
  iavf: negotiate PTP capabilities
  iavf: add initial framework for registering PTP clock
  iavf: add support for indirect access to PHC time
  iavf: periodically cache PHC time
  iavf: refactor iavf_clean_rx_irq to support legacy and flex
    descriptors
  iavf: handle SIOCSHWTSTAMP and SIOCGHWTSTAMP
  iavf: add support for Rx timestamps to hotpath

Mateusz Polchlopek (1):
  iavf: Implement checking DD desc field

Simei Su (1):
  ice: support Rx timestamp on flex descriptor

 drivers/net/ethernet/intel/iavf/Makefile      |   3 +-
 drivers/net/ethernet/intel/iavf/iavf.h        |  33 +-
 drivers/net/ethernet/intel/iavf/iavf_main.c   | 245 +++++++-
 drivers/net/ethernet/intel/iavf/iavf_ptp.c    | 548 ++++++++++++++++++
 drivers/net/ethernet/intel/iavf/iavf_ptp.h    |  46 ++
 drivers/net/ethernet/intel/iavf/iavf_txrx.c   | 426 +++++++++++---
 drivers/net/ethernet/intel/iavf/iavf_txrx.h   |  26 +-
 drivers/net/ethernet/intel/iavf/iavf_type.h   | 150 +++--
 .../net/ethernet/intel/iavf/iavf_virtchnl.c   | 238 ++++++++
 drivers/net/ethernet/intel/ice/ice_base.c     |   3 -
 drivers/net/ethernet/intel/ice/ice_ptp.c      |   4 +-
 drivers/net/ethernet/intel/ice/ice_ptp.h      |   2 +
 drivers/net/ethernet/intel/ice/ice_vf_lib.h   |   2 +
 drivers/net/ethernet/intel/ice/ice_virtchnl.c |  86 ++-
 drivers/net/ethernet/intel/ice/ice_virtchnl.h |   2 +
 .../intel/ice/ice_virtchnl_allowlist.c        |   6 +
 include/linux/avf/virtchnl.h                  | 127 +++-
 17 files changed, 1786 insertions(+), 161 deletions(-)
 create mode 100644 drivers/net/ethernet/intel/iavf/iavf_ptp.c
 create mode 100644 drivers/net/ethernet/intel/iavf/iavf_ptp.h

-- 
2.38.1


             reply	other threads:[~2024-04-18  5:34 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-18  5:24 Mateusz Polchlopek [this message]
2024-04-18  5:24 ` [Intel-wired-lan] [PATCH iwl-next v5 01/12] virtchnl: add support for enabling PTP on iAVF Mateusz Polchlopek
2024-04-18 18:49   ` Rahul Rameshbabu
2024-04-18  5:24 ` [Intel-wired-lan] [PATCH iwl-next v5 02/12] ice: support Rx timestamp on flex descriptor Mateusz Polchlopek
2024-04-18 18:57   ` Rahul Rameshbabu
2024-04-22  9:34     ` Mateusz Polchlopek
2024-04-18  5:24 ` [Intel-wired-lan] [PATCH iwl-next v5 03/12] virtchnl: add enumeration for the rxdid format Mateusz Polchlopek
2024-04-18 19:05   ` Rahul Rameshbabu
2024-04-18  5:24 ` [Intel-wired-lan] [PATCH iwl-next v5 04/12] iavf: add support for negotiating flexible RXDID format Mateusz Polchlopek
2024-04-18 19:11   ` Rahul Rameshbabu
2024-04-22  9:34     ` Mateusz Polchlopek
2024-04-18  5:24 ` [Intel-wired-lan] [PATCH iwl-next v5 05/12] iavf: negotiate PTP capabilities Mateusz Polchlopek
2024-04-18 19:16   ` Rahul Rameshbabu
2024-04-22  9:33     ` Mateusz Polchlopek
2024-04-18  5:24 ` [Intel-wired-lan] [PATCH iwl-next v5 06/12] iavf: add initial framework for registering PTP clock Mateusz Polchlopek
2024-04-18 19:28   ` Rahul Rameshbabu
2024-04-22  9:29     ` Mateusz Polchlopek
2024-04-18  5:24 ` [Intel-wired-lan] [PATCH iwl-next v5 07/12] iavf: add support for indirect access to PHC time Mateusz Polchlopek
2024-04-18 19:43   ` Rahul Rameshbabu
2024-04-18  5:24 ` [Intel-wired-lan] [PATCH iwl-next v5 08/12] iavf: periodically cache " Mateusz Polchlopek
2024-04-18 19:51   ` Rahul Rameshbabu
2024-04-22  9:23     ` Mateusz Polchlopek
2024-04-24 22:03       ` Keller, Jacob E
2024-04-25 10:52         ` Przemek Kitszel
2024-04-25 16:28           ` Keller, Jacob E
2024-04-25 17:10             ` Rahul Rameshbabu
2024-04-18  5:24 ` [Intel-wired-lan] [PATCH iwl-next v5 09/12] iavf: refactor iavf_clean_rx_irq to support legacy and flex descriptors Mateusz Polchlopek
2024-04-18 20:00   ` Rahul Rameshbabu
2024-04-22  9:22     ` Mateusz Polchlopek
2024-04-23 10:51   ` Sunil Kovvuri Goutham
2024-04-26  7:15     ` Mateusz Polchlopek
2024-04-18  5:24 ` [Intel-wired-lan] [PATCH iwl-next v5 10/12] iavf: Implement checking DD desc field Mateusz Polchlopek
2024-04-18 20:07   ` Rahul Rameshbabu
2024-04-18  5:24 ` [Intel-wired-lan] [PATCH iwl-next v5 11/12] iavf: handle SIOCSHWTSTAMP and SIOCGHWTSTAMP Mateusz Polchlopek
2024-04-18 20:08   ` Rahul Rameshbabu
2024-04-18  5:25 ` [Intel-wired-lan] [PATCH iwl-next v5 12/12] iavf: add support for Rx timestamps to hotpath Mateusz Polchlopek
2024-04-18 20:12   ` Rahul Rameshbabu
2024-04-23 10:47   ` Sunil Kovvuri Goutham
2024-04-18 20:19 ` [Intel-wired-lan] [PATCH iwl-next v5 00/12] Add support for Rx timestamping for both ice and iavf drivers Rahul Rameshbabu
2024-04-22  9:37   ` Mateusz Polchlopek
2024-04-23  5:57     ` Rahul Rameshbabu
2024-04-23  6:08       ` Mateusz Polchlopek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240418052500.50678-1-mateusz.polchlopek@intel.com \
    --to=mateusz.polchlopek@intel.com \
    --cc=anthony.l.nguyen@intel.com \
    --cc=horms@kernel.org \
    --cc=intel-wired-lan@lists.osuosl.org \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).