> -----Original Message-----
> From: Joe Damato <[email protected]>
> Sent: Thursday, July 30, 2026 11:55 AM
> To: Haiyang Zhang <[email protected]>
> Cc: [email protected]; [email protected]; KY Srinivasan
> <[email protected]>; Haiyang Zhang <[email protected]>; Wei Liu
> <[email protected]>; Dexuan Cui <[email protected]>; Long Li
> <[email protected]>; Andrew Lunn <[email protected]>; David S.
> Miller <[email protected]>; Eric Dumazet <[email protected]>; Jakub
> Kicinski <[email protected]>; Paolo Abeni <[email protected]>; Konstantin
> Taranov <[email protected]>; Simon Horman <[email protected]>; Erni
> Sri Satya Vennela <[email protected]>; Dipayaan Roy
> <[email protected]>; Aditya Garg
> <[email protected]>; Breno Leitao <[email protected]>; linux-
> [email protected]; [email protected]; Paul Rosswurm
> <[email protected]>
> Subject: [EXTERNAL] Re: [PATCH net-next] net: mana: Extend RX CQE
> coalescing up to 8 packets
>
> [You don't often get email from [email protected]. Learn why this is important
> at https://aka.ms/LearnAboutSenderIdentification ]
>
> On Wed, Jul 29, 2026 at 03:52:22PM -0700, Haiyang Zhang wrote:
> > From: Haiyang Zhang <[email protected]>
> >
> > To support up to 8 packets per CQE, put two packet lengths and
> > hash values into one PPI entry by using the reserved fields.
> > Update ethtool handlers to set this feature.
> > Update per queue stat to show the coalesced CQE counters.
> > This feature is supported on NIC hardware showing the relevant
> > PF flag.
> >
> > Signed-off-by: Haiyang Zhang <[email protected]>
> > ---
> > drivers/net/ethernet/microsoft/mana/mana_en.c | 137 ++++++++++++------
> > .../ethernet/microsoft/mana/mana_ethtool.c | 30 +++-
> > include/net/mana/gdma.h | 4 +
> > include/net/mana/mana.h | 43 ++++--
> > 4 files changed, 150 insertions(+), 64 deletions(-)
> >
> > diff --git a/drivers/net/ethernet/microsoft/mana/mana_en.c
> b/drivers/net/ethernet/microsoft/mana/mana_en.c
> > index a8c329bdbacf..720d22e6aea9 100644
> > --- a/drivers/net/ethernet/microsoft/mana/mana_en.c
> > +++ b/drivers/net/ethernet/microsoft/mana/mana_en.c
> > @@ -1241,6 +1241,9 @@ int mana_gd_query_device_cfg(struct gdma_context
> *gc, u32 proto_major_ver,
>
> [...]
>
> >
> > +static void mana_process_one_rx_pkt(struct device *dev, struct mana_rxq
> *rxq,
> > + struct mana_rxcomp_oob *oob,
> > + u32 pktlen, u32 pkt_hash)
> > +{
> > + struct mana_recv_buf_oob *rxbuf_oob;
> > + struct net_device *ndev = rxq->ndev;
> > + void *old_buf = NULL;
> > + bool old_fp;
> > +
> > + rxbuf_oob = &rxq->rx_oobs[rxq->buf_index];
> > + WARN_ON_ONCE(rxbuf_oob->wqe_inf.wqe_size_in_bu != 1);
> > +
> > + if (unlikely(pktlen > rxq->datasize)) {
> > + /* Increase it even if mana_rx_skb() isn't called. */
> > + rxq->rx_cq.work_done++;
> > +
> > + ++ndev->stats.rx_dropped;
>
> It looks like this code was moved from mana_process_rx_cqe, so this is
> prob
> out of scope, but I saw this and was wondering if maybe rx_length_errors
> is more
> appropriate?
>
> from if_link.h:
>
> * @rx_length_errors: Number of packets dropped due to invalid length.
> * Part of aggregate "frame" errors in `/proc/net/dev`.
Yes, it's moved from mana_process_rx_cqe(). We can consider a separate
patch if any changes are needed here.
I found: "Linux rx_length_errors is a network interface counter that
tracks incoming packets dropped because their actual size does not match
the packet length stated in the header."
But (pktlen > rxq->datasize) is different, it means the len in OOB is
bigger than the data buflen, which is a HW error, and unexpected. So
it probably should not be put into "rx_length_errors"?
Thanks,
- Haiyang