s2n-quic
s2n-quic copied to clipboard
NIC queues and AF_XDP sockets
Problem:
https://github.com/aws/s2n-quic/blob/e7d53efc3167f4975b2b555779f2b1cf6e329fd7/quic/s2n-quic-qns/src/xdp.rs#L111-L195 https://github.com/aws/s2n-quic/blob/e7d53efc3167f4975b2b555779f2b1cf6e329fd7/tools/xdp/s2n-quic-xdp/src/syscall.rs#L309-L312
The CPU has 10 cores and 20 threads, and the maximum number of queues of the network card is 32. When binding the 21st AF_XDP socket, the prompt Os { code: 22, kind: InvalidInput, message: "Invalid argument" }
Solution:
let queues = channels
.rx_count
.max(channels.tx_count)
.max(channels.combined_count);