diff options
author | Shriram Rajagopalan <rshriram@cs.ubc.ca> | 2012-02-12 14:53:10 -0800 |
---|---|---|
committer | Thomas Graf <tgraf@redhat.com> | 2012-02-14 12:02:04 +0100 |
commit | a17970b974bb3896f253817f98a9fa6176fcd422 (patch) | |
tree | 030e758db546ae0539a810c8eda3ac3468e5afef /include/netlink | |
parent | a39bb563ab8450d5463540384f4b8abca0d3755e (diff) | |
download | libnl-a17970b974bb3896f253817f98a9fa6176fcd422.tar.gz |
Support plug qdisc - queue traffic until explicit release
The plug qdisc supports two operations - plug and unplug. When the
qdisc receives a plug ("buffer") command via netlink request,
packets arriving henceforth are buffered until a corresponding unplug
command is received. Depending on the type of unplug ("release_one"
or "release_indefinite"), the queue can be unplugged indefinitely or
selectively.
The plug qdisc allows a user to implement network output buffering
(aka output commit), used commonly in checkpoint based fault tolerance
systems. It also supports a general purpose queue plug/unplug
functionality.
The associated kernel module is available in David Miller's net-next
tree, commit: c3059be16c9ef29c05f0876a9df5fea21f29724f
This patch introduces userspace tools and API, to control the qdisc
via netlink messages.
Signed-off-by: Shriram Rajagopalan <rshriram@cs.ubc.ca>
Signed-off-by: Thomas Graf <tgraf@redhat.com>
Diffstat (limited to 'include/netlink')
-rw-r--r-- | include/netlink/route/qdisc/plug.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/include/netlink/route/qdisc/plug.h b/include/netlink/route/qdisc/plug.h new file mode 100644 index 0000000..ffb1a04 --- /dev/null +++ b/include/netlink/route/qdisc/plug.h @@ -0,0 +1,30 @@ +/* + * netlink/route/qdisc/plug.c PLUG 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) 2012 Shriram Rajagopalan <rshriram@cs.ubc.ca> + */ + +#ifndef NETLINK_PLUG_H_ +#define NETLINK_PLUG_H_ + +#include <netlink/netlink.h> + +#ifdef __cplusplus +extern "C" { +#endif + +extern int rtnl_qdisc_plug_set_limit(struct rtnl_qdisc *, int); +extern int rtnl_qdisc_plug_buffer(struct rtnl_qdisc *); +extern int rtnl_qdisc_plug_release_one(struct rtnl_qdisc *); +extern int rtnl_qdisc_plug_release_indefinite(struct rtnl_qdisc *); + +#ifdef __cplusplus +} +#endif + +#endif |