Using P4 and RDMA to collect telemetry data
Rutger Beltman, Silke Knossen, Joseph Hill, Paola Grosso · 2020
Telemetry data can be carried within network packets as they transit through the network. This in-band telemetry requires in turn to have efficient means for the collection and processing of these data. We show how the P4 language can be used to extract telemetry data from incoming packets, as it allows for efficient controlling of the data plane of network devices. Furthermore, we exploit remote direct memory access (RDMA) as this allows for direct placement of data into the memory of an external machine. We implemented the RDMA over Converged Ethernet (RoCE) protocol in a switch using a P4 program. The program keeps the state of the variables required to perform a write-only operation from the switch to a collector machine. The telemetry data is stored on persistent storage in the machine using memory mapping. Experiments with our implementation show that the telemetry data is saved to the designated addresses. We were able to achieve a rate of around 20 million packets per second without any packet loss.