xdp-tutorial icon indicating copy to clipboard operation
xdp-tutorial copied to clipboard

AF_XDP socket support in python

Open sachintiptur opened this issue 4 years ago • 4 comments

Hi All,

I am trying to write a ebpf prog which filters pkts for certain udp port number and redirects to AF_XDP and in user program read packets from xdp socket and parse further for analysis. I am using python for user program. I am not able to open AF_XDP socket with python socket call, is there any library or python package to create and use AF_XDP sockets ?? Your inputs will be much appreciated.

Thanks, Sachin

sachintiptur avatar May 24 '21 07:05 sachintiptur

I am not aware of any Python libraries for AF_XDP sockets, no. Maybe @magnus-karlsson has heard of one?

tohojo avatar May 28 '21 16:05 tohojo

I have not heard of any AF_XDP Python libraries either. Go and Rust yes. But Python, do not think so. But on the other hand, nobody would tell me :-). I happen on these things only by chance.

magnus-karlsson avatar May 31 '21 06:05 magnus-karlsson

Hi @magnus-karlsson Can u share link for AF_XDP Go library

atulbari-samespace avatar Aug 19 '21 10:08 atulbari-samespace

On Thu, Aug 19, 2021 at 12:34 PM atulbari-samespace < @.***> wrote:

Hi @magnus-karlsson https://github.com/magnus-karlsson Can u share link for AF_XDP Go library

Do not know off the bat where it is located, but maybe you can try finding it from this page:

https://nicedoc.io/intel-go/nff-go

They use AF_XDP with go lang.

/Magnus

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/xdp-project/xdp-tutorial/issues/219#issuecomment-901803005, or unsubscribe https://github.com/notifications/unsubscribe-auth/AASGUEKJSFDN5MG2K4VYE23T5TM4PANCNFSM45MVLQVA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email .

magnus-karlsson avatar Aug 19 '21 10:08 magnus-karlsson