Re: l2fwd between interfaces

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

 



On Wed, Aug 21, 2019 at 5:52 PM Ilya Golshtein <ilejn@xxxxxxxxx> wrote:
>
> 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.

None exists as far as I know, so great that you are contributing
this.But could you please move your implementation over to the libbpf
interface? This will simplify it greatly.

> 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.

Do you not just come back and retry in this case? Looks correct, or am
I missing something?

> 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?

Can you try supplying the same umem memory range to two different
sockets and their respective setsockopts?

Thanks: Magnus

> Thanks.
>
> --
> Regards,
> Ilya Golshtein
>



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

  Powered by Linux