diff --git a/codel5.h b/codel5.h index e3fc94c..eb90239 100644 --- a/codel5.h +++ b/codel5.h @@ -62,7 +62,8 @@ #include "codel5_compat.h" #else #define codel_stats_copy_queue(a, b, c, d) gnet_stats_copy_queue(a, b, c, d) -#define codel_watchdog_schedule_ns(a, b, c) qdisc_watchdog_schedule_ns(a, b, c) +// #define codel_watchdog_schedule_ns(a, b, c) qdisc_watchdog_schedule_ns(a, b, c) +#define codel_watchdog_schedule_ns(a, b, c) qdisc_watchdog_schedule_ns(a, b) #endif diff --git a/sch_cake.c b/sch_cake.c index eae532d..e08fa91 100644 --- a/sch_cake.c +++ b/sch_cake.c @@ -318,7 +318,7 @@ cake_hash(struct cake_tin_data *q, const struct sk_buff *skb, int flow_mode) host_keys.ports.ports = 0; host_keys.basic.ip_proto = 0; host_keys.keyid.keyid = 0; - host_keys.tags.vlan_id = 0; + // host_keys.tags.vlan_id = 0; host_keys.tags.flow_label = 0; switch (host_keys.control.addr_type) { @@ -650,7 +650,9 @@ static inline u32 cake_get_diffserv(struct sk_buff *skb) static void cake_reconfigure(struct Qdisc *sch); -static s32 cake_enqueue(struct sk_buff *skb, struct Qdisc *sch) +// static s32 cake_enqueue(struct sk_buff *skb, struct Qdisc *sch) +static s32 cake_enqueue(struct sk_buff *skb, struct Qdisc *sch, + struct sk_buff **to_free) { struct cake_sched_data *q = qdisc_priv(sch); u32 idx, tin; @@ -694,7 +696,7 @@ static s32 cake_enqueue(struct sk_buff *skb, struct Qdisc *sch) segs = skb_gso_segment(skb, features & ~NETIF_F_GSO_MASK); if (IS_ERR_OR_NULL(segs)) - return qdisc_reshape_fail(skb, sch); + return qdisc_drop(skb, sch, to_free); while (segs) { nskb = segs->next; @@ -859,8 +861,7 @@ begin: /* global hard shaper */ if (q->time_next_packet > now) { sch->qstats.overlimits++; - codel_watchdog_schedule_ns(&q->watchdog, q->time_next_packet, - true); + qdisc_watchdog_schedule_ns(&q->watchdog, q->time_next_packet); return NULL; } @@ -999,7 +1000,7 @@ retry: /* drop this packet, get another one */ b->tin_dropped++; qdisc_tree_reduce_backlog(sch, 1, qdisc_pkt_len(skb)); - qdisc_drop(skb, sch); + __qdisc_drop(skb, NULL); } b->tin_ecn_mark += !!flow->cvars.ecn_marked; @@ -1813,7 +1814,7 @@ static struct Qdisc_ops cake_qdisc_ops __read_mostly = { .enqueue = cake_enqueue, .dequeue = cake_dequeue, .peek = qdisc_peek_dequeued, - .drop = cake_drop, + // .drop = cake_drop, .init = cake_init, .reset = cake_reset, .destroy = cake_destroy,