[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <f305bf25-a11c-4fa6-abbf-3a0c48399b01@intel.com>
Date: Wed, 12 Mar 2025 14:48:41 -0700
From: Jacob Keller <jacob.e.keller@...el.com>
To: Milena Olech <milena.olech@...el.com>, <intel-wired-lan@...ts.osuosl.org>
CC: <netdev@...r.kernel.org>, <anthony.l.nguyen@...el.com>,
<przemyslaw.kitszel@...el.com>
Subject: Re: [Intel-wired-lan] [PATCH v8 iwl-next 09/10] idpf: add support for
Rx timestamping
On 2/27/2025 5:13 AM, Milena Olech wrote:
> +/**
> + * idpf_ptp_set_rx_tstamp - Enable or disable Rx timestamping
> + * @vport: Virtual port structure
> + * @rx_filter: bool value for whether timestamps are enabled or disabled
> + */
> +static void idpf_ptp_set_rx_tstamp(struct idpf_vport *vport, int rx_filter)
> +{
> + bool enable = true, splitq;
> +
> + vport->tstamp_config.rx_filter = rx_filter;
> + splitq = idpf_is_queue_model_split(vport->rxq_model);
> +
> + if (rx_filter == HWTSTAMP_FILTER_NONE)
> + enable = false;
> +
> + for (u16 i = 0; i < vport->num_rxq_grp; i++) {
> + struct idpf_rxq_group *grp = &vport->rxq_grps[i];
> + struct idpf_rx_queue *rx_queue;
> + u16 j, num_rxq;
> +
> + if (splitq)
> + num_rxq = grp->splitq.num_rxq_sets;
> + else
> + num_rxq = grp->singleq.num_rxq;
> +
> + for (j = 0; j < num_rxq; j++) {
> + if (splitq)
> + rx_queue = &grp->splitq.rxq_sets[j]->rxq;
> + else
> + rx_queue = grp->singleq.rxqs[j];
> +
> + if (enable)
> + idpf_queue_set(PTP, rx_queue);
> + else
> + idpf_queue_clear(PTP, rx_queue);
> + }
> + }
> +}
> +
> /**
> * idpf_ptp_set_timestamp_mode - Setup driver for requested timestamp mode
> * @vport: Virtual port structure
> @@ -627,6 +710,7 @@ int idpf_ptp_set_timestamp_mode(struct idpf_vport *vport,
> }
>
> vport->tstamp_config.tx_type = config->tx_type;
> + idpf_ptp_set_rx_tstamp(vport, config->rx_filter);
>
With the adaptation to the netdev .ndo_hwtstamp_set, this no longer
updates the user config value to report the upscale of HWTSTAMP_FILTER_ALL.
The expected behavior is that a specific filter request is modified on
return to the actual filter enabled.
I think idpf_hwtstamp_set needs to modify the passed in config to report
the upscaled filter.
Thanks,
Jake
> return 0;
> }
Powered by blists - more mailing lists