[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <79ca3bc8-a6af-4fbc-97bc-8b694fcc57d5@intel.com>
Date: Mon, 22 Apr 2024 11:34:33 +0200
From: Mateusz Polchlopek <mateusz.polchlopek@...el.com>
To: Rahul Rameshbabu <rrameshbabu@...dia.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 4/18/2024 8:57 PM, Rahul Rameshbabu wrote:
> 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?
>
No reason, I will try to use mentioned in the next version, thanks.
>> + 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