xdp forward issue
team lnx <[email protected]> Tue, 6 Dec 2022 08:43:33 -0800
| Newsgroups | org.kernel.vger.xdp-newbies |
|---|---|
| Message-ID | <CAOLRUnAmtz3yP=sD7zmDip1d79UOWeJmt96gVOUF_xvJy64T2w@mail.gmail.com> |
Hello,
I am a beginner for xdp and following is the setup
3rd party Board - (64 bit arch): This has 2 ethernet interfaces
supporting XDP (v0 and v1)
Host machine: Ubuntu
step 1: 3rd party Board <-----connected over ethernet (v0) ------> Host - Ubuntu
step 2: echo "1" > /proc/sys/net/ipv4/ip_forward
step 3: Assign static ip address for v0 and v1
step 4: run: xdp_fwd -D v0 v1 on 3rd party Board
step 5: start ping from host to v0 of 3rd party Board with expectation
of forwarding from v0 to v1
Observation : In the above experiment I see xdp_fwd has a return code
always set to XDP_PASS and when I traced it found that below
conditions is the reason
in net/core/filter.c
if (res.type != RTN_UNICAST) {
return BPF_FIB_LKUP_RET_NOT_FWDED;
}
1. Could you please help in understanding the reason behind this ?
2. Once #1 is resolved, do we need to add manually arp table/neighbor
information as well ?
Thanks!