-
Notifications
You must be signed in to change notification settings - Fork 78
/
rrunqueue.hh
47 lines (37 loc) · 1.19 KB
/
rrunqueue.hh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#ifndef CLICK_RRUNQUEUE_HH
#define CLICK_RRUNQUEUE_HH
#include <click/element.hh>
#include <click/task.hh>
CLICK_DECLS
/*
* =c
* RoundRobinUnqueue([BURSTSIZE])
* =s scheduling
* pull-to-push converter
* =d
* Pulls packets from input ports in a round robin fashion, then pushes them
* out the output corresponding to the input that the packet came from. Pulls
* a maximum of BURSTSIZE packets every time it is scheduled. Default
* BURSTSIZE is 1. If BURSTSIZE is 0, pull until nothing comes back.
*
* =a Unqueue, RatedUnqueue, BandwidthRatedUnqueue
*/
class RoundRobinUnqueue : public Element { public:
RoundRobinUnqueue() CLICK_COLD;
~RoundRobinUnqueue() CLICK_COLD;
const char *class_name() const override { return "RoundRobinUnqueue"; }
const char *port_count() const override { return "-/-"; }
const char *processing() const override { return PULL_TO_PUSH; }
int configure(Vector<String> &, ErrorHandler *) CLICK_COLD;
int initialize(ErrorHandler *) CLICK_COLD;
void add_handlers() CLICK_COLD;
bool run_task(Task *);
static String read_param(Element *e, void *) CLICK_COLD;
private:
int _burst;
unsigned _packets;
Task _task;
int _next;
};
CLICK_ENDDECLS
#endif