From: "Chao Shi" <chao.shi@alibaba-inc.com>
To: "io-uring" <io-uring@vger.kernel.org>
Subject: How to use iouring zcrx with NIC teaming?
Date: Thu, 11 Sep 2025 11:46:58 +0800 [thread overview]
Message-ID: <efed6a43-6ba6-4093-adb8-d08e8e4d2352.chao.shi@alibaba-inc.com> (raw)
Hello,
I'm running into a issue when using iouring zcrx with NIC teaming. I'm glad if anyone can help.
I wrote a program that uses iouring-zcrx to receive TCP packets. The program works well when only a single net interface is up (by manually `ifconfig down` the other interface). The server uses Broadcom P2100G Dual-Port 100G NIC, and is configured link aggregation with teaming. Teaming works at L2, i.e. TCP packets (of single or multiple connections) may come from arbitrary port. I'm using kernel 6.16.4.
To illustrate this issue, consider the belowing example:
The server program registered **two** zcrx IFQs (2 data buffers and 2 refill rings), one for each NIC port. It accepts an incoming TCP connection. The server receives packets from that connection, by submiting RECV_ZC sqes. Here comes the problem. The field `zcrx_ifq_idx` of sqe is used to specify which IFQ will be used. However, which IFQ to use is not known before packets are received. If `zcrx_ifq_idx` specifies the wrong IFQ, the kernel will fallback to copying. In a rare but possible situation, packets of a single TCP connection may received from both ports.
I'm looking forward if anyone can help. I'm new here, so correct me if I am wrong.
next reply other threads:[~2025-09-11 3:47 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-11 3:46 Chao Shi [this message]
2025-09-15 20:20 ` How to use iouring zcrx with NIC teaming? David Wei
2025-09-17 14:28 ` 回复:How " 石超
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=efed6a43-6ba6-4093-adb8-d08e8e4d2352.chao.shi@alibaba-inc.com \
--to=chao.shi@alibaba-inc.com \
--cc=io-uring@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox