Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp3180038imw; Mon, 11 Jul 2022 03:41:39 -0700 (PDT) X-Google-Smtp-Source: AGRyM1safqdkkvsvWskUgaFEB0LVOo/+DdAGFSFS7Oc63uYYGnqUlwmiL5xiOzE9WM5WnM8AT3AV X-Received: by 2002:a05:6402:5112:b0:43a:c753:afe6 with SMTP id m18-20020a056402511200b0043ac753afe6mr11185337edd.409.1657536099056; Mon, 11 Jul 2022 03:41:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657536099; cv=none; d=google.com; s=arc-20160816; b=gkaPRPPVdfQ7k6aHp+oLmMgq4pTWkbUCOHqvXmTBYbNB94STnnEaJQ9VH79hzHMNkU +46Cl0hHDaYc0GSIDEXY/lau94pmIEWwr5QFrNOSkKBpSww2zhz6IUN07Uy5mPn6SMHw W/BZu958krqZ+WULt4uyKYRb280mea4UfGCxbtXKmzOBjRP/EkSm3Ec2vcT1Uul8E2IF CqAPNhH7f34TnYEuVJhG3y1l3oWKah7HAzM0vyd4xpETuAwjLrNaA7En6EklvC0+hmCG mkd9YUxLnxE68oXGEhEdUEDY/7Z1nLlESMegRN91Q3wpHg1ZQoqfAIE/+kRrrYaGIPlt TNtw== 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=hoGqblrx7NzAJEXVMiv166UQDHsCI0TAGpU9pqTEITs=; b=WdtSmD4pv1Q2VaOZXtVwX+ipnftUhIZqwQeDcsyv1F+z8eSROjThtUnAbBjKMiVw8w buxq58KfojuGUn6wWJdcJTx95yZeixSlFGOaYblPGxbHB2+Sl9KLrevvGc8xtoUdtJWM jIwcOJTkN4KvgL0iZ6hTC7Hezdn0MtNN8+LBiSs9xhonIV96/Z2uY19W6p0a3UoSRdyL QhOiEBf6RjBs+Rfsl/lROkHcFHq2bLkPBG1ELBNd4+0WkA0c3ypP3DduO96Dthd0fwyI RsNr9e/0QOPrq1Zl9zgZq3IJgUk2wl0KJ10I5rwbMaEaxAEv3Wm4ld4iQNBbWsSYIN+7 do3g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=IYTN6gkj; 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 we9-20020a170907234900b0072642bbc8cfsi7797914ejb.914.2022.07.11.03.41.14; Mon, 11 Jul 2022 03:41:39 -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=IYTN6gkj; 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 S232804AbiGKJhp (ORCPT + 99 others); Mon, 11 Jul 2022 05:37:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53116 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233002AbiGKJhD (ORCPT ); Mon, 11 Jul 2022 05:37:03 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D5EA81209C; Mon, 11 Jul 2022 02:19:16 -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 6434D6129D; Mon, 11 Jul 2022 09:19:16 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6CF87C34115; Mon, 11 Jul 2022 09:19:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1657531155; bh=AqmAQeDOEStw/4FQwCYgZRe78SsSM0WY/CAgDInFhHk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=IYTN6gkj1Ii5eHSnk9lX3RrklssvUB4s3B7GyNyzcKaeubec3oMlutb4WrL+erBfN i1Ckp7TZU+I+8tXytRSBZTOF0hyw+c3VQ+6fcqRbOEEk7JuVZeV4gPwdrSfbr/q0hY 5ArPLZTAE+hFmsNmC0V97F+GvxpJXpUmvIi9tZfM= 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 5.18 081/112] ibmvnic: Properly dispose of all skbs during a failover. Date: Mon, 11 Jul 2022 11:07:21 +0200 Message-Id: <20220711090551.871598411@linuxfoundation.org> X-Mailer: git-send-email 2.37.0 In-Reply-To: <20220711090549.543317027@linuxfoundation.org> References: <20220711090549.543317027@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 5c5931dba51d..c4221f89ab18 100644 --- a/drivers/net/ethernet/ibm/ibmvnic.c +++ b/drivers/net/ethernet/ibm/ibmvnic.c @@ -5774,6 +5774,15 @@ static int ibmvnic_reset_init(struct ibmvnic_adapter *adapter, bool reset) 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