From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7C34FC43217 for ; Wed, 9 Nov 2022 11:20:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230379AbiKILUY (ORCPT ); Wed, 9 Nov 2022 06:20:24 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36154 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230402AbiKILUH (ORCPT ); Wed, 9 Nov 2022 06:20:07 -0500 Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6E037E8D; Wed, 9 Nov 2022 03:19:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1667992789; x=1699528789; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=ZDwLt1JxlL7tE7yCgnQ84ANfngwDWA+sGuiJcNf49J0=; b=mxdfHp2gCpFCPcni6k65HDGFE35sdiXbjYhrkd+APWjFbqU9PXy53Jbw haJ0WtKB+XBDBw/pAXZkABJphOQ2CF8UTOJpQWEhsnUb3pNV3E8pImTm7 OJSnT2C6TGnDfU8cKYoP4idrtQL2CTupIXreM6zObRNn0K/8h7pkehnN2 p+V+iAuEhLSMfI+SFq5e5Kc0iHpq5ogUxiGkBklfWdMdkbmCXMwHV427C JlqqQef0dur2faE/rtSHR6S0wHnDCOI1SfIkh19ZFLXduTR8CLAGaK2F8 G5atSAxmAXLHHPJ/WL4X9TSGl/dEyz0dWD3rRhtgC/VPB5L228y1JANaY A==; X-IronPort-AV: E=McAfee;i="6500,9779,10525"; a="337686569" X-IronPort-AV: E=Sophos;i="5.96,150,1665471600"; d="scan'208";a="337686569" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Nov 2022 03:19:49 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10525"; a="811601696" X-IronPort-AV: E=Sophos;i="5.96,150,1665471600"; d="scan'208";a="811601696" Received: from naamamex-mobl.ger.corp.intel.com (HELO [10.214.219.86]) ([10.214.219.86]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Nov 2022 03:19:45 -0800 Message-ID: Date: Wed, 9 Nov 2022 13:19:42 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.4.0 Subject: Re: [Intel-wired-lan] [PATCH] e1000e: Fix TX dispatch condition Content-Language: en-US To: Akihiko Odaki Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Yuri Benditovich , Eric Dumazet , Jakub Kicinski , Yan Vugenfirer , intel-wired-lan@lists.osuosl.org, Paolo Abeni , "David S. Miller" References: <20221013050044.11862-1-akihiko.odaki@daynix.com> From: "naamax.meir" In-Reply-To: <20221013050044.11862-1-akihiko.odaki@daynix.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/13/2022 08:00, Akihiko Odaki wrote: > 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 > --- > drivers/net/ethernet/intel/e1000e/netdev.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) Tested-by: Naama Meir