[Intel-wired-lan] [PATCH iwl-next v8 02/14] ice: support Rx timestamp on flex descriptor
Alexander Lobakin
aleksander.lobakin at intel.com
Thu Aug 8 12:07:07 UTC 2024
From: Mateusz Polchlopek <mateusz.polchlopek at intel.com>
Date: Thu, 8 Aug 2024 13:04:14 +0200
>
>
> On 7/30/2024 2:54 PM, Alexander Lobakin wrote:
>> From: Mateusz Polchlopek <mateusz.polchlopek at intel.com>
>> Date: Tue, 30 Jul 2024 05:14:57 -0400
[...]
>>> @@ -3788,6 +3799,65 @@ static int
>>> ice_vc_dis_vlan_insertion_v2_msg(struct ice_vf *vf, u8 *msg)
>>> v_ret, NULL, 0);
>>> }
>>> +static int ice_vc_get_ptp_cap(struct ice_vf *vf, u8 *msg)
>>
>> @msg can be const.
>> Also, I'd make it `const void *` or maybe even `const struct
>> virtchnl_ptp_caps *` right away.
>>
>
> I am afraid that I can not do that in the scope of this series. This
> touches virtchnl messages and seems to be bigger code refactor. I think
> in the future we can think about redefining it but not in this series
I mean, just make this function take `const struct virtchnl_ptp_caps *`
instead of `u8 *`, you don't need to refactor VC for this one. If you
then get some "incompatible pointer types" warning, just cast the
argument to `const void *` where you call this function.
>
>>> +{
>>> + enum virtchnl_status_code v_ret = VIRTCHNL_STATUS_SUCCESS;
>>> + u32 msg_caps;
>>> + int ret;
>>> +
>>> + /* VF is not in active state */
>>> + if (!test_bit(ICE_VF_STATE_ACTIVE, vf->vf_states)) {
>>> + v_ret = VIRTCHNL_STATUS_ERR_PARAM;
>>> + goto err;
>>> + }
[...]
Thanks,
Olek
More information about the Intel-wired-lan
mailing list