summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorCong Wang <xiyou.wangcong@gmail.com>2013-11-20 05:10:04 (GMT)
committerThomas Graf <tgraf@suug.ch>2013-11-22 09:13:39 (GMT)
commitd969a19d9f57cc8f52984e4bc6e5e69eb9dcfa9f (patch)
tree1b1c67b1dc37c9a2e992a315487f823f59df5080 /include
parent3ddecb36ca3f1d3d0b483e0f8dd724ce1af1b0d5 (diff)
downloadlibnl-d969a19d9f57cc8f52984e4bc6e5e69eb9dcfa9f.zip
libnl-d969a19d9f57cc8f52984e4bc6e5e69eb9dcfa9f.tar.gz
libnl-d969a19d9f57cc8f52984e4bc6e5e69eb9dcfa9f.tar.bz2
add fq_codel qdisc
Cc: Thomas Graf <tgraf@suug.ch> Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com> Signed-off-by: Thomas Graf <tgraf@suug.ch>
Diffstat (limited to 'include')
-rw-r--r--include/Makefile.am1
-rw-r--r--include/linux/pkt_sched.h15
-rw-r--r--include/netlink-private/types.h11
-rw-r--r--include/netlink/route/qdisc/fq_codel.h44
4 files changed, 71 insertions, 0 deletions
diff --git a/include/Makefile.am b/include/Makefile.am
index 8cf5179..32f872f 100644
--- a/include/Makefile.am
+++ b/include/Makefile.am
@@ -63,6 +63,7 @@ nobase_libnlinclude_HEADERS = \
netlink/route/qdisc/sfq.h \
netlink/route/qdisc/tbf.h \
netlink/route/qdisc/plug.h \
+ netlink/route/qdisc/fq_codel.h \
netlink/route/addr.h \
netlink/route/class.h \
netlink/route/classifier.h \
diff --git a/include/linux/pkt_sched.h b/include/linux/pkt_sched.h
index 7ccc1fd..a0837a0 100644
--- a/include/linux/pkt_sched.h
+++ b/include/linux/pkt_sched.h
@@ -462,6 +462,21 @@ enum {
#define TCA_DSMARK_MAX (__TCA_DSMARK_MAX - 1)
+/* fq_codel section */
+
+enum {
+ TCA_FQ_CODEL_UNSPEC,
+ TCA_FQ_CODEL_TARGET,
+ TCA_FQ_CODEL_LIMIT,
+ TCA_FQ_CODEL_INTERVAL,
+ TCA_FQ_CODEL_ECN,
+ TCA_FQ_CODEL_FLOWS,
+ TCA_FQ_CODEL_QUANTUM,
+ __TCA_FQ_CODEL_MAX
+};
+
+#define TCA_FQ_CODEL_MAX (__TCA_FQ_CODEL_MAX - 1)
+
/* ATM section */
enum {
diff --git a/include/netlink-private/types.h b/include/netlink-private/types.h
index 4d997cd..59e8402 100644
--- a/include/netlink-private/types.h
+++ b/include/netlink-private/types.h
@@ -710,6 +710,17 @@ struct rtnl_plug
uint32_t limit;
};
+struct rtnl_fq_codel
+{
+ int fq_limit;
+ uint32_t fq_target;
+ uint32_t fq_interval;
+ int fq_flows;
+ uint32_t fq_quantum;
+ int fq_ecn;
+ uint32_t fq_mask;
+};
+
struct flnl_request
{
NLHDR_COMMON
diff --git a/include/netlink/route/qdisc/fq_codel.h b/include/netlink/route/qdisc/fq_codel.h
new file mode 100644
index 0000000..d2c3d25
--- /dev/null
+++ b/include/netlink/route/qdisc/fq_codel.h
@@ -0,0 +1,44 @@
+/*
+ * netlink/route/sch/fq_codel.h fq_codel
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation version 2.1
+ * of the License.
+ *
+ * Copyright (c) 2013 Cong Wang <xiyou.wangcong@gmail.com>
+ */
+
+#ifndef NETLINK_FQ_CODEL_H_
+#define NETLINK_FQ_CODEL_H_
+
+#include <netlink/netlink.h>
+#include <netlink/route/qdisc.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+extern int rtnl_qdisc_fq_codel_set_limit(struct rtnl_qdisc *, int);
+extern int rtnl_qdisc_fq_codel_get_limit(struct rtnl_qdisc *);
+
+extern int rtnl_qdisc_fq_codel_set_target(struct rtnl_qdisc *, uint32_t);
+extern uint32_t rtnl_qdisc_fq_codel_get_target(struct rtnl_qdisc *);
+
+extern int rtnl_qdisc_fq_codel_set_interval(struct rtnl_qdisc *, uint32_t);
+extern uint32_t rtnl_qdisc_fq_codel_get_interval(struct rtnl_qdisc *);
+
+extern int rtnl_qdisc_fq_codel_set_quantum(struct rtnl_qdisc *, uint32_t);
+extern uint32_t rtnl_qdisc_fq_codel_get_quantum(struct rtnl_qdisc *);
+
+extern int rtnl_qdisc_fq_codel_set_flows(struct rtnl_qdisc *, int);
+extern int rtnl_qdisc_fq_codel_get_flows(struct rtnl_qdisc *);
+
+extern int rtnl_qdisc_fq_codel_set_ecn(struct rtnl_qdisc *, int);
+extern int rtnl_qdisc_fq_codel_get_ecn(struct rtnl_qdisc *);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif