RE: [EXT] Re: [v3,net-next 1/4] net: qos: introduce a gate control flow action
From: Vinicius Costa Gomes
Date: Fri Apr 24 2020 - 13:41:32 EST
Po Liu <po.liu@xxxxxxx> writes:
>>
>> One idea that just happened, if you find a way to enable RX timestamping
>> and can rely that all packets have a timestamp, the code can simplified a
>> lot. You wouldn't need any hrtimers, and deciding to drop or not a packet
>> becomes a couple of mathematical operations. Seems worth a thought.
>
> Thanks for the different ideas. The basic problem is we need to know
> now is a close time or open time in action. But I still don't know a
> better way than hrtimer to set the flag.
That's the point, if you have the timestamp of when the packet arrived,
you can calculate if the gate is open and closed at that point. You
don't need to know "now", you work only in terms of "skb->tstamp"
(supposing that's where the timestamp is stored). In other words, it
doesn't matter when the packet arrives at the qdisc action, but when it
arrived at the controller, and the actions should be taken based on that
time.
>
>>
>> The real question is: if requiring for the driver to support at least software
>> RX timestamping is excessive (doesn't seem so to me).
>
> I understand.
>
>>
>>
>> Cheers,
>> --
>> Vinicius
>
> Thanks a lot!
>
> Br,
> Po Liu
--
Vinicius