Re: [PATCH RESEND bpf-next 01/15] ice: make RX hash reading code more reusable

Alexander Lobakin
2023-05-22T15:38:32Z

From: Larysa Zaremba <larysa.zaremba@intel.com>
Date: Mon, 22 May 2023 17:03:54 +0200

> On Fri, May 19, 2023 at 06:46:31PM +0200, Alexander Lobakin wrote:
>> From: Larysa Zaremba <larysa.zaremba@intel.com>
>> Date: Fri, 12 May 2023 17:25:53 +0200

[...]

>>> + nic_mdid = (struct ice_32b_rx_flex_desc_nic *)rx_desc;
>>> + *dst = le32_to_cpu(nic_mdid->rss_hash);
>>> + return true;
>>
>> You can just return the hash. `hash == 0` means there's no hash, so it
>> basically means `false`, while non-zero is `true`.
>
> Agree about both hash and timestamp.
>
> Taking this comment and the earlier on into account, I'll name functions like
> that:
>
> ice_get_rx_hash()
> ice_get_vlan_tag()
> ice_ptp_get_rx_hwts_ns()

Sounds good to me!

[...]

Thanks,
Olek