diff options
author | Thomas Graf <tgraf@suug.ch> | 2010-10-26 10:54:33 (GMT) |
---|---|---|
committer | Thomas Graf <tgraf@suug.ch> | 2010-10-26 10:54:33 (GMT) |
commit | 4c6d1c5dfb4f7e4a9392895f3da709b55c970e02 (patch) | |
tree | 9303851dcc87e2e3f9c25805ccf24f4a543fe23d /lib/cli | |
parent | b9d965b01b42103389b2a2c0cc3133293447a64d (diff) | |
download | libnl-4c6d1c5dfb4f7e4a9392895f3da709b55c970e02.zip libnl-4c6d1c5dfb4f7e4a9392895f3da709b55c970e02.tar.gz libnl-4c6d1c5dfb4f7e4a9392895f3da709b55c970e02.tar.bz2 |
Unified TC attributes interface
So far all common tc atttributes were accessed via specific functions, i.e.
rtnl_class_set_parent(), rtnl_qdisc_set_parent(), rtnl_cls_set_parent()
which implied a lot of code duplication. Since all tc objects are derived
from struct rtnl_tc and these common attributes are already stored in there
this patch removes all type specific functions and makes rtnl_tc_* attribute
functions public.
rtnl_qdisc_set_parent(qdisc, 10);
becomes:
rtnl_tc_set_parent((struct rtnl_tc *) qdisc, 10);
This patch also adds the following new attributes to tc objects therefore
removing them as tc specific attributes:
- mtu
- mpu
- overhead
This allows for the rate table calculations to be unified as well taking into
account the new kernel behavior to take care of overhead automatically.
Diffstat (limited to 'lib/cli')
-rw-r--r-- | lib/cli/qdisc/htb.c | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/lib/cli/qdisc/htb.c b/lib/cli/qdisc/htb.c index 6b913a8..febf429 100644 --- a/lib/cli/qdisc/htb.c +++ b/lib/cli/qdisc/htb.c @@ -73,9 +73,6 @@ static void print_class_usage(void) " --rate=RATE Rate limit.\n" " --ceil=RATE Rate limit while borrowing (default: equal to --rate).\n" " --prio=PRIO Priority, lower is served first (default: 0).\n" -" --mtu=MTU Maximum packet size on the link (default: 1600).\n" -" --mpu=MPU Minimum packet size on the link (default: 0).\n" -" --overhead=OVERHEAD Overhead in bytes per packet (default: 0).\n" " --quantum=SIZE Amount of bytes to serve at once (default: rate/r2q).\n" " --burst=SIZE Max charge size of rate burst buffer (default: auto).\n" " --cburst=SIZE Max charge size of ceil rate burst buffer (default: auto)\n" @@ -96,9 +93,6 @@ static void htb_parse_class_argv(struct rtnl_class *class, int argc, char **argv ARG_QUANTUM = 258, ARG_CEIL, ARG_PRIO, - ARG_MTU, - ARG_MPU, - ARG_OVERHEAD, ARG_BURST, ARG_CBURST, }; @@ -108,9 +102,6 @@ static void htb_parse_class_argv(struct rtnl_class *class, int argc, char **argv { "quantum", 1, 0, ARG_QUANTUM }, { "ceil", 1, 0, ARG_CEIL }, { "prio", 1, 0, ARG_PRIO }, - { "mtu", 1, 0, ARG_MTU }, - { "mpu", 1, 0, ARG_MPU }, - { "overhead", 1, 0, ARG_OVERHEAD }, { "burst", 1, 0, ARG_BURST }, { "cburst", 1, 0, ARG_CBURST }, { 0, 0, 0, 0 } @@ -145,18 +136,6 @@ static void htb_parse_class_argv(struct rtnl_class *class, int argc, char **argv rtnl_htb_set_ceil(class, rate); break; - case ARG_MTU: - rtnl_htb_set_mtu(class, nl_cli_parse_u32(optarg)); - break; - - case ARG_MPU: - rtnl_htb_set_mpu(class, nl_cli_parse_u32(optarg)); - break; - - case ARG_OVERHEAD: - rtnl_htb_set_overhead(class, nl_cli_parse_u32(optarg)); - break; - case ARG_PRIO: rtnl_htb_set_prio(class, nl_cli_parse_u32(optarg)); break; |