From: "Toke Høiland-Jørgensen" <toke@redhat.com>
To: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
Cc: maharishi bhargava <bhargavamaharishi@gmail.com>,
xdp-newbies@vger.kernel.org
Subject: Re: XDP_REDIRECT with xsks_map and dev_map
Date: Wed, 03 Jun 2020 13:07:05 +0200 [thread overview]
Message-ID: <87ftbcl86e.fsf@toke.dk> (raw)
In-Reply-To: <20200603104833.GA14391@ranger.igk.intel.com>
Maciej Fijalkowski <maciej.fijalkowski@intel.com> writes:
> On Wed, Jun 03, 2020 at 12:49:25PM +0200, Toke Høiland-Jørgensen wrote:
>> 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...
>
> Isn't the case here that either xsk_map or dev_map consumes the frame and
> therefore the latter doesn't see it? so cloning might be needed here?
Yeah, certainly you can't redirect *the same packet* to both xsk_map and
devmap - but that wasn't what I understood was the use case here?
-Toke
next prev parent reply other threads:[~2020-06-03 11:07 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
2020-06-03 10:48 ` Maciej Fijalkowski
2020-06-03 11:07 ` Toke Høiland-Jørgensen [this message]
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=87ftbcl86e.fsf@toke.dk \
--to=toke@redhat.com \
--cc=bhargavamaharishi@gmail.com \
--cc=maciej.fijalkowski@intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.