Re: bpf_fib_lookup VLAN

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 4/16/21 5:03 AM, Konrad Zemek wrote:
> So both vlan fields in the output struct bpf_fib_lookup are always zero. I
> haven't seen this commented on anywhere, including the discussion around
> introducing bpf_fib_lookup, so I assume it's an accidental oversight.

The uapi was setup to cover the use case, but VLANs are not supported at
the moment.

> 
> Do you have any proposals for a workaround? Right now I'm thinking of
> creating a BPF map that would map ifindex->vlan, populated in the userspace
> - but that assumes the output (struct bpf_fib_lookup*)->ifindex will be an
> index of the vlan device and not the physical device the vlan is attached
> on, which I'm not sure is the case yet.
> 

vlan netdevices do not support XDP redirect.

It's not a trivial problem to handle VLANs or stacked devices in
general. I have working code here:

https://github.com/dsahern/linux/commits/bpf/mpls-vlan-fwd

but it is not ready for submitting upstream yet. The use case and
related ones need more work.



[Index of Archives]     [Linux Networking Development]     [Fedora Linux Users]     [Linux SCTP]     [DCCP]     [Gimp]     [Yosemite Campsites]

  Powered by Linux