RE: [EXTERNAL] Re: [PATCH V2,net-next, 1/2] net: mana: Add support for coalesced RX packets on CQE
From: Haiyang Zhang <haiyangz@microsoft.com>
Date: 2026-01-14 18:27:53
Also in:
linux-hyperv, linux-rdma, lkml
-----Original Message----- From: Jakub Kicinski <kuba@kernel.org> Sent: Tuesday, January 13, 2026 8:10 PM To: Haiyang Zhang <haiyangz@microsoft.com> Cc: Haiyang Zhang <redacted>; linux- hyperv@vger.kernel.org; netdev@vger.kernel.org; KY Srinivasan [off-list ref]; Wei Liu [off-list ref]; Dexuan Cui [off-list ref]; Long Li [off-list ref]; Andrew Lunn [off-list ref]; David S. Miller [off-list ref]; Eric Dumazet [off-list ref]; Paolo Abeni [off-list ref]; Konstantin Taranov [off-list ref]; Simon Horman [off-list ref]; Erni Sri Satya Vennela [off-list ref]; Shradha Gupta [off-list ref]; Saurabh Sengar [off-list ref]; Aditya Garg [off-list ref]; Dipayaan Roy [off-list ref]; Shiraz Saleem [off-list ref]; linux-kernel@vger.kernel.org; linux- rdma@vger.kernel.org; Paul Rosswurm [off-list ref] Subject: Re: [EXTERNAL] Re: [PATCH V2,net-next, 1/2] net: mana: Add support for coalesced RX packets on CQE On Tue, 13 Jan 2026 15:13:24 +0000 Haiyang Zhang wrote:quoted
quoted
quoted
I get that. What is the logic for combining 4 packets into a single completion? How does it work? Your commit message mentions"regressionquoted
quoted
quoted
on latency" - what is the bound on that regression?When we received CQE type CQE_RX_COALESCED_4, it's a coalesced CQE.And inquoted
quoted
the CQE OOB, there is an array with 4 PPI elements, with each pkt'slength:quoted
quoted
oob->ppi[i].pkt_len. So we read the related WQE and the DMA buffers for the RX pktpayloads, upquoted
quoted
to 4. But, if the coalesced pkts <4, the pkt_len will be 0 after the lastpkt,quoted
quoted
so we know when to stop reading the WQEs.And, the coalescing can add up to 2 microseconds into one-way latency.I am asking you how the _device_ (hypervisor?) decides when to coalesce and when to send a partial CQE (<4 packets in 4 pkt CQE). You are using the coalescing uAPI, so I'm trying to make sure this is the correct API. CQE configuration can also be done via ringparam.
When coalescing is enabled, the device waits for packets which can have the CQE coalesced with previous packet(s). That coalescing process is finished (and a CQE written to the appropriate CQ) when the CQE is filled with 4 pkts, or time expired, or other device specific logic is satisfied. Thanks, - Haiyang