Merge tag 'fuse-update-5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/mszered...
[linux-2.6-microblaze.git] / include / net / sch_generic.h
index 2d6eb60..f7a6e14 100644 (file)
@@ -1242,6 +1242,20 @@ static inline void psched_ratecfg_getrate(struct tc_ratespec *res,
        res->linklayer = (r->linklayer & TC_LINKLAYER_MASK);
 }
 
+struct psched_pktrate {
+       u64     rate_pkts_ps; /* packets per second */
+       u32     mult;
+       u8      shift;
+};
+
+static inline u64 psched_pkt2t_ns(const struct psched_pktrate *r,
+                                 unsigned int pkt_num)
+{
+       return ((u64)pkt_num * r->mult) >> r->shift;
+}
+
+void psched_ppscfg_precompute(struct psched_pktrate *r, u64 pktrate64);
+
 /* Mini Qdisc serves for specific needs of ingress/clsact Qdisc.
  * The fast path only needs to access filter list and to update stats
  */