/*
* Fair Queue
*
- * Copyright (C) 2013 Eric Dumazet <edumazet@google.com>
+ * Copyright (C) 2013-2015 Eric Dumazet <edumazet@google.com>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
fprintf(stderr, " [ quantum BYTES ] [ initial_quantum BYTES ]\n");
fprintf(stderr, " [ maxrate RATE ] [ buckets NUMBER ]\n");
fprintf(stderr, " [ [no]pacing ] [ refill_delay TIME ]\n");
+ fprintf(stderr, " [ orphan_mask MASK]\n");
}
static unsigned int ilog2(unsigned int val)
unsigned int maxrate;
unsigned int defrate;
unsigned int refill_delay;
+ unsigned int orphan_mask;
bool set_plimit = false;
bool set_flow_plimit = false;
bool set_quantum = false;
bool set_maxrate = false;
bool set_defrate = false;
bool set_refill_delay = false;
+ bool set_orphan_mask = false;
int pacing = -1;
struct rtattr *tail;
return -1;
}
set_initial_quantum = true;
+ } else if (strcmp(*argv, "orphan_mask") == 0) {
+ NEXT_ARG();
+ if (get_unsigned(&orphan_mask, *argv, 0)) {
+ fprintf(stderr, "Illegal \"initial_quantum\"\n");
+ return -1;
+ }
+ set_orphan_mask = true;
} else if (strcmp(*argv, "refill_delay") == 0) {
NEXT_ARG();
if (get_time(&refill_delay, *argv)) {
if (set_refill_delay)
addattr_l(n, 1024, TCA_FQ_FLOW_REFILL_DELAY,
&refill_delay, sizeof(refill_delay));
+ if (set_orphan_mask)
+ addattr_l(n, 1024, TCA_FQ_ORPHAN_MASK,
+ &orphan_mask, sizeof(refill_delay));
tail->rta_len = (void *) NLMSG_TAIL(n) - (void *) tail;
return 0;
}
int pacing;
unsigned int rate, quantum;
unsigned int refill_delay;
+ unsigned int orphan_mask;
SPRINT_BUF(b1);
if (opt == NULL)
buckets_log = rta_getattr_u32(tb[TCA_FQ_BUCKETS_LOG]);
fprintf(f, "buckets %u ", 1U << buckets_log);
}
+ if (tb[TCA_FQ_ORPHAN_MASK] &&
+ RTA_PAYLOAD(tb[TCA_FQ_ORPHAN_MASK]) >= sizeof(__u32)) {
+ orphan_mask = rta_getattr_u32(tb[TCA_FQ_ORPHAN_MASK]);
+ fprintf(f, "orphan_mask %u ", orphan_mask);
+ }
if (tb[TCA_FQ_RATE_ENABLE] &&
RTA_PAYLOAD(tb[TCA_FQ_RATE_ENABLE]) >= sizeof(int)) {
pacing = rta_getattr_u32(tb[TCA_FQ_RATE_ENABLE]);