l2fwd between interfaces

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

l2fwd mode of xdpsock sample puts a packet back into the same interface. Is there a good example how xdpsock can be modified to read a packet from one interface and to send it to another?

I've failed to find such example and created my own app https://github.com/ilejn/xdpbridge.

Do hope that such a thing already exists.

If not, I appreciate if anyone can review the code of my application. In particular I am concerned about the ENOSPC case in xq_enq_copy.

Basically the thing works Ok, but not as fast as I expected.

I've tried to share umem to get rid of memcpy, but bind returns EINVAL in this case. Exploring xsk_bind (net/xdp/xsk.c) in 4.18 kernel I can see, that there is an explicit check umem_xs->dev != dev . Is it a fundamental limitaion?

Thanks.

--
Regards,
Ilya Golshtein




[Index of Archives]     [Linux Networking Development]     [Fedora Linux Users]     [Linux SCTP]     [DCCP]     [Gimp]     [Yosemite Campsites]

  Powered by Linux