Re: bug? or how to properly clean up AF_XDP socket

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

 



On Thu, Sep 26, 2019 at 12:05 AM Július Milan
<Julius.Milan@xxxxxxxxxxxxx> wrote:
>
> Hi folks
>
> I am stuck with proper cleanup of AF_XDP socket. Not sure if I am doing something wrong or is it a bug.
> I create xdp socket, then I remove it and then I am trying to create it again in the same process but getting -EBUSY from bind syscall
> of xsk_socket__create.
>
> My cleanup looks like this:
> xsk_socket__delete();
> xsk_umem__delete();
> bpf_set_link_xdp_fd(ifindex, -1, opt_xdp_flags);

Hi Julius,

I think that's all you need.

>
> Attaching simple test case. It’s just reduced and slightly modified xdpsock_user.c form kernel samples.
> Tested on kernel v5.3 4d856f72c10ecb060868ed10ff1b1453943fc6c8 and related libbpf.

I comment in another email, let me know if you do not see it.

William
>
> Thanks a lot
> Julius
>




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

  Powered by Linux