diff options
author | Cong Wang <xiyou.wangcong@gmail.com> | 2014-07-28 22:21:01 (GMT) |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2014-07-30 17:03:56 (GMT) |
commit | cacc24ea66dd268ee6470cc794481d2ccf65041c (patch) | |
tree | 4a8579a8dd632ac6f4331b7254ddff0d705160e2 /include | |
parent | f904fabcb45501cc8ade3d2110536eef3bd2074d (diff) | |
download | libnl-cacc24ea66dd268ee6470cc794481d2ccf65041c.zip libnl-cacc24ea66dd268ee6470cc794481d2ccf65041c.tar.gz libnl-cacc24ea66dd268ee6470cc794481d2ccf65041c.tar.bz2 |
qdisc: add hfsc qdisc support
Cc: Thomas Graf <tgraf@suug.ch>
Cc: Thomas Haller <thaller@redhat.com>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Acked-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: Thomas Haller <thaller@redhat.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/Makefile.am | 1 | ||||
-rw-r--r-- | include/netlink-private/types.h | 14 | ||||
-rw-r--r-- | include/netlink/route/qdisc/hfsc.h | 37 |
3 files changed, 52 insertions, 0 deletions
diff --git a/include/Makefile.am b/include/Makefile.am index 90f647c..74bbd5a 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -70,6 +70,7 @@ nobase_libnlinclude_HEADERS = \ netlink/route/qdisc/tbf.h \ netlink/route/qdisc/plug.h \ netlink/route/qdisc/fq_codel.h \ + netlink/route/qdisc/hfsc.h \ netlink/route/addr.h \ netlink/route/class.h \ netlink/route/classifier.h \ diff --git a/include/netlink-private/types.h b/include/netlink-private/types.h index 10bdaaa..6f3243b 100644 --- a/include/netlink-private/types.h +++ b/include/netlink-private/types.h @@ -721,6 +721,20 @@ struct rtnl_fq_codel uint32_t fq_mask; }; +struct rtnl_hfsc_qdisc +{ + uint32_t qh_defcls; + uint32_t qh_mask; +}; + +struct rtnl_hfsc_class +{ + struct tc_service_curve ch_rsc; + struct tc_service_curve ch_fsc; + struct tc_service_curve ch_usc; + uint32_t ch_mask; +}; + struct flnl_request { NLHDR_COMMON diff --git a/include/netlink/route/qdisc/hfsc.h b/include/netlink/route/qdisc/hfsc.h new file mode 100644 index 0000000..8d34fe5 --- /dev/null +++ b/include/netlink/route/qdisc/hfsc.h @@ -0,0 +1,37 @@ +/* + * netlink/route/sch/hfsc.h HFSC Qdisc + * + * 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) 2014 Cong Wang <xiyou.wangcong@gmail.com> + */ + +#ifndef NETLINK_HFSC_H_ +#define NETLINK_HFSC_H_ + +#include <netlink/netlink.h> +#include <netlink/route/tc.h> +#include <netlink/route/qdisc.h> +#include <netlink/route/class.h> + +#ifdef __cplusplus +extern "C" { +#endif + +extern uint32_t rtnl_qdisc_hfsc_get_defcls(const struct rtnl_qdisc *); +extern int rtnl_qdisc_hfsc_set_defcls(struct rtnl_qdisc *, uint32_t); + +extern int rtnl_class_hfsc_get_rsc(const struct rtnl_class *class, struct tc_service_curve *tsc); +extern int rtnl_class_hfsc_set_rsc(struct rtnl_class *class, const struct tc_service_curve *tsc); +extern int rtnl_class_hfsc_get_fsc(const struct rtnl_class *class, struct tc_service_curve *tsc); +extern int rtnl_class_hfsc_set_fsc(struct rtnl_class *class, const struct tc_service_curve *tsc); +extern int rtnl_class_hfsc_get_usc(const struct rtnl_class *class, struct tc_service_curve *tsc); +extern int rtnl_class_hfsc_set_usc(struct rtnl_class *class, const struct tc_service_curve *tsc); +#ifdef __cplusplus +} +#endif + +#endif |