xdp-project / xdp-tutorial

XDP tutorial
2.49k stars 579 forks source link

Does AF_XDP support multithread rx packet with a nic ring? #135

Open ChenYahui2019 opened 4 years ago

ChenYahui2019 commented 4 years ago

I created 4 AF_XDP sockets sharing one umen with XDP_SHARED_UMEM. Fourt threads only doing rx_drop pkts for each socket. But it seems AF_XDP not support concurrent receiving packets.

So, does AF_XDP support concurrent rx pkts and why?

hi-glenn commented 3 years ago

Of course, it support.

Attention:

  1. nic queue id
  2. bpf_redirect_map(&xsks_map, af_xdp_socket_index, 0), af_xdp_socket_index should be corresponding to the correct socket.