Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp42320pxb; Tue, 12 Apr 2022 16:14:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJws1XtPRS+mT74P4IiH4VS/mlmtipnj8UEI/jU0ktnI1muILhlUyENgHl6qC/L5pFrFeF1M X-Received: by 2002:a05:6a00:140c:b0:4e1:530c:edc0 with SMTP id l12-20020a056a00140c00b004e1530cedc0mr6877053pfu.18.1649805298112; Tue, 12 Apr 2022 16:14:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649805298; cv=none; d=google.com; s=arc-20160816; b=Dlr2XB4i3KE7sS4E+IGDYgYl4Dtx3to4miAU/AXIpFDk3CT0c9i/4lwDq/i4XIPhgC d3NQIE3Qr9e7awkBVT1oc4cX7z4phIQDCE37Erh7ShdeEalHL2paQB6bqY1ayhy8RoSK pt/PDCVH2z3mQnF8E4jXZzf2wZ5ooRfqxYQk+niCVjSHSNUPKbOhXizlmnQqU5cDI3St XWQRRoB6VNMC0eFimn8JeKgmuadRU7ofuHT889tP3IahqjRu6fT3B6PpiMqnCvgL3c5P rYadDqqPwHMq2lDb0BIblV42nwk9Uvi5iUMbGWZQRqWgN+W9B82u/V+JnNy24ZYAusi8 4Irw== 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=21plYLqgiF+SAC1R41kYbO+moAJZHqIktlvWxcNynSY=; b=J0nkOlSu2IR7OtDd/9dSL0VpxajHRQAgR4ILE7X7TxQ2CJeGmlqZjx6Zpb7i3c3tX/ YmyqJDP57roPiFCrYGKkYFGCKJ3GNRyXdYcEq7/rjJw2vqdKk7A0OoQcxsGXXQjU22cY sacqNkkeQwAj05WYBlPjCAxK0AwLY3IrUJMSDk6y1jy467MZBvlX+E/iYyOVBwygm8Jz 9fPFWph2l4rWME7g2BON0l6WT5LeFNybYF1f3CbBlxYvMh9xiX+1Fn1l1l8x8NY+llF5 c6TQpEXvLMysN3zu24kRFgGpoMiJWx0DsUbdiuz4H511FQgKOY962GhFO+Xabe1Y9pL9 vu7g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=04sXqNVg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id a190-20020a6390c7000000b0039d698d71c9si3755055pge.275.2022.04.12.16.14.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Apr 2022 16:14:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=04sXqNVg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 0762E21592A; Tue, 12 Apr 2022 14:59:10 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1350970AbiDLGwA (ORCPT + 99 others); Tue, 12 Apr 2022 02:52:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39498 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1349647AbiDLGpi (ORCPT ); Tue, 12 Apr 2022 02:45:38 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E65E05FB3; Mon, 11 Apr 2022 23:39:06 -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 ams.source.kernel.org (Postfix) with ESMTPS id 7C3AEB81B4F; Tue, 12 Apr 2022 06:39:05 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DBED4C385A6; Tue, 12 Apr 2022 06:39:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1649745544; bh=t5LAneBW0xwJksceGW3NDKuV1HAHZgjMgjUcEloWtU8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=04sXqNVgIj1FRBilrMD/1U4R0kROaSOZAHsEHWYKUSdnkcdtcJ8jUDY2593b/Bw4/ TPCwaEtxbDQ83Fgl0qyJX51w1jZ4niI9P8N6fRr/47sA3S0XHr5b9TQzg55w9dnqWp nhPkvoFHCqHUEWOqljFw6jWQYlvVaytNbKO3amBs= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Anatolii Gerasymenko , Konrad Jankowski , Alice Michael , Tony Nguyen , Paolo Abeni , Sasha Levin Subject: [PATCH 5.10 115/171] ice: Do not skip not enabled queues in ice_vc_dis_qs_msg Date: Tue, 12 Apr 2022 08:30:06 +0200 Message-Id: <20220412062931.212987496@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220412062927.870347203@linuxfoundation.org> References: <20220412062927.870347203@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=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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: Anatolii Gerasymenko [ Upstream commit 05ef6813b234db3196f083b91db3963f040b65bb ] Disable check for queue being enabled in ice_vc_dis_qs_msg, because there could be a case when queues were created, but were not enabled. We still need to delete those queues. Normal workflow for VF looks like: Enable path: VIRTCHNL_OP_ADD_ETH_ADDR (opcode 10) VIRTCHNL_OP_CONFIG_VSI_QUEUES (opcode 6) VIRTCHNL_OP_ENABLE_QUEUES (opcode 8) Disable path: VIRTCHNL_OP_DISABLE_QUEUES (opcode 9) VIRTCHNL_OP_DEL_ETH_ADDR (opcode 11) The issue appears only in stress conditions when VF is enabled and disabled very fast. Eventually there will be a case, when queues are created by VIRTCHNL_OP_CONFIG_VSI_QUEUES, but are not enabled by VIRTCHNL_OP_ENABLE_QUEUES. In turn, these queues are not deleted by VIRTCHNL_OP_DISABLE_QUEUES, because there is a check whether queues are enabled in ice_vc_dis_qs_msg. When we bring up the VF again, we will see the "Failed to set LAN Tx queue context" error during VIRTCHNL_OP_CONFIG_VSI_QUEUES step. This happens because old 16 queues were not deleted and VF requests to create 16 more, but ice_sched_get_free_qparent in ice_ena_vsi_txq would fail to find a parent node for first newly requested queue (because all nodes are allocated to 16 old queues). Testing Hints: Just enable and disable VF fast enough, so it would be disabled before reaching VIRTCHNL_OP_ENABLE_QUEUES. while true; do ip link set dev ens785f0v0 up sleep 0.065 # adjust delay value for you machine ip link set dev ens785f0v0 down done Fixes: 77ca27c41705 ("ice: add support for virtchnl_queue_select.[tx|rx]_queues bitmap") Signed-off-by: Anatolii Gerasymenko Tested-by: Konrad Jankowski Signed-off-by: Alice Michael Signed-off-by: Tony Nguyen Signed-off-by: Paolo Abeni Signed-off-by: Sasha Levin --- drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c b/drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c index 5134342ff70f..a980d337861d 100644 --- a/drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c +++ b/drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c @@ -2723,9 +2723,9 @@ static int ice_vc_dis_qs_msg(struct ice_vf *vf, u8 *msg) goto error_param; } - /* Skip queue if not enabled */ if (!test_bit(vf_q_id, vf->txq_ena)) - continue; + dev_dbg(ice_pf_to_dev(vsi->back), "Queue %u on VSI %u is not enabled, but stopping it anyway\n", + vf_q_id, vsi->vsi_num); ice_fill_txq_meta(vsi, ring, &txq_meta); -- 2.35.1