All of lore.kernel.org
 help / color / mirror / Atom feed
* Using AF_XDP To Modify Outgoing Packets
@ 2020-03-30 16:11 Christian Deacon
  2020-03-30 16:24 ` David Ahern
  2020-03-30 18:10 ` Jakub Kicinski
  0 siblings, 2 replies; 9+ messages in thread
From: Christian Deacon @ 2020-03-30 16:11 UTC (permalink / raw)
  To: xdp-newbies

Hey everyone,


I am fairly new to XDP and AF_XDP programming. Therefore, I apologize if 
this question sounds silly.


To my understanding, an XDP program cannot process outgoing packets 
since it doesn't support the TX path. However, I read that AF_XDP 
sockets support both receiving and transmitting packets inside the user 
space while achieving zero-copy. I am trying to create a C program that 
modifies outgoing packets on an interface and trying to do this the 
fastest way possible. Unfortunately, I cannot use IPTables for this.


I wanted to know if there is any way to use AF_XDP sockets to modify 
outgoing packets on an interface. I wasn't sure if the AF_XDP sockets 
only support receiving traffic from the XDP program when using the 
redirect function or not.


If this isn't possible, are there any plans to add TX path support into 
XDP in the future? I'm also not sure what else I can do to achieve fast 
packet processing for this. I looked into using standard AF_PACKET 
sockets. However, since that makes a copy of the packet from the kernel, 
I'd assume that's pretty slow and I'd have to find a way to block the 
original packets (probably doing something with IPTables). I might also 
look into DPDK, but I want to see if using AF_XDP sockets for outgoing 
packet processing is possible first because it looks like it's going to 
take a while to learn DPDK.


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

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2020-04-02  8:27 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-03-30 16:11 Using AF_XDP To Modify Outgoing Packets Christian Deacon
2020-03-30 16:24 ` David Ahern
2020-03-30 18:10 ` Jakub Kicinski
2020-03-30 19:28   ` Christian Deacon
2020-03-31  9:29     ` Toke Høiland-Jørgensen
2020-03-31 23:22       ` Christian Deacon
2020-04-01  8:33         ` Toke Høiland-Jørgensen
2020-04-01  9:55         ` Jesper Dangaard Brouer
2020-04-02  8:26           ` Christian Deacon

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.