From: Simon Horman <horms@kernel.org>
To: Milena Olech <milena.olech@intel.com>
Cc: intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org,
anthony.l.nguyen@intel.com, przemyslaw.kitszel@intel.com,
Emil Tantilov <emil.s.tantilov@intel.com>,
Pavan Kumar Linga <pavan.kumar.linga@intel.com>,
Alexander Lobakin <aleksander.lobakin@intel.com>
Subject: Re: [Intel-wired-lan] [PATCH iwl-net 07/10] idpf: add Tx timestamp capabilities negotiation
Date: Fri, 15 Nov 2024 13:45:02 +0000 [thread overview]
Message-ID: <20241115134502.GQ1062410@kernel.org> (raw)
In-Reply-To: <20241113154616.2493297-8-milena.olech@intel.com>
On Wed, Nov 13, 2024 at 04:46:19PM +0100, Milena Olech wrote:
> Tx timestamp capabilities are negotiated for the uplink Vport.
> Driver receives information about the number of available Tx timestamp
> latches, the size of Tx timestamp value and the set of indexes used
> for Tx timestamping.
>
> Add function to get the Tx timestamp capabilities and parse the uplink
> vport flag.
>
> Co-developed-by: Emil Tantilov <emil.s.tantilov@intel.com>
> Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com>
> Co-developed-by: Pavan Kumar Linga <pavan.kumar.linga@intel.com>
> Signed-off-by: Pavan Kumar Linga <pavan.kumar.linga@intel.com>
> Reviewed-by: Alexander Lobakin <aleksander.lobakin@intel.com>
> Signed-off-by: Milena Olech <milena.olech@intel.com>
...
> diff --git a/drivers/net/ethernet/intel/idpf/idpf_virtchnl_ptp.c b/drivers/net/ethernet/intel/idpf/idpf_virtchnl_ptp.c
...
> +/**
> + * idpf_ptp_get_vport_tstamps_caps - Send virtchnl to get tstamps caps for vport
> + * @vport: Virtual port structure
> + *
> + * Send virtchnl get vport tstamps caps message to receive the set of tstamp
> + * capabilities per vport.
> + *
> + * Return: 0 on success, -errno otherwise.
> + */
> +int idpf_ptp_get_vport_tstamps_caps(struct idpf_vport *vport)
...
> + for (u16 i = 0; i < tstamp_caps->num_entries; i++) {
> + u32 offset_l, offset_h;
It looks like the type of offset_l and offset_h should be __le32
to match the values that are stored in them.
Flagged by Sparse.
> +
> + ptp_tx_tstamp = ptp_tx_tstamps + i;
> + tx_tstamp_latch_caps = rcv_tx_tstamp_caps->tstamp_latches[i];
> +
> + if (tstamp_access != IDPF_PTP_DIRECT)
> + goto skip_offsets;
> +
> + offset_l = tx_tstamp_latch_caps.tx_latch_reg_offset_l;
> + offset_h = tx_tstamp_latch_caps.tx_latch_reg_offset_h;
> + ptp_tx_tstamp->tx_latch_reg_offset_l = le32_to_cpu(offset_l);
> + ptp_tx_tstamp->tx_latch_reg_offset_h = le32_to_cpu(offset_h);
> +
> +skip_offsets:
> + ptp_tx_tstamp->idx = tx_tstamp_latch_caps.index;
> +
> + list_add(&ptp_tx_tstamp->list_member,
> + &tstamp_caps->latches_free);
> +
> + tstamp_caps->tx_tstamp_status[i].state = IDPF_PTP_FREE;
> + }
...
WARNING: multiple messages have this Message-ID (diff)
From: Simon Horman <horms@kernel.org>
To: Milena Olech <milena.olech@intel.com>
Cc: intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org,
anthony.l.nguyen@intel.com, przemyslaw.kitszel@intel.com,
Emil Tantilov <emil.s.tantilov@intel.com>,
Pavan Kumar Linga <pavan.kumar.linga@intel.com>,
Alexander Lobakin <aleksander.lobakin@intel.com>
Subject: Re: [PATCH iwl-net 07/10] idpf: add Tx timestamp capabilities negotiation
Date: Fri, 15 Nov 2024 13:45:02 +0000 [thread overview]
Message-ID: <20241115134502.GQ1062410@kernel.org> (raw)
In-Reply-To: <20241113154616.2493297-8-milena.olech@intel.com>
On Wed, Nov 13, 2024 at 04:46:19PM +0100, Milena Olech wrote:
> Tx timestamp capabilities are negotiated for the uplink Vport.
> Driver receives information about the number of available Tx timestamp
> latches, the size of Tx timestamp value and the set of indexes used
> for Tx timestamping.
>
> Add function to get the Tx timestamp capabilities and parse the uplink
> vport flag.
>
> Co-developed-by: Emil Tantilov <emil.s.tantilov@intel.com>
> Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com>
> Co-developed-by: Pavan Kumar Linga <pavan.kumar.linga@intel.com>
> Signed-off-by: Pavan Kumar Linga <pavan.kumar.linga@intel.com>
> Reviewed-by: Alexander Lobakin <aleksander.lobakin@intel.com>
> Signed-off-by: Milena Olech <milena.olech@intel.com>
...
> diff --git a/drivers/net/ethernet/intel/idpf/idpf_virtchnl_ptp.c b/drivers/net/ethernet/intel/idpf/idpf_virtchnl_ptp.c
...
> +/**
> + * idpf_ptp_get_vport_tstamps_caps - Send virtchnl to get tstamps caps for vport
> + * @vport: Virtual port structure
> + *
> + * Send virtchnl get vport tstamps caps message to receive the set of tstamp
> + * capabilities per vport.
> + *
> + * Return: 0 on success, -errno otherwise.
> + */
> +int idpf_ptp_get_vport_tstamps_caps(struct idpf_vport *vport)
...
> + for (u16 i = 0; i < tstamp_caps->num_entries; i++) {
> + u32 offset_l, offset_h;
It looks like the type of offset_l and offset_h should be __le32
to match the values that are stored in them.
Flagged by Sparse.
> +
> + ptp_tx_tstamp = ptp_tx_tstamps + i;
> + tx_tstamp_latch_caps = rcv_tx_tstamp_caps->tstamp_latches[i];
> +
> + if (tstamp_access != IDPF_PTP_DIRECT)
> + goto skip_offsets;
> +
> + offset_l = tx_tstamp_latch_caps.tx_latch_reg_offset_l;
> + offset_h = tx_tstamp_latch_caps.tx_latch_reg_offset_h;
> + ptp_tx_tstamp->tx_latch_reg_offset_l = le32_to_cpu(offset_l);
> + ptp_tx_tstamp->tx_latch_reg_offset_h = le32_to_cpu(offset_h);
> +
> +skip_offsets:
> + ptp_tx_tstamp->idx = tx_tstamp_latch_caps.index;
> +
> + list_add(&ptp_tx_tstamp->list_member,
> + &tstamp_caps->latches_free);
> +
> + tstamp_caps->tx_tstamp_status[i].state = IDPF_PTP_FREE;
> + }
...
next prev parent reply other threads:[~2024-11-15 13:45 UTC|newest]
Thread overview: 83+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-13 15:46 [Intel-wired-lan] [PATCH iwl-net 00/10] initial PTP support Milena Olech
2024-11-13 15:46 ` Milena Olech
2024-11-13 15:46 ` [Intel-wired-lan] [PATCH iwl-net 01/10] idpf: " Milena Olech
2024-11-13 15:46 ` Milena Olech
2024-11-14 11:01 ` [Intel-wired-lan] " Vadim Fedorenko
2024-11-14 11:01 ` Vadim Fedorenko
2024-11-14 17:27 ` [Intel-wired-lan] " Willem de Bruijn
2024-11-14 17:27 ` Willem de Bruijn
2024-11-15 12:38 ` [Intel-wired-lan] " Simon Horman
2024-11-15 12:38 ` Simon Horman
2024-11-15 13:43 ` [Intel-wired-lan] " Paul Menzel
2024-11-15 16:07 ` Olech, Milena
2024-11-15 16:07 ` Olech, Milena
2024-11-13 15:46 ` [Intel-wired-lan] [PATCH iwl-net 02/10] virtchnl: add PTP virtchnl definitions Milena Olech
2024-11-13 15:46 ` Milena Olech
2024-11-14 17:28 ` [Intel-wired-lan] " Willem de Bruijn
2024-11-14 17:28 ` Willem de Bruijn
2024-11-18 12:57 ` [Intel-wired-lan] " Olech, Milena
2024-11-18 12:57 ` Olech, Milena
2024-11-15 12:42 ` Simon Horman
2024-11-15 12:42 ` Simon Horman
2024-11-13 15:46 ` [Intel-wired-lan] [PATCH iwl-net 03/10] idpf: move virtchnl structures to the header file Milena Olech
2024-11-13 15:46 ` Milena Olech
2024-11-14 20:02 ` [Intel-wired-lan] " Willem de Bruijn
2024-11-14 20:02 ` Willem de Bruijn
2024-11-13 15:46 ` [Intel-wired-lan] [PATCH iwl-net 04/10] idpf: negotiate PTP capabilies and get PTP clock Milena Olech
2024-11-13 15:46 ` Milena Olech
2024-11-14 12:17 ` [Intel-wired-lan] " Vadim Fedorenko
2024-11-14 12:17 ` Vadim Fedorenko
2024-11-14 20:57 ` [Intel-wired-lan] " Willem de Bruijn
2024-11-14 20:57 ` Willem de Bruijn
2024-11-15 16:34 ` [Intel-wired-lan] " Olech, Milena
2024-11-15 16:34 ` Olech, Milena
2024-11-14 20:20 ` Willem de Bruijn
2024-11-14 20:20 ` Willem de Bruijn
2024-11-18 14:36 ` [Intel-wired-lan] " Olech, Milena
2024-11-18 14:36 ` Olech, Milena
2024-11-18 15:21 ` Willem de Bruijn
2024-11-18 15:21 ` Willem de Bruijn
2024-11-14 23:26 ` Willem de Bruijn
2024-11-14 23:26 ` Willem de Bruijn
2024-11-15 12:51 ` [Intel-wired-lan] " Simon Horman
2024-11-15 12:51 ` Simon Horman
2024-11-13 15:46 ` [Intel-wired-lan] [PATCH iwl-net 05/10] idpf: add mailbox access to read PTP clock time Milena Olech
2024-11-13 15:46 ` Milena Olech
2024-11-14 20:22 ` [Intel-wired-lan] " Willem de Bruijn
2024-11-14 20:22 ` Willem de Bruijn
2024-11-13 15:46 ` [Intel-wired-lan] [PATCH iwl-net 06/10] idpf: add PTP clock configuration Milena Olech
2024-11-13 15:46 ` Milena Olech
2024-11-14 20:27 ` [Intel-wired-lan] " Willem de Bruijn
2024-11-14 20:27 ` Willem de Bruijn
2024-11-13 15:46 ` [Intel-wired-lan] [PATCH iwl-net 07/10] idpf: add Tx timestamp capabilities negotiation Milena Olech
2024-11-13 15:46 ` Milena Olech
2024-11-14 20:49 ` [Intel-wired-lan] " Willem de Bruijn
2024-11-14 20:49 ` Willem de Bruijn
2024-11-15 12:45 ` [Intel-wired-lan] " Simon Horman
2024-11-15 12:45 ` Simon Horman
2024-11-15 13:45 ` Simon Horman [this message]
2024-11-15 13:45 ` Simon Horman
2024-11-13 15:46 ` [Intel-wired-lan] [PATCH iwl-net 08/10] idpf: add Tx timestamp flows Milena Olech
2024-11-13 15:46 ` Milena Olech
2024-11-14 12:52 ` [Intel-wired-lan] " Vadim Fedorenko
2024-11-14 12:52 ` Vadim Fedorenko
2024-11-18 15:07 ` [Intel-wired-lan] " Olech, Milena
2024-11-18 15:07 ` Olech, Milena
2024-11-18 17:24 ` [Intel-wired-lan] " Vadim Fedorenko
2024-11-18 17:24 ` Vadim Fedorenko
2024-11-14 23:20 ` [Intel-wired-lan] " Willem de Bruijn
2024-11-14 23:20 ` Willem de Bruijn
2024-11-18 15:18 ` [Intel-wired-lan] " Olech, Milena
2024-11-18 15:18 ` Olech, Milena
2024-11-18 15:52 ` Willem de Bruijn
2024-11-18 15:52 ` Willem de Bruijn
2024-11-13 15:46 ` [Intel-wired-lan] [PATCH iwl-net 09/10] idpf: add support for Rx timestamping Milena Olech
2024-11-13 15:46 ` Milena Olech
2024-11-14 20:53 ` [Intel-wired-lan] " Willem de Bruijn
2024-11-14 20:53 ` Willem de Bruijn
2024-11-18 15:31 ` [Intel-wired-lan] " Olech, Milena
2024-11-18 15:31 ` Olech, Milena
2024-11-18 15:53 ` [Intel-wired-lan] " Willem de Bruijn
2024-11-18 15:53 ` Willem de Bruijn
2024-11-13 15:46 ` [Intel-wired-lan] [PATCH iwl-net 10/10] idpf: change the method for mailbox workqueue allocation Milena Olech
2024-11-13 15:46 ` Milena Olech
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=20241115134502.GQ1062410@kernel.org \
--to=horms@kernel.org \
--cc=aleksander.lobakin@intel.com \
--cc=anthony.l.nguyen@intel.com \
--cc=emil.s.tantilov@intel.com \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=milena.olech@intel.com \
--cc=netdev@vger.kernel.org \
--cc=pavan.kumar.linga@intel.com \
--cc=przemyslaw.kitszel@intel.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.