Skip to content
Permalink
Browse files

Ingress mode can now be configured.

  • Loading branch information...
chromi authored and ldir-EDB0 committed Apr 4, 2017
1 parent 4abc443 commit 0849336a14ea4e0648e345b9c2ba2d9893d703a1
Showing with 8 additions and 0 deletions.
  1. +1 −0 pkt_sched.h
  2. +7 −0 sch_cake.c
@@ -867,6 +867,7 @@ enum {
TCA_CAKE_ETHERNET,
TCA_CAKE_WASH,
TCA_CAKE_MPU,
TCA_CAKE_INGRESS,
__TCA_CAKE_MAX
};
#define TCA_CAKE_MAX (__TCA_CAKE_MAX - 1)
@@ -1771,6 +1771,13 @@ static int cake_change(struct Qdisc *sch, struct nlattr *opt)
q->rate_flags &= ~CAKE_FLAG_AUTORATE_INGRESS;
}

if (tb[TCA_CAKE_INGRESS]) {
if (!!nla_get_u32(tb[TCA_CAKE_INGRESS]))
q->rate_flags |= CAKE_FLAG_INGRESS;
else
q->rate_flags &= ~CAKE_FLAG_INGRESS;
}

if (tb[TCA_CAKE_MEMORY])
q->buffer_config_limit = nla_get_s32(tb[TCA_CAKE_MEMORY]);

0 comments on commit 0849336

Please sign in to comment.
You can’t perform that action at this time.