History

batman-adv: throughput meter implementation

The throughput meter module is a simple, kernel-space replacement for throughtput measurements tool like iperf and netperf. It is intended to approximate TCP behaviour. It is invoked through batctl: the protocol is connection oriented, with cumulative acknowledgment and a dynamic-size sliding window. The test *can* be interrupted by batctl. A receiver side timeout avoids unlimited waitings for sender packets: after one second of inactivity, the receiver abort the ongoing test. Based on a prototype from Edo Monticelli <montik@autistici.org>

Antonio Quartulli committed 10 years ago

Commit 33a3bb41 parent f50ca9513 files · +2021 −10Browse files

Showing the changes to include/uapi (1 of 13 files). Show all

Unified · Split

include/uapi/linux/batman_adv.h+43−0
@@ -20,6 +20,8 @@ · 19 unmodified lines
20 20
21#define BATADV_NL_NAME "batadv"21#define BATADV_NL_NAME "batadv"
22 22
23#define BATADV_NL_MCAST_GROUP_TPMETER "tpmeter"
24
23/**25/**
24 * enum batadv_nl_attrs - batman-adv netlink attributes26 * enum batadv_nl_attrs - batman-adv netlink attributes
25 *27 *
@@ -32,6 +34,12 @@ · 6 unmodified lines
32 * @BATADV_ATTR_HARD_IFINDEX: index of the non-batman-adv interface34 * @BATADV_ATTR_HARD_IFINDEX: index of the non-batman-adv interface
33 * @BATADV_ATTR_HARD_IFNAME: name of the non-batman-adv interface35 * @BATADV_ATTR_HARD_IFNAME: name of the non-batman-adv interface
34 * @BATADV_ATTR_HARD_ADDRESS: mac address of the non-batman-adv interface36 * @BATADV_ATTR_HARD_ADDRESS: mac address of the non-batman-adv interface
37 * @BATADV_ATTR_ORIG_ADDRESS: originator mac address
38 * @BATADV_ATTR_TPMETER_RESULT: result of run (see batadv_tp_meter_status)
39 * @BATADV_ATTR_TPMETER_TEST_TIME: time (msec) the run took
40 * @BATADV_ATTR_TPMETER_BYTES: amount of acked bytes during run
41 * @BATADV_ATTR_TPMETER_COOKIE: session cookie to match tp_meter session
42 * @BATADV_ATTR_PAD: attribute used for padding for 64-bit alignment
35 * @__BATADV_ATTR_AFTER_LAST: internal use43 * @__BATADV_ATTR_AFTER_LAST: internal use
36 * @NUM_BATADV_ATTR: total number of batadv_nl_attrs available44 * @NUM_BATADV_ATTR: total number of batadv_nl_attrs available
37 * @BATADV_ATTR_MAX: highest attribute number currently defined45 * @BATADV_ATTR_MAX: highest attribute number currently defined
@@ -46,6 +54,12 @@ enum batadv_nl_attrs { · 8 unmodified lines
46 BATADV_ATTR_HARD_IFINDEX,54 BATADV_ATTR_HARD_IFINDEX,
47 BATADV_ATTR_HARD_IFNAME,55 BATADV_ATTR_HARD_IFNAME,
48 BATADV_ATTR_HARD_ADDRESS,56 BATADV_ATTR_HARD_ADDRESS,
57 BATADV_ATTR_ORIG_ADDRESS,
58 BATADV_ATTR_TPMETER_RESULT,
59 BATADV_ATTR_TPMETER_TEST_TIME,
60 BATADV_ATTR_TPMETER_BYTES,
61 BATADV_ATTR_TPMETER_COOKIE,
62 BATADV_ATTR_PAD,
49 /* add attributes above here, update the policy in netlink.c */63 /* add attributes above here, update the policy in netlink.c */
50 __BATADV_ATTR_AFTER_LAST,64 __BATADV_ATTR_AFTER_LAST,
51 NUM_BATADV_ATTR = __BATADV_ATTR_AFTER_LAST,65 NUM_BATADV_ATTR = __BATADV_ATTR_AFTER_LAST,
@@ -57,15 +71,44 @@ enum batadv_nl_attrs { · 5 unmodified lines
57 *71 *
58 * @BATADV_CMD_UNSPEC: unspecified command to catch errors72 * @BATADV_CMD_UNSPEC: unspecified command to catch errors
59 * @BATADV_CMD_GET_MESH_INFO: Query basic information about batman-adv device73 * @BATADV_CMD_GET_MESH_INFO: Query basic information about batman-adv device
74 * @BATADV_CMD_TP_METER: Start a tp meter session
75 * @BATADV_CMD_TP_METER_CANCEL: Cancel a tp meter session
60 * @__BATADV_CMD_AFTER_LAST: internal use76 * @__BATADV_CMD_AFTER_LAST: internal use
61 * @BATADV_CMD_MAX: highest used command number77 * @BATADV_CMD_MAX: highest used command number
62 */78 */
63enum batadv_nl_commands {79enum batadv_nl_commands {
64 BATADV_CMD_UNSPEC,80 BATADV_CMD_UNSPEC,
65 BATADV_CMD_GET_MESH_INFO,81 BATADV_CMD_GET_MESH_INFO,
82 BATADV_CMD_TP_METER,
83 BATADV_CMD_TP_METER_CANCEL,
66 /* add new commands above here */84 /* add new commands above here */
67 __BATADV_CMD_AFTER_LAST,85 __BATADV_CMD_AFTER_LAST,
68 BATADV_CMD_MAX = __BATADV_CMD_AFTER_LAST - 186 BATADV_CMD_MAX = __BATADV_CMD_AFTER_LAST - 1
69};87};
70 88
89/**
90 * enum batadv_tp_meter_reason - reason of a tp meter test run stop
91 * @BATADV_TP_REASON_COMPLETE: sender finished tp run
92 * @BATADV_TP_REASON_CANCEL: sender was stopped during run
93 * @BATADV_TP_REASON_DST_UNREACHABLE: receiver could not be reached or didn't
94 * answer
95 * @BATADV_TP_REASON_RESEND_LIMIT: (unused) sender retry reached limit
96 * @BATADV_TP_REASON_ALREADY_ONGOING: test to or from the same node already
97 * ongoing
98 * @BATADV_TP_REASON_MEMORY_ERROR: test was stopped due to low memory
99 * @BATADV_TP_REASON_CANT_SEND: failed to send via outgoing interface
100 * @BATADV_TP_REASON_TOO_MANY: too many ongoing sessions
101 */
102enum batadv_tp_meter_reason {
103 BATADV_TP_REASON_COMPLETE = 3,
104 BATADV_TP_REASON_CANCEL = 4,
105 /* error status >= 128 */
106 BATADV_TP_REASON_DST_UNREACHABLE = 128,
107 BATADV_TP_REASON_RESEND_LIMIT = 129,
108 BATADV_TP_REASON_ALREADY_ONGOING = 130,
109 BATADV_TP_REASON_MEMORY_ERROR = 131,
110 BATADV_TP_REASON_CANT_SEND = 132,
111 BATADV_TP_REASON_TOO_MANY = 133,
112};
113
71#endif /* _UAPI_LINUX_BATMAN_ADV_H_ */114#endif /* _UAPI_LINUX_BATMAN_ADV_H_ */

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t