You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/29-sockops/README_en.md
+15-4Lines changed: 15 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -189,24 +189,35 @@ $ sudo bpftool prog show
189
189
xlated 304B jited 233B memlock 4096B map_ids 58
190
190
```
191
191
192
-
### Running the iperf3 Server
192
+
### Test with iperf3 or curl
193
+
194
+
See <https://iperf.fr/> to install iperf3.
195
+
196
+
Running the iperf3 Server:
193
197
194
198
```shell
195
199
iperf3 -s -p 5001
196
200
```
197
201
198
-
### Running the iperf3 Client
202
+
Running the iperf3 Client:
199
203
200
204
```shell
201
205
iperf3 -c 127.0.0.1 -t 10 -l 64k -p 5001
202
206
```
203
207
208
+
Or you can use curl and python:
209
+
210
+
```sh
211
+
python3 -m http.server
212
+
curl http://0.0.0.0:8000/
213
+
```
214
+
204
215
### Collecting Traces
205
216
206
217
Check the `sock_ops` trace for local connection establishments.
207
218
208
219
```console
209
-
$ ./trace_bpf_output.sh
220
+
$ ./trace_bpf_output.sh# which is basically sudo cat /sys/kernel/debug/tracing/trace_pipe
210
221
iperf3-9516 [001] .... 22500.634108: 0: <<< ipv4 op = 4, port 18583 --> 4135
211
222
iperf3-9516 [001] ..s1 22500.634137: 0: <<< ipv4 op = 5, port 4135 --> 18583
212
223
iperf3-9516 [001] .... 22500.634523: 0: <<< ipv4 op = 4, port 19095 --> 4135
@@ -218,7 +229,7 @@ When the connection is established between `iperf3 -c` and the server, you shoul
218
229
Furthermore, when `sk_msg` takes effect, you should observe that when capturing local traffic on the loopback interface using tcpdump, only the three-way handshake and four-way termination traffic are captured, and the actual data flow of iperf is not captured. If the iperf data flow is captured, then the eBPF programs may not have been attached correctly.
219
230
220
231
```console
221
-
$ ./trace_lo_traffic.sh #which is basically sudo cat /sys/kernel/debug/tracing/trace_pipe
0 commit comments