xdp-newbies.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vincent Li <vincent.mc.li@gmail.com>
To: "Toke Høiland-Jørgensen" <toke@redhat.com>
Cc: xdp-newbies@vger.kernel.org
Subject: Re: Redirect packet back to host stack after AF_XDP?
Date: Thu, 15 Dec 2022 10:52:55 -0800	[thread overview]
Message-ID: <CAK3+h2w30SmDn_NYnPO7NWSizqu4deNYB4oRDMSPfxFefNAV_g@mail.gmail.com> (raw)
In-Reply-To: <87len8exfc.fsf@toke.dk>

On Thu, Dec 15, 2022 at 3:09 AM Toke Høiland-Jørgensen <toke@redhat.com> wrote:
>
> Vincent Li <vincent.mc.li@gmail.com> writes:
>
> > On Wed, Dec 14, 2022 at 2:53 PM Toke Høiland-Jørgensen <toke@redhat.com> wrote:
> >>
> >> Vincent Li <vincent.mc.li@gmail.com> writes:
> >>
> >> > Hi,
> >> >
> >> > If I have an user space stack like mTCP works on top of AF_XDP as tcp
> >> > stateful packet filter to drop tcp packet like tcp syn/rst/ack flood
> >> > or other tcp attack, and redirect good tcp packet back to linux host
> >> > stack after mTCP filtering, is that possible?
> >>
> >> Not really, no. You can inject it using regular userspace methods (say,
> >> a TUN device), or using AF_XDP on a veth device. But in both cases the
> >> packet will come in on a different interface, so it's not really
> >> transparent. And performance is not great either.
> >>
> > I see
> >
> >> In general, if you want to filter traffic before passing it on to the
> >> kernel, the best bet is to implement your filtering in BPF and run it as
> >> an XDP program.
> >>
> > I read about this
> > https://eric-keller.github.io/papers/2020/HybridNetworkStack_ieee_nfvsdn2020_slides.pdf,
> > thought that is good idea to run mTCP on top of AF_XDP as  anti DDOS
> > tool
>
> Right, that slide deck seems awfully hand-wavy about how they're getting
> packets back into the kernel, though... I guess you could ask the author
> how they're doing it? :)

I will try :), thanks again!

>
> -Toke
>

  reply	other threads:[~2022-12-15 18:53 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-14 20:49 Redirect packet back to host stack after AF_XDP? Vincent Li
2022-12-14 22:53 ` Toke Høiland-Jørgensen
2022-12-15  1:57   ` Vincent Li
2022-12-15 11:08     ` Toke Høiland-Jørgensen
2022-12-15 18:52       ` Vincent Li [this message]
2022-12-17  2:52   ` Vincent Li
2023-01-02 11:33     ` Toke Høiland-Jørgensen
2023-01-09 21:28       ` Vincent Li
2023-01-10 15:23         ` Toke Høiland-Jørgensen
2023-01-10 16:54           ` Vincent Li
2023-01-10 23:27             ` Toke Høiland-Jørgensen
2023-01-11  0:11               ` Vincent Li

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=CAK3+h2w30SmDn_NYnPO7NWSizqu4deNYB4oRDMSPfxFefNAV_g@mail.gmail.com \
    --to=vincent.mc.li@gmail.com \
    --cc=toke@redhat.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).