Skip to content

Commit

Permalink
Ingress mode can now be configured.
Browse files Browse the repository at this point in the history
  • Loading branch information
chromi committed Apr 4, 2017
1 parent 17ee7e7 commit 85aeee2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions pkt_sched.h
Expand Up @@ -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)
Expand Down
7 changes: 7 additions & 0 deletions sch_cake.c
Expand Up @@ -1801,6 +1801,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]);

Expand Down

0 comments on commit 85aeee2

Please sign in to comment.