On 4/8/2025 3:31 AM, Milena Olech wrote:
> +static void idpf_ptp_release_vport_tstamp(struct idpf_vport *vport)
> +{
> + struct idpf_ptp_tx_tstamp *ptp_tx_tstamp, *tmp;
> + struct list_head *head;
> +
> + /* Remove list with free latches */
> + spin_lock(&vport->tx_tstamp_caps->lock_free);
> +
> + head = &vport->tx_tstamp_caps->latches_free;
> + list_for_each_entry_safe(ptp_tx_tstamp, tmp, head, list_member) {
> + list_del(&ptp_tx_tstamp->list_member);
> + kfree(ptp_tx_tstamp);
> + }
> +
> + spin_unlock(&vport->tx_tstamp_caps->lock_free);
> +
> + /* Remove list with latches in use */
> + spin_lock(&vport->tx_tstamp_caps->lock_in_use);
> +
> + head = &vport->tx_tstamp_caps->latches_in_use;
> + list_for_each_entry_safe(ptp_tx_tstamp, tmp, head, list_member) {
> + list_del(&ptp_tx_tstamp->list_member);
> + kfree(ptp_tx_tstamp);
> + }
> +
> + spin_unlock(&vport->tx_tstamp_caps->lock_in_use);
> +
> + kfree(vport->tx_tstamp_caps);
> + vport->tx_tstamp_caps = NULL;
> +}
Could you provide a summary and overview of the locking scheme used
here? I see you have multiple spin locks for both the free bits and the
in-use bits, and its a bit hard to grasp the reasoning behind this. We
had a lot of issues getting locking for Tx timestamps correct in ice,
though most of that had to do with quirks in the hardware.
Thanks,
Jake
- Re: [Intel-wired-lan] [PATCH v10 iwl-next... Olech, Milena
- [Intel-wired-lan] [PATCH v10 iwl-next 04/11] idpf: move vi... Milena Olech
- [Intel-wired-lan] [PATCH v10 iwl-next 05/11] idpf: negotia... Milena Olech
- Re: [Intel-wired-lan] [PATCH v10 iwl-next 05/11] idpf... Jacob Keller
- Re: [Intel-wired-lan] [PATCH v10 iwl-next 05/11] ... Olech, Milena
- Re: [Intel-wired-lan] [PATCH v10 iwl-next 05/... Jacob Keller
- [Intel-wired-lan] [PATCH v10 iwl-next 07/11] idpf: add cro... Milena Olech
- [Intel-wired-lan] [PATCH v10 iwl-next 09/11] idpf: add Tx ... Milena Olech
- Re: [Intel-wired-lan] [PATCH v10 iwl-next 09/11] idpf... Jacob Keller
- Re: [Intel-wired-lan] [PATCH v10 iwl-next 09/11] ... Olech, Milena
- Re: [Intel-wired-lan] [PATCH v10 iwl-next 09/... Jacob Keller
- Re: [Intel-wired-lan] [PATCH v10 iwl-next... Olech, Milena
- Re: [Intel-wired-lan] [PATCH v10 iwl... Keller, Jacob E
- [Intel-wired-lan] [PATCH v10 iwl-next 11/11] idpf: add sup... Milena Olech
- [Intel-wired-lan] [PATCH v10 iwl-next 10/11] idpf: add Tx ... Milena Olech
- Re: [Intel-wired-lan] [PATCH v10 iwl-next 10/11] idpf... Jacob Keller
- Re: [Intel-wired-lan] [PATCH v10 iwl-next 10/11] ... Olech, Milena
- [Intel-wired-lan] [PATCH v10 iwl-next 06/11] idpf: add mai... Milena Olech
