RE: [PATCH net-next v5 1/2] net: mana: Handle SKB if TX SGEs exceed hardware limit

Haiyang Zhang
2025-11-16T21:38:07Z

> -----Original Message-----
> From: Aditya Garg <gargaditya@linux.microsoft.com>
> Sent: Friday, November 14, 2025 4:17 PM
> To: KY Srinivasan <kys@microsoft.com>; Haiyang Zhang
> <haiyangz@microsoft.com>; wei.liu@kernel.org; Dexuan Cui
> <DECUI@microsoft.com>; andrew+netdev@lunn.ch; davem@davemloft.net;
> edumazet@google.com; kuba@kernel.org; pabeni@redhat.com; Long Li
> <longli@microsoft.com>; Konstantin Taranov <kotaranov@microsoft.com>;
> horms@kernel.org; shradhagupta@linux.microsoft.com;
> ssengar@linux.microsoft.com; ernis@linux.microsoft.com;
> dipayanroy@linux.microsoft.com; Shiraz Saleem
> <shirazsaleem@microsoft.com>; leon@kernel.org; mlevitsk@redhat.com;
> yury.norov@gmail.com; sbhatta@marvell.com; linux-hyperv@vger.kernel.org;
> netdev@vger.kernel.org; linux-kernel@vger.kernel.org; linux-
> rdma@vger.kernel.org; Aditya Garg <gargaditya@microsoft.com>
> Cc: Aditya Garg <gargaditya@linux.microsoft.com>
> Subject: [PATCH net-next v5 1/2] net: mana: Handle SKB if TX SGEs exceed
> hardware limit
>
> The MANA hardware supports a maximum of 30 scatter-gather entries (SGEs)
> per TX WQE. Exceeding this limit can cause TX failures.
> Add ndo_features_check() callback to validate SKB layout before
> transmission. For GSO SKBs that would exceed the hardware SGE limit, clear
> NETIF_F_GSO_MASK to enforce software segmentation in the stack.
> Add a fallback in mana_start_xmit() to linearize non-GSO SKBs that still
> exceed the SGE limit.
>
> Also, Add ethtool counter for SKBs linearized
>
> Co-developed-by: Dipayaan Roy <dipayanroy@linux.microsoft.com>
> Signed-off-by: Dipayaan Roy <dipayanroy@linux.microsoft.com>
> Signed-off-by: Aditya Garg <gargaditya@linux.microsoft.com>

Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com>