On 9/16/21 11:55 AM, Thomas Monjalon wrote:
> 16/09/2021 08:52, Andrew Rybchenko:
>> On 9/16/21 12:04 AM, Thomas Monjalon wrote:
>>> The macros RTE_BIT32 and RTE_BIT64 are used to replace bit shifts.
>>> The macro UINT64C is also used to replace remaining occurrences of ULL.
>>>
>>> Only bit shifts of ETH_RSS_LEVEL_* are kept for aesthetic reason.
>>>
>>> Signed-off-by: Thomas Monjalon <tho...@monjalon.net>
>>
>> Good cleanup, many thanks.
>>
>>> diff --git a/lib/ethdev/rte_mtr.h b/lib/ethdev/rte_mtr.h
>>> index dc246dd7af..babc9968d0 100644
>>> --- a/lib/ethdev/rte_mtr.h
>>> +++ b/lib/ethdev/rte_mtr.h
>>> @@ -60,28 +60,28 @@ extern "C" {
>>>   */
>>>  enum rte_mtr_stats_type {
>>>     /** Number of packets passed as green by the policer. */
>>> -   RTE_MTR_STATS_N_PKTS_GREEN = 1 << 0,
>>> +   RTE_MTR_STATS_N_PKTS_GREEN = RTE_BIT64(0),
>>
>> I think it is a bad idea to initialize enum members to
>> uint64_t value.
> 
> Yes probably.
> The targets are 64-bit wide so there is an inconsistency in the API I think.
> 

Yes, I agree. That's why I dislike usage of enums for
definition of mask bits.

Reply via email to