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
2020
2121 #define BATADV_NL_NAME "batadv"
2222
23+#define BATADV_NL_MCAST_GROUP_TPMETER "tpmeter"
24+
2325 /**
2426 * enum batadv_nl_attrs - batman-adv netlink attributes
2527 *
@@ -32,6 +34,12 @@ · 6 unmodified lines
3234 * @BATADV_ATTR_HARD_IFINDEX: index of the non-batman-adv interface
3335 * @BATADV_ATTR_HARD_IFNAME: name of the non-batman-adv interface
3436 * @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
3543 * @__BATADV_ATTR_AFTER_LAST: internal use
3644 * @NUM_BATADV_ATTR: total number of batadv_nl_attrs available
3745 * @BATADV_ATTR_MAX: highest attribute number currently defined
@@ -46,6 +54,12 @@ enum batadv_nl_attrs { · 8 unmodified lines
4654 BATADV_ATTR_HARD_IFINDEX,
4755 BATADV_ATTR_HARD_IFNAME,
4856 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,
4963 /* add attributes above here, update the policy in netlink.c */
5064 __BATADV_ATTR_AFTER_LAST,
5165 NUM_BATADV_ATTR = __BATADV_ATTR_AFTER_LAST,
@@ -57,15 +71,44 @@ enum batadv_nl_attrs { · 5 unmodified lines
5771 *
5872 * @BATADV_CMD_UNSPEC: unspecified command to catch errors
5973 * @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
6076 * @__BATADV_CMD_AFTER_LAST: internal use
6177 * @BATADV_CMD_MAX: highest used command number
6278 */
6379 enum batadv_nl_commands {
6480 BATADV_CMD_UNSPEC,
6581 BATADV_CMD_GET_MESH_INFO,
82+ BATADV_CMD_TP_METER,
83+ BATADV_CMD_TP_METER_CANCEL,
6684 /* add new commands above here */
6785 __BATADV_CMD_AFTER_LAST,
6886 BATADV_CMD_MAX = __BATADV_CMD_AFTER_LAST - 1
6987 };
7088
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+ */
102+enum 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+
71114 #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