Re: [RFC PATCH net-next V2 0/6] XDP rx handler

From: David Ahern
Date: Fri Aug 17 2018 - 17:15:56 EST


On 8/15/18 9:34 PM, Jason Wang wrote:
> I may miss something but BPF forbids loop. Without a loop how can we
> make sure all stacked devices is enumerated correctly without knowing
> the topology in advance?

netdev_for_each_upper_dev_rcu

BPF helpers allow programs to do lookups in kernel tables, in this case
the ability to find an upper device that would receive the packet.