NaNet: A flexible and configurable low-latency NIC for real-time trigger systems based on GPUs