XDP-Newbies Archive mirror
 help / color / mirror / Atom feed
From: "Toke Høiland-Jørgensen" <toke@redhat.com>
To: Sophia Yoo <sy6@princeton.edu>
Cc: xdp-newbies@vger.kernel.org
Subject: Re: XDP_REDIRECT not working in XDP_DRV_MODE with Intel xgbe driver
Date: Tue, 15 Feb 2022 19:53:59 +0100	[thread overview]
Message-ID: <87k0dw55bs.fsf@toke.dk> (raw)
In-Reply-To: <CANLN0e7=Z8rHxmB5WEs4jFdaQ8sL2n_ckE-wcyURnfQHvgo45w@mail.gmail.com>

Sophia Yoo <sy6@princeton.edu> writes:

>> > This is a real use case as part of a larger design I am working on.
>> > However, given that redirect from TC egress to XDP_DRV_MODE ingress
>> > fundamentally doesn't work, I am rethinking other options to the
>> > design. Alternatively, it seems that support for XDP_REDIRECT from
>> > egress to ingress is currently in the works, although I don't believe
>> > the patch has yet been applied to the mainstream kernel.
>>
>> Huh, really? Haven't seen that, got a link?
>
> This is where I saw the discussion for adding XDP support in the
> egress path https://lwn.net/Articles/818591/, which if I am
> understanding correctly is also proposing to add the XDP_REDIRECT
> support on egress.

Ah, right, that series. There was extensive discussion on a later
version:

https://lore.kernel.org/r/20200513014607.40418-1-dsahern@kernel.org

we ended up dropping it in favour of having programs in devmap entries.
So that effort is abandoned, and I don't think you'll get very far
experimenting with that series.

> (Also, for completeness sake, this is the man page
> for bpf_redirect() that says currently XDP only supports redirection
> from ingress to egress, and does not have egress to ingress
> redirection. https://man7.org/linux/man-pages/man7/bpf-helpers.7.html)
> Do you have any insight into whether/when this XDP_REDIRECT
> functionality on egress will be added to the kernel?

It may happen eventually (there are use cases for some kind of egress
hook), but whether it will end up covering data coming from the host (as
opposed to XDP-forwarded traffic) is less certain, cf the discussion I
linked above... As for a timeline, just as soon as someone sits down and
adds it :)

-Toke


  reply	other threads:[~2022-02-15 18:54 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-14 18:10 XDP_REDIRECT not working in XDP_DRV_MODE with Intel xgbe driver Sophia Yoo
2022-02-14 18:28 ` Toke Høiland-Jørgensen
2022-02-14 19:38   ` Sophia Yoo
2022-02-14 22:28     ` Toke Høiland-Jørgensen
2022-02-15 14:59       ` Sophia Yoo
2022-02-15 15:13         ` Toke Høiland-Jørgensen
2022-02-15 16:15           ` Sophia Yoo
2022-02-15 18:53             ` Toke Høiland-Jørgensen [this message]
2022-02-15 10:04 ` Jesper Dangaard Brouer
2022-02-15 16:27   ` Sophia Yoo

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=87k0dw55bs.fsf@toke.dk \
    --to=toke@redhat.com \
    --cc=sy6@princeton.edu \
    --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 read-only IMAP folder(s) and NNTP newsgroup(s).