RE: [EXTERNAL] Re: [PATCH RFC 1/2] net: mana: Add support for coalesced RX packets on CQE

From: Haiyang Zhang
Date: Mon Jan 05 2026 - 12:03:48 EST




> -----Original Message-----
> From: Simon Horman <horms@xxxxxxxxxx>
> Sent: Monday, January 5, 2026 6:49 AM
> To: Haiyang Zhang <haiyangz@xxxxxxxxxxxxxxxxxxx>
> Cc: linux-hyperv@xxxxxxxxxxxxxxx; netdev@xxxxxxxxxxxxxxx; KY Srinivasan
> <kys@xxxxxxxxxxxxx>; Haiyang Zhang <haiyangz@xxxxxxxxxxxxx>; Wei Liu
> <wei.liu@xxxxxxxxxx>; Dexuan Cui <DECUI@xxxxxxxxxxxxx>; Andrew Lunn
> <andrew+netdev@xxxxxxx>; David S. Miller <davem@xxxxxxxxxxxxx>; Eric
> Dumazet <edumazet@xxxxxxxxxx>; Jakub Kicinski <kuba@xxxxxxxxxx>; Paolo
> Abeni <pabeni@xxxxxxxxxx>; Long Li <longli@xxxxxxxxxxxxx>; Konstantin
> Taranov <kotaranov@xxxxxxxxxxxxx>; Erni Sri Satya Vennela
> <ernis@xxxxxxxxxxxxxxxxxxx>; Shradha Gupta
> <shradhagupta@xxxxxxxxxxxxxxxxxxx>; Saurabh Sengar
> <ssengar@xxxxxxxxxxxxxxxxxxx>; Aditya Garg
> <gargaditya@xxxxxxxxxxxxxxxxxxx>; Dipayaan Roy
> <dipayanroy@xxxxxxxxxxxxxxxxxxx>; Shiraz Saleem
> <shirazsaleem@xxxxxxxxxxxxx>; linux-kernel@xxxxxxxxxxxxxxx; linux-
> rdma@xxxxxxxxxxxxxxx; Paul Rosswurm <paulros@xxxxxxxxxxxxx>
> Subject: [EXTERNAL] Re: [PATCH RFC 1/2] net: mana: Add support for
> coalesced RX packets on CQE
>
> On Tue, Dec 16, 2025 at 07:57:54AM -0800, Haiyang Zhang wrote:
> > From: Haiyang Zhang <haiyangz@xxxxxxxxxxxxx>
> >
> > Our NIC can have up to 4 RX packets on 1 CQE. To support this feature,
> > check and process the type CQE_RX_COALESCED_4. The default setting is
> > disabled, to avoid possible regression on latency.
> >
> > And add ethtool handler to switch this feature. To turn it on, run:
> > ethtool -C <nic> rx-frames 4
> > To turn it off:
> > ethtool -C <nic> rx-frames 1
> >
> > Signed-off-by: Haiyang Zhang <haiyangz@xxxxxxxxxxxxx>
>
> ...
>
> > diff --git a/drivers/net/ethernet/microsoft/mana/mana_ethtool.c
> b/drivers/net/ethernet/microsoft/mana/mana_ethtool.c
> > index 0e2f4343ac67..1b9ed5c9bbff 100644
> > --- a/drivers/net/ethernet/microsoft/mana/mana_ethtool.c
> > +++ b/drivers/net/ethernet/microsoft/mana/mana_ethtool.c
> > @@ -397,6 +397,58 @@ static void mana_get_channels(struct net_device
> *ndev,
> > channel->combined_count = apc->num_queues;
> > }
> >
> > +static int mana_get_coalesce(struct net_device *ndev,
> > + struct ethtool_coalesce *ec,
> > + struct kernel_ethtool_coalesce *kernel_coal,
> > + struct netlink_ext_ack *extack)
>
> ...
>
> > + if (err) {
> > + netdev_err(ndev, "Set rx-frames to %u failed:%d\n",
> > + ec->rx_max_coalesced_frames, err);
> > + NL_SET_ERR_MSG_FMT(extack, "Set rx-frames to %u failed:%d\n",
> > + ec->rx_max_coalesced_frames, err);
>
> nit: I don't think the trailing '\n' is necessary here.
>
Will update it.

Thanks,
- Haiyang