Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp3166249imw; Mon, 11 Jul 2022 03:20:40 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sh3VnvgRbF/722izw50KtIxfukYGVJsbXjgVOWZA0k7tQ4YJa5QsQT1iN9gz4ocIijVAsw X-Received: by 2002:a17:906:9b8a:b0:722:e50e:2a6d with SMTP id dd10-20020a1709069b8a00b00722e50e2a6dmr18324431ejc.724.1657534840443; Mon, 11 Jul 2022 03:20:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657534840; cv=none; d=google.com; s=arc-20160816; b=U07BMQsL7IWpaJ9pCWqtIvbCVzIEl7Zz5QeZTUdGvfY5tg4yyRstvAowgWaVwzxgXk u+aTizHkF/w8i1AJqwkLigc9FRjXI1a2QWmazCQ2ExU1dHK39WkvOKbAkx4XFPYdHf9g LzhDd2oKjHBY1tta7Z6JUuQHO+PY2KMc8wNk+2Bps4N2IMyw+evlqd4xH/QVq8kj4fkZ yvTy3bzpZ+B7d9/pMEtNlObN1O8OYiSQYHIBi27fRENJN0j/Wuy0YSQ7QaplPSStscD3 1cDjA/k+IWyF12Nkt36mF5Ze/X9i+Efbgep2lMwh6jwYanNrWSp/k/MnNJvOpVdebUvr 7FWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=XF4zKcKxXTo8kg/vZjdqiNYPbtRIqFX3VFJjQHMvquA=; b=Rx5J4IWvczxWnqqHpvTFb7syEB8eNwOEh8MuW3ksAgNg4aI7SnX+ma9B7ZcznvRl8K klWOuspUeWpKo3cAbrUMyDDa4pxzjrkTRVZjwkxKQf2Bf1rfRmw+1afe6Qn4K4unLYUs 46ZRJfc8Gdytks+TsZ4V1+cnbkU+vCYNbsLy45oL4ofFYjOGVmxLc1ewWbhBp1md7y2Y zwSjyinV0GmUnGIiPURSdxjIhDTvBAtWQIDQizOyrJ3zC2cjcPFdvXtcodHeYfHja7VH tGDuefmVJE+gMO6k7FCY0e2y8hFLpG/6H0mp1aGdRTLWmFTG0yuIhPB/7O4lNkRR/bJS Bupw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=RmFclwm1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y10-20020aa7ccca000000b0043a7f8ba394si9825460edt.43.2022.07.11.03.20.15; Mon, 11 Jul 2022 03:20:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=RmFclwm1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231236AbiGKJNq (ORCPT + 99 others); Mon, 11 Jul 2022 05:13:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59376 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231337AbiGKJNG (ORCPT ); Mon, 11 Jul 2022 05:13:06 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1B84E2F3BB; Mon, 11 Jul 2022 02:09:39 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 76BF26115B; Mon, 11 Jul 2022 09:09:38 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 88EEAC34115; Mon, 11 Jul 2022 09:09:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1657530577; bh=NZfE0H/w5NIGJFcWdjQPXZinzAVGglJvOVXLLc32h1I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RmFclwm1L86PTEKxh9ZMAo7mKodTjndzDpJHhgOJdUzuhFmdcs1J8zY3yBdByb6Bq nYyvEY1xBqchXqb+lB0IDMp2Qhb1vkZh9yw0SB9xzSM3RksspQwDhKuehSjKCIXnPR IH52g+BYMkPInmvgigzr3ygnLk9EFVl5axE3RFhw= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Nick Child , Brian King , Rick Lindsley , "David S. Miller" , Sasha Levin Subject: [PATCH 4.19 19/31] ibmvnic: Properly dispose of all skbs during a failover. Date: Mon, 11 Jul 2022 11:06:58 +0200 Message-Id: <20220711090538.414969149@linuxfoundation.org> X-Mailer: git-send-email 2.37.0 In-Reply-To: <20220711090537.841305347@linuxfoundation.org> References: <20220711090537.841305347@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Rick Lindsley [ Upstream commit 1b18f09d31cfa7148df15a7d5c5e0e86f105f7d1 ] During a reset, there may have been transmits in flight that are no longer valid and cannot be fulfilled. Resetting and clearing the queues is insufficient; each skb also needs to be explicitly freed so that upper levels are not left waiting for confirmation of a transmit that will never happen. If this happens frequently enough, the apparent backlog will cause TCP to begin "congestion control" unnecessarily, culminating in permanently decreased throughput. Fixes: d7c0ef36bde03 ("ibmvnic: Free and re-allocate scrqs when tx/rx scrqs change") Tested-by: Nick Child Reviewed-by: Brian King Signed-off-by: Rick Lindsley Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/ethernet/ibm/ibmvnic.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c index ae3eea4a4213..1463cf4321a8 100644 --- a/drivers/net/ethernet/ibm/ibmvnic.c +++ b/drivers/net/ethernet/ibm/ibmvnic.c @@ -4691,6 +4691,15 @@ static int ibmvnic_reset_init(struct ibmvnic_adapter *adapter) release_sub_crqs(adapter, 0); rc = init_sub_crqs(adapter); } else { + /* no need to reinitialize completely, but we do + * need to clean up transmits that were in flight + * when we processed the reset. Failure to do so + * will confound the upper layer, usually TCP, by + * creating the illusion of transmits that are + * awaiting completion. + */ + clean_tx_pools(adapter); + rc = reset_sub_crq_queues(adapter); } } else { -- 2.35.1