RE: [Intel-wired-lan] [PATCH] e1000e: Fix TX dispatch condition

From: G, GurucharanX
Date: Thu Oct 27 2022 - 10:41:47 EST




> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@xxxxxxxxxx> On Behalf Of
> Akihiko Odaki
> Sent: Thursday, October 13, 2022 10:31 AM
> Cc: netdev@xxxxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx; Yuri Benditovich
> <yuri.benditovich@xxxxxxxxxx>; Eric Dumazet <edumazet@xxxxxxxxxx>;
> Jakub Kicinski <kuba@xxxxxxxxxx>; Yan Vugenfirer <yan@xxxxxxxxxx>; intel-
> wired-lan@xxxxxxxxxxxxxxxx; Paolo Abeni <pabeni@xxxxxxxxxx>; David S.
> Miller <davem@xxxxxxxxxxxxx>
> Subject: [Intel-wired-lan] [PATCH] e1000e: Fix TX dispatch condition
>
> e1000_xmit_frame is expected to stop the queue and dispatch frames to
> hardware if there is not sufficient space for the next frame in the buffer, but
> sometimes it failed to do so because the estimated maxmium size of frame
> was wrong. As the consequence, the later invocation of e1000_xmit_frame
> failed with NETDEV_TX_BUSY, and the frame in the buffer remained forever,
> resulting in a watchdog failure.
>
> This change fixes the estimated size by making it match with the condition for
> NETDEV_TX_BUSY. Apparently, the old estimation failed to account for the
> following lines which determines the space requirement for not causing
> NETDEV_TX_BUSY:
> > /* reserve a descriptor for the offload context */
> > if ((mss) || (skb->ip_summed == CHECKSUM_PARTIAL))
> > count++;
> > count++;
> >
> > count += DIV_ROUND_UP(len, adapter->tx_fifo_limit);
>
> This issue was found with http-stress02 test included in Linux Test Project
> 20220930.
>
> Signed-off-by: Akihiko Odaki <akihiko.odaki@xxxxxxxxxx>
> ---
> drivers/net/ethernet/intel/e1000e/netdev.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>

Tested-by: Gurucharan <gurucharanx.g@xxxxxxxxx> (A Contingent worker at Intel)