2020-12-11 19:25:35 +01:00
|
|
|
# PPing using XDP and TC-BPF
|
2021-01-26 18:34:23 +01:00
|
|
|
An implementation of the passive ping ([pping](https://github.com/pollere/pping)) utility based on XDP (for ingress) and TC-BPF (for egress)
|
|
|
|
|
|
|
|
## Simple description
|
|
|
|
Passive Ping (PPing) makes use of the TCP Timestamp option to calculate the RTT for TCP traffic passing through.
|
|
|
|
PPing can be used on measure RTTs on end hosts or any device which sees both directions of the TCP flow.
|
|
|
|
|
|
|
|
For outgoing packets, it checks for TCP timestamp TSval in the TCP header. If it finds one it creates a timestamp
|
|
|
|
for when it saw that TSval in a particular flow. On incomming packets it parses the TCP timestamp TSecr (which
|
|
|
|
is the TSval echoed by the receiving host) and checks it has seen any previous outgoing packets with that TCP
|
|
|
|
timestamp. If it has, an RTT is calculated as the difference in time between when it saw an outgoing packet
|
|
|
|
with a TSval, and when it received an incomming packet from the reverse flow with a matching TSecr.
|
|
|
|
|
|
|
|
Note that TCP timestamps may not be unique for every packet in a flow, therefore it only matches the first
|
|
|
|
outgoing packet with a particular TSval with the first incomming packet with a matching TSecr. Duplicate
|
|
|
|
TSval/TSecr are ignored.
|
2020-12-17 18:10:50 +01:00
|
|
|
|
|
|
|
## Planned design
|
|
|
|

|