From: "Toke Høiland-Jørgensen" <toke@redhat.com>
To: maharishi bhargava <bhargavamaharishi@gmail.com>
Cc: xdp-newbies@vger.kernel.org
Subject: Re: XDP_REDIRECT with xsks_map and dev_map
Date: Wed, 03 Jun 2020 12:49:25 +0200 [thread overview]
Message-ID: <87lfl4l8zu.fsf@toke.dk> (raw)
In-Reply-To: <CA+Jwd2xnb8Nuc6Y2V=04fBa2bXfaMy1FPyK8CsFnOkqyxrtEwg@mail.gmail.com>
maharishi bhargava <bhargavamaharishi@gmail.com> writes:
> On Tue, Jun 2, 2020 at 9:31 PM Toke Høiland-Jørgensen <toke@redhat.com> wrote:
>>
>> maharishi bhargava <bhargavamaharishi@gmail.com> writes:
>>
>> > On Tue 2 Jun, 2020, 14:31 Toke Høiland-Jørgensen, <toke@redhat.com> wrote:
>> >>
>> >> maharishi bhargava <bhargavamaharishi@gmail.com> 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.
I thought you said you were seeing the problem when only redirecting to
a devmap? So why does the xsk_map code impact this? I think you may have
to share some code...
Also, what does xdp_monitor say?
-Toke
next prev parent reply other threads:[~2020-06-03 10:49 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-01 7:50 XDP_REDIRECT with xsks_map and dev_map maharishi bhargava
2020-06-02 9:01 ` Toke Høiland-Jørgensen
2020-06-02 15:15 ` maharishi bhargava
2020-06-02 16:01 ` Toke Høiland-Jørgensen
2020-06-02 18:23 ` maharishi bhargava
2020-06-03 10:49 ` Toke Høiland-Jørgensen [this message]
2020-06-03 10:48 ` Maciej Fijalkowski
2020-06-03 11:07 ` Toke Høiland-Jørgensen
2020-06-03 11:07 ` Maciej Fijalkowski
2020-06-03 13:43 ` maharishi bhargava
2020-06-03 15:09 ` Toke Høiland-Jørgensen
2020-06-04 19:52 ` maharishi bhargava
2020-06-04 22:56 ` Toke Høiland-Jørgensen
2020-06-05 11:35 ` Magnus Karlsson
2020-06-05 11:31 ` Magnus Karlsson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87lfl4l8zu.fsf@toke.dk \
--to=toke@redhat.com \
--cc=bhargavamaharishi@gmail.com \
--cc=xdp-newbies@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).