RE: [EXT] Re: [v3,net-next 1/4] net: qos: introduce a gate control flow action

From: Po Liu
Date: Fri Apr 24 2020 - 21:49:19 EST





Br,
Po Liu

> -----Original Message-----
> From: Vinicius Costa Gomes <vinicius.gomes@xxxxxxxxx>
> Sent: 2020年4月25日 1:41
> To: Po Liu <po.liu@xxxxxxx>; davem@xxxxxxxxxxxxx; linux-
> kernel@xxxxxxxxxxxxxxx; netdev@xxxxxxxxxxxxxxx
> Cc: Claudiu Manoil <claudiu.manoil@xxxxxxx>; Vladimir Oltean
> <vladimir.oltean@xxxxxxx>; Alexandru Marginean
> <alexandru.marginean@xxxxxxx>; michael.chan@xxxxxxxxxxxx;
> vishal@xxxxxxxxxxx; saeedm@xxxxxxxxxxxx; leon@xxxxxxxxxx;
> jiri@xxxxxxxxxxxx; idosch@xxxxxxxxxxxx;
> alexandre.belloni@xxxxxxxxxxx; UNGLinuxDriver@xxxxxxxxxxxxx;
> kuba@xxxxxxxxxx; jhs@xxxxxxxxxxxx; xiyou.wangcong@xxxxxxxxx;
> simon.horman@xxxxxxxxxxxxx; pablo@xxxxxxxxxxxxx;
> moshe@xxxxxxxxxxxx; m-karicheri2@xxxxxx;
> andre.guedes@xxxxxxxxxxxxxxx; stephen@xxxxxxxxxxxxxxxxxx
> Subject: RE: [EXT] Re: [v3,net-next 1/4] net: qos: introduce a gate control
> flow action
>
> Caution: EXT Email
>
> 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.

I get your idea. But that would rely on the software timestamping on driver to be set. By set all streams or by filtered stream each time set with tc flower filter. Also how the virtue net fix it is unknow.

>
> >
> >>
> >> 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