[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87a5lqfq6i.fsf@nvidia.com>
Date: Thu, 18 Apr 2024 11:57:04 -0700
From: Rahul Rameshbabu <rrameshbabu@...dia.com>
To: Mateusz Polchlopek <mateusz.polchlopek@...el.com>
Cc: intel-wired-lan@...ts.osuosl.org, netdev@...r.kernel.org,
horms@...nel.org, anthony.l.nguyen@...el.com, Simei Su
<simei.su@...el.com>, Wojciech Drewek <wojciech.drewek@...el.com>
Subject: Re: [Intel-wired-lan] [PATCH iwl-next v5 02/12] ice: support Rx
timestamp on flex descriptor
On Thu, 18 Apr, 2024 01:24:50 -0400 Mateusz Polchlopek <mateusz.polchlopek@...el.com> wrote:
> From: Simei Su <simei.su@...el.com>
>
> To support Rx timestamp offload, VIRTCHNL_OP_1588_PTP_CAPS is sent by
> the VF to request PTP capability and responded by the PF what capability
> is enabled for that VF.
>
> Hardware captures timestamps which contain only 32 bits of nominal
> nanoseconds, as opposed to the 64bit timestamps that the stack expects.
> To convert 32b to 64b, we need a current PHC time.
> VIRTCHNL_OP_1588_PTP_GET_TIME is sent by the VF and responded by the
> PF with the current PHC time.
>
> Reviewed-by: Wojciech Drewek <wojciech.drewek@...el.com>
> Signed-off-by: Simei Su <simei.su@...el.com>
> Co-developed-by: Mateusz Polchlopek <mateusz.polchlopek@...el.com>
> Signed-off-by: Mateusz Polchlopek <mateusz.polchlopek@...el.com>
> ---
<snip>
> @@ -1779,9 +1782,17 @@ static int ice_vc_cfg_qs_msg(struct ice_vf *vf, u8 *msg)
> rxdid = ICE_RXDID_LEGACY_1;
> }
>
> - ice_write_qrxflxp_cntxt(&vsi->back->hw,
> - vsi->rxq_map[q_idx],
> - rxdid, 0x03, false);
> + if (vf->driver_caps &
> + VIRTCHNL_VF_OFFLOAD_RX_FLEX_DESC &&
> + vf->driver_caps & VIRTCHNL_VF_CAP_PTP &&
> + qpi->rxq.flags & VIRTCHNL_PTP_RX_TSTAMP)
Just a general suggestion, any reason we cannot use test_bit, set_bit,
clear_bit, etc for these flags?
> + ice_write_qrxflxp_cntxt(&vsi->back->hw,
> + vsi->rxq_map[q_idx],
> + rxdid, 0x03, true);
> + else
> + ice_write_qrxflxp_cntxt(&vsi->back->hw,
> + vsi->rxq_map[q_idx],
> + rxdid, 0x03, false);
> }
> }
>
<snip>
--
Thanks,
Rahul Rameshbabu
Powered by blists - more mailing lists