On Thu, 18 Apr, 2024 01:24:50 -0400 Mateusz Polchlopek <mateusz.polchlo...@intel.com> wrote: > From: Simei Su <simei...@intel.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.dre...@intel.com> > Signed-off-by: Simei Su <simei...@intel.com> > Co-developed-by: Mateusz Polchlopek <mateusz.polchlo...@intel.com> > Signed-off-by: Mateusz Polchlopek <mateusz.polchlo...@intel.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