[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <PH7PR11MB5885BD1D700903BEFDC0B8FA8E052@PH7PR11MB5885.namprd11.prod.outlook.com>
Date: Wed, 18 Dec 2024 15:39:08 +0000
From: "Olech, Milena" <milena.olech@...el.com>
To: Willem de Bruijn <willemdebruijn.kernel@...il.com>,
"intel-wired-lan@...ts.osuosl.org" <intel-wired-lan@...ts.osuosl.org>
CC: "netdev@...r.kernel.org" <netdev@...r.kernel.org>, "Nguyen, Anthony L"
<anthony.l.nguyen@...el.com>, "Kitszel, Przemyslaw"
<przemyslaw.kitszel@...el.com>, "Lobakin, Aleksander"
<aleksander.lobakin@...el.com>
Subject: RE: [PATCH v2 iwl-next 09/10] idpf: add support for Rx timestamping
On 11/29/2024 4:49 Willem de Bruijn wrote:
>> Add Rx timestamp function when the Rx timestamp value is read directly
>> from the Rx descriptor. In order to extend the Rx timestamp value to 64
>> bit in hot path, the PHC time is cached in the receive groups.
>> Add supported Rx timestamp modes.
>>
>> Reviewed-by: Alexander Lobakin <aleksander.lobakin@...el.com>
>> Signed-off-by: Milena Olech <milena.olech@...el.com>
>> ---
>> v1 -> v2: extend commit message
>>
>> drivers/net/ethernet/intel/idpf/idpf_ptp.c | 77 ++++++++++++++++++++-
>> drivers/net/ethernet/intel/idpf/idpf_txrx.c | 30 ++++++++
>> drivers/net/ethernet/intel/idpf/idpf_txrx.h | 7 +-
>> 3 files changed, 111 insertions(+), 3 deletions(-)
>>
>> +/**
>> + * 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)
>> +{
>> + vport->tstamp_config.rx_filter = rx_filter;
>> +
>> + if (rx_filter == HWTSTAMP_FILTER_NONE)
>> + return;
>> +
>
>Same question as v1:
>
>Should this clear the bit if it was previously set, instead of
>returning immediately?
>
>If not, why not. The function comment says enable or disable.
>
Will fix in v3.
I'll clear PTP bit when the rx_filter is equal to HWTSTAMP_FILTER_NONE.
>> + for (u16 i = 0; i < vport->num_rxq_grp; i++) {
>> + struct idpf_rxq_group *grp = &vport->rxq_grps[i];
>> + u16 j;
>> +
>> + if (idpf_is_queue_model_split(vport->rxq_model)) {
>> + for (j = 0; j < grp->singleq.num_rxq; j++)
>> + idpf_queue_set(PTP, grp->singleq.rxqs[j]);
>> + } else {
>> + for (j = 0; j < grp->splitq.num_rxq_sets; j++)
>> + idpf_queue_set(PTP,
>> + &grp->splitq.rxq_sets[j]->rxq);
>> + }
>> + }
>> +}
Regards,
Milena
Powered by blists - more mailing lists