Re: xdp forward issue

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


On 12/6/22 9:43 AM, team lnx wrote:
> 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) {
> }
> 1. Could you please help in understanding the reason behind this ?

RTN_LOCAL means delivery to a local process -- ie., nothing to forward
to another device / host.

RTN_MULTICAST and RTN_BROADCAST: broadcast is not supported. Multicast
... I forget how to use that. The fib lookup and xdp_fwd test predates
multicast support

> 2. Once #1 is resolved, do we need to add manually arp table/neighbor
> information as well ?

the xdp_fwd app is a demo. In a production deployment, you will need to
have something manage the neighbor entries for hosts. e.g., look at `ip
neigh ... managed` if you have a new enough kernel.

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

  Powered by Linux