RE: [EXTERNAL] Re: [PATCH net-next] net: ethtool: add COALESCE_RX_CQE_FRAMES/NSECS parameters

From: Haiyang Zhang

Date: Tue Feb 24 2026 - 16:39:06 EST




> -----Original Message-----
> From: Tariq Toukan <ttoukan.linux@xxxxxxxxx>
> Sent: Tuesday, February 24, 2026 5:22 AM
> To: Haiyang Zhang <haiyangz@xxxxxxxxxxxxxxxxxxx>; linux-
> hyperv@xxxxxxxxxxxxxxx; netdev@xxxxxxxxxxxxxxx; Andrew Lunn
> <andrew@xxxxxxx>; Jakub Kicinski <kuba@xxxxxxxxxx>; Donald Hunter
> <donald.hunter@xxxxxxxxx>; David S. Miller <davem@xxxxxxxxxxxxx>; Eric
> Dumazet <edumazet@xxxxxxxxxx>; Paolo Abeni <pabeni@xxxxxxxxxx>; Simon
> Horman <horms@xxxxxxxxxx>; Jonathan Corbet <corbet@xxxxxxx>; Shuah Khan
> <skhan@xxxxxxxxxxxxxxxxxxx>; Kory Maincent (Dent Project)
> <kory.maincent@xxxxxxxxxxx>; Gal Pressman <gal@xxxxxxxxxx>; Oleksij Rempel
> <o.rempel@xxxxxxxxxxxxxx>; Vadim Fedorenko <vadim.fedorenko@xxxxxxxxx>;
> linux-kernel@xxxxxxxxxxxxxxx; linux-doc@xxxxxxxxxxxxxxx
> Cc: Haiyang Zhang <haiyangz@xxxxxxxxxxxxx>; Paul Rosswurm
> <paulros@xxxxxxxxxxxxx>
> Subject: [EXTERNAL] Re: [PATCH net-next] net: ethtool: add
> COALESCE_RX_CQE_FRAMES/NSECS parameters
>
> [You don't often get email from ttoukan.linux@xxxxxxxxx. Learn why this is
> important at https://aka.ms/LearnAboutSenderIdentification ]

> >
> > +Rx CQE coalescing allows multiple received packets to be coalesced into
> a single
> > +Completion Queue Entry (CQE). ``ETHTOOL_A_COALESCE_RX_CQE_FRAMES``
> describes the
> > +maximum number of frames that can be coalesced into a CQE.
> > +``ETHTOOL_A_COALESCE_RX_CQE_NSECS`` describes max time in nanoseconds
> after the
> > +first packet arrival in a coalesced CQE to be sent.
> > +
>
> I am trying to understand how generic this feature/API is.
> Can you please elaborate on the feature you want to configure here?
It's the similar feature as MLX's "RX CQE compression", which merges
"multiple near-identical completions that share/match several fields."
I'm adding this kAPI for any drivers that support this feature.

You may find driver details in my previous submission:
[V2,net-next,1/2] net: mana: Add support for coalesced RX packets on CQE
https://patchwork.kernel.org/project/netdevbpf/patch/1767732407-12389-2-git-send-email-haiyangz@xxxxxxxxxxxxxxxxxxx/

> A single CQE to describe several packets?
Yes, up to 4 for our MANA driver.

> What is the price?
The price is the latency can increase a bit.

> What per-packet information/hw offloads do you lose
> in the process?
For example, the vlan_id is shared among up to 4 pkts.
But, the pkt len & hash are per-pkt.

struct mana_rxcomp_perpkt_info {
u32 pkt_len : 16;
u32 reserved1 : 16;
u32 reserved2;
u32 pkt_hash;
}; /* HW DATA */

/* Receive completion OOB */
struct mana_rxcomp_oob {
struct mana_cqe_header cqe_hdr;

u32 rx_vlan_id : 12;
u32 rx_vlantag_present : 1;
u32 rx_outer_iphdr_csum_succeed : 1;
u32 rx_outer_iphdr_csum_fail : 1;
u32 reserved1 : 1;
u32 rx_hashtype : 9;
u32 rx_iphdr_csum_succeed : 1;
u32 rx_iphdr_csum_fail : 1;
u32 rx_tcp_csum_succeed : 1;
u32 rx_tcp_csum_fail : 1;
u32 rx_udp_csum_succeed : 1;
u32 rx_udp_csum_fail : 1;
u32 reserved2 : 1;

struct mana_rxcomp_perpkt_info ppi[MANA_RXCOMP_OOB_NUM_PPI]; // MANA_RXCOMP_OOB_NUM_PPI=4

u32 rx_wqe_offset;
}; /* HW DATA */


> For comparison, in mlx5 we have RX CQE compression, which can be applied
> on multiple near-identical completions that share/match several fields.
> Still, there is a per-packet mini-cqe with distinctive per-packet fields
> like csum.

As said above, we have similar "per-packet mini-cqe":
struct mana_rxcomp_perpkt_info, which has pkt len & hash.

Thanks,
- Haiyang