libnl 3.7.0
|
Queue traffic until an explicit release command. More...
Attribute Modification | |
int | rtnl_qdisc_plug_buffer (struct rtnl_qdisc *qdisc) |
Insert a plug into the qdisc and buffer any incoming network traffic. More... | |
int | rtnl_qdisc_plug_release_one (struct rtnl_qdisc *qdisc) |
Unplug the qdisc, releasing packets from queue head to the last complete buffer, while new traffic continues to be buffered. More... | |
int | rtnl_qdisc_plug_release_indefinite (struct rtnl_qdisc *qdisc) |
Indefinitely unplug the qdisc, releasing all packets. More... | |
int | rtnl_qdisc_plug_set_limit (struct rtnl_qdisc *qdisc, int limit) |
Set limit of PLUG qdisc. More... | |
Queue traffic until an explicit release command.
There are two ways to use this qdisc:
For network output buffering (a.k.a output commit) functionality. Output commit property is commonly used by applications using checkpoint based fault-tolerance to ensure that the checkpoint from which a system is being restored is consistent w.r.t outside world.
Consider for e.g. Remus - a Virtual Machine checkpointing system, wherein a VM is checkpointed, say every 50ms. The checkpoint is replicated asynchronously to the backup host, while the VM continues executing the next epoch speculatively.
The following is a typical sequence of output buffer operations: 1.At epoch i, start_buffer(i)
State of the queue, when used for network output buffering:
plug(i+1) plug(i) head
---------------—+-----------------—+-------------—> | | | | pkts_current_epoch| pkts_last_epoch |pkts_to_release --------------—>|<-----—+------—>|+------------—> v v
int rtnl_qdisc_plug_buffer | ( | struct rtnl_qdisc * | qdisc | ) |
Insert a plug into the qdisc and buffer any incoming network traffic.
qdisc | PLUG qdisc to be modified. |
Definition at line 88 of file plug.c.
References rtnl_tc_data(), and TC_CAST.
int rtnl_qdisc_plug_release_one | ( | struct rtnl_qdisc * | qdisc | ) |
Unplug the qdisc, releasing packets from queue head to the last complete buffer, while new traffic continues to be buffered.
qdisc | PLUG qdisc to be modified. |
Definition at line 105 of file plug.c.
References rtnl_tc_data(), and TC_CAST.
int rtnl_qdisc_plug_release_indefinite | ( | struct rtnl_qdisc * | qdisc | ) |
Indefinitely unplug the qdisc, releasing all packets.
Network traffic will not be buffered until the next buffer command is issued.
qdisc | PLUG qdisc to be modified. |
Definition at line 122 of file plug.c.
References rtnl_tc_data(), and TC_CAST.
int rtnl_qdisc_plug_set_limit | ( | struct rtnl_qdisc * | qdisc, |
int | limit | ||
) |
Set limit of PLUG qdisc.
qdisc | PLUG qdisc to be modified. |
limit | New limit. |
Definition at line 139 of file plug.c.
References rtnl_tc_data(), and TC_CAST.