Re: XDP_REDIRECT with xsks_map and dev_map

maharishi bhargava <[email protected]>
Newsgroups org.kernel.vger.xdp-newbies
Message-ID <CA+Jwd2xnb8Nuc6Y2V=04fBa2bXfaMy1FPyK8CsFnOkqyxrtEwg@mail.gmail.com>
On Tue, Jun 2, 2020 at 9:31 PM Toke Høiland-Jørgensen <[email protected]> wrote:
>
> maharishi bhargava <[email protected]> writes:
>
> > On Tue 2 Jun, 2020, 14:31 Toke Høiland-Jørgensen, <[email protected]> wrote:
> >>
> >> maharishi bhargava <[email protected]> writes:
> >>
> >> > Hi, in my XDP program, I want to redirect some packets using AF_XDP
> >> > and redirect other packets directly from driver space.
> >> > Redirection through AF_XDP works fine, but redirection through dev map
> >> > stops after some packets are processed.
> >>
> >> Do you mean it stops even if you are *only* redirecting to a devmap, or
> >> if you are first redirecting a few packets to AF_XDP, then to devmap?
> >>
> >> Also, which driver(s) are the physical NICs you're redirecting to/from
> >> using, and which kernel version are you on?
> >>
> >> -Toke
> >
> >
> >
> > Currently, I'm trying to redirect packets only using devmap. But also
> > have code for redirection using AF_XDP(only when a given condition is
> > satisfied). A DPDK program is running in userspace which will receive
> > packets from AF_XDP.
>
> Right, so it's just devmap redirect that breaks. What do you mean
> 'redirection stops', exactly? How are you seeing this? Does xdp_monitor
> (from samples/bpf) report any exceptions?
>
> -Toke
>
So, In my setup, there are three systems, Let's Assume A, B, C. System
B is acting as a forwarder between A and C. So I can see the number of
packets received at system C. To be specific, only 1024 packets are
received. If I remove the xsks_map part from the code and don't run
DPDK in userspace. This problem does not occur. Also if I forward all
the packets using AF_XDP, there is no such issue.

- Maharishi
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.