Re: [RFC PATCH bpf-next v5 1/2] net: Rename mono_delivery_time to tstamp_type for scalabilty

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 4/25/2024 4:50 PM, Martin KaFai Lau wrote:
> On 4/25/24 12:02 PM, Abhishek Chauhan (ABC) wrote:
>>>>> @@ -9444,7 +9444,7 @@ static struct bpf_insn *bpf_convert_tstamp_read(const struct bpf_prog *prog,
>>>>                       TC_AT_INGRESS_MASK | SKB_MONO_DELIVERY_TIME_MASK);
>>>>           *insn++ = BPF_JMP32_IMM(BPF_JNE, tmp_reg,
>>>>                       TC_AT_INGRESS_MASK | SKB_MONO_DELIVERY_TIME_MASK, 2);
>>>> -        /* skb->tc_at_ingress && skb->mono_delivery_time,
>>>> +        /* skb->tc_at_ingress && skb->tstamp_type:1,
>>> Is the :1 a stale comment after we discussed how to handle the 2-bit
>> This is first patch which does not add tstamp_type:2 at the moment.
>> This series is divided into two patches
>> 1. One patchset => Just rename (So the comment is still skb->tstamp_type:1)
>> 2. Second patchset => add another bit (comment is changed to skb->tstamp_type:2)
> 
> I would suggest to completely avoid the ":1" or ":2" part in patch 1. Just use "... && skb->tstamp_type". The number of bits does not matter. The tstamp_type will still be considered as a whole even if it would become 3 bits (unlikely) in the future.

Okay i will just keep it as skb->tstamp_type instead of adding bitfields. 




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux