[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6749e251407f0_23772a2948f@willemb.c.googlers.com.notmuch>
Date: Fri, 29 Nov 2024 10:48:33 -0500
From: Willem de Bruijn <willemdebruijn.kernel@...il.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,
Milena Olech <milena.olech@...el.com>,
Alexander Lobakin <aleksander.lobakin@...el.com>
Subject: Re: [PATCH v2 iwl-next 09/10] idpf: add support for Rx timestamping
Milena Olech 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.
> + 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);
> + }
> + }
> +}
Powered by blists - more mailing lists