Skip to contentSkip to conversation

Sending A Separate Packet Out The TX Path In XDP

DISCUSSION Christian Deacon 2 participants 4 messages Apr 27, 2021 – Apr 29, 2021

lore
Share & tools
lore
#0 lore raw

Hey everyone,

I had a quick question. Is it possible to send a packet separate from the original out of the TX path within an XDP program? I would imagine this isn't possible, but I just wanted to make sure.

If this isn't possible within the XDP program itself, is it possible to do this with AF_XDP sockets or can AF_XDP sockets only handle packets redirected via the fast-path XDP creates? I wasn't sure if I'd need to make another Linux socket inside of the AF_XDP program in this case to send a separate packet out.

Any help is highly appreciated and thank you for your time.

#1 lore raw
Quoted 6 lines · Christian Deacon

Hey everyone,

I had a quick question. Is it possible to send a packet separate from the original out of the TX path within an XDP program? I would imagine this isn't possible, but I just wanted to make sure.

Not from within XDP, no...

Quoted 5 lines

If this isn't possible within the XDP program itself, is it possible to do this with AF_XDP sockets or can AF_XDP sockets only handle packets redirected via the fast-path XDP creates? I wasn't sure if I'd need to make another Linux socket inside of the AF_XDP program in this case to send a separate packet out.

...but AF_XDP sockets can send whatever you want :)

-Toke

#2 lore raw

Hey Toke,

That makes sense! I'm going to look into using AF_XDP sockets to achieve this.

As always, thank you for all your help!

Quoted 19 lines · Toke Høiland-Jørgensen
Quoted 6 lines · Christian Deacon

Hey everyone,

I had a quick question. Is it possible to send a packet separate from the original out of the TX path within an XDP program? I would imagine this isn't possible, but I just wanted to make sure.

Not from within XDP, no...

Quoted 5 lines

If this isn't possible within the XDP program itself, is it possible to do this with AF_XDP sockets or can AF_XDP sockets only handle packets redirected via the fast-path XDP creates? I wasn't sure if I'd need to make another Linux socket inside of the AF_XDP program in this case to send a separate packet out.

...but AF_XDP sockets can send whatever you want :)

-Toke

#3 lore raw
Quoted 8 lines · Christian Deacon

Hey Toke,

That makes sense! I'm going to look into using AF_XDP sockets to achieve this.

As always, thank you for all your help!

You're welcome! :)

-Toke