Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp4823955ybl; Wed, 22 Jan 2020 05:26:13 -0800 (PST) X-Google-Smtp-Source: APXvYqzi5W7YbkGZLUxFoKxexl0PsJDt5LXyWlxGdxHLa76sjFxTe6wT9MPz2JpLNcu7JrByxybG X-Received: by 2002:a9d:6510:: with SMTP id i16mr6971514otl.142.1579699573679; Wed, 22 Jan 2020 05:26:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579699573; cv=none; d=google.com; s=arc-20160816; b=QayCLKKULQHDIUzc1xpqOdPi12IM8l3beu0iUK2sHTKuNH4idUMjsRChIeEr9KU/tG aCjjZqnofLPjZJ0hCgOLAQneku7visL4a1K6vXtxGPl46K06BK9bEWYTQrXl8NvkcXlL v03pBAGI4T/CQFLusbQNagdvsiYOUQXfBupw/LmkJUhXGwweB9WtD8fbfPETZFoNqbUz ulum6q4EhHZjNh66IBZb5vxkPk/4y1gojukFaBqN2uvkqmS6kJhLeSlDfYJHf0VRmR8r lgNwRdFY+8c6xRubrICPCPDLcmWYnO60NzzUuB4J4Aj55HhUWx6wwYbRaGewxN55k2Oj +rpQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=1HBxMCM+K8nKFvHBOlH566J+z02RM2OQBFeBXfR7PK4=; b=b30xs6SZRvCL5DgcfqFJ3NLkICs0r/asurC3qQ02txI/igRS2ubqIkIYVCedW0uP+c 2dn2Z7IWia9AED041CTydRXwm/mGmh5tI31fLJWkzydJqbfW0Ke40lYnU7JzDsKEKzg+ 9tNfz9wsLToy0STX6JsqRKynpGEAugMysiC3yq+fgEfozm1pYLcB/tHY+jYn3iIivqMm R/izcTLmXaM4uvEg07NMMWU4YzBsZpRLt9RdCbC8ZqCc+8iQroppmP5CxPICXh6N5d4c DXBQ4SHwKT00dQzlcOx//+RKa5r+ablaDnBdK1yZSj280wkRbJVVc09FAJaGrGmGc0h2 pQcw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=z5w3Duku; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s68si22555602oih.275.2020.01.22.05.26.02; Wed, 22 Jan 2020 05:26:13 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=z5w3Duku; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730202AbgAVNZM (ORCPT + 99 others); Wed, 22 Jan 2020 08:25:12 -0500 Received: from mail.kernel.org ([198.145.29.99]:44702 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730771AbgAVNZK (ORCPT ); Wed, 22 Jan 2020 08:25:10 -0500 Received: from localhost (unknown [84.241.205.26]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 217CA2467B; Wed, 22 Jan 2020 13:25:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1579699509; bh=rXFJZWdzOEkV5l16XswJpgwbtlDI+Ti+0UfzDeHAtfo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=z5w3DukuKQxDqxCi1rqn5tjID+uW7MwJX0LKTwamcwoHdFTQVuT8XoB3Jy0JRvNAI edIC1khUji1j4lz0JTur5Eq2XeY1OiJSyFZh+oDlUhplGoxcZh1YA9qtAA4Z4+knrD 0osOS9/8y1JE+EXqyXeUppcZPhdWRnMMpep5xHXQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jose Abreu , "David S. Miller" Subject: [PATCH 5.4 167/222] net: stmmac: selftests: Update status when disabling RSS Date: Wed, 22 Jan 2020 10:29:13 +0100 Message-Id: <20200122092845.668971634@linuxfoundation.org> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200122092833.339495161@linuxfoundation.org> References: <20200122092833.339495161@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jose Abreu commit e715d74504352968cf24ac95476706bc911a69cd upstream. We are disabling RSS on HW but not updating the internal private status to the 'disabled' state. This is needed for next tc commit that will check if RSS is disabled before trying to apply filters. Fixes: 4647e021193d ("net: stmmac: selftests: Add selftest for L3/L4 Filters") Signed-off-by: Jose Abreu Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c | 20 +++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c @@ -1297,16 +1297,19 @@ static int __stmmac_test_l3filt(struct s struct stmmac_packet_attrs attr = { }; struct flow_dissector *dissector; struct flow_cls_offload *cls; + int ret, old_enable = 0; struct flow_rule *rule; - int ret; if (!tc_can_offload(priv->dev)) return -EOPNOTSUPP; if (!priv->dma_cap.l3l4fnum) return -EOPNOTSUPP; - if (priv->rss.enable) + if (priv->rss.enable) { + old_enable = priv->rss.enable; + priv->rss.enable = false; stmmac_rss_configure(priv, priv->hw, NULL, priv->plat->rx_queues_to_use); + } dissector = kzalloc(sizeof(*dissector), GFP_KERNEL); if (!dissector) { @@ -1373,7 +1376,8 @@ cleanup_cls: cleanup_dissector: kfree(dissector); cleanup_rss: - if (priv->rss.enable) { + if (old_enable) { + priv->rss.enable = old_enable; stmmac_rss_configure(priv, priv->hw, &priv->rss, priv->plat->rx_queues_to_use); } @@ -1418,16 +1422,19 @@ static int __stmmac_test_l4filt(struct s struct stmmac_packet_attrs attr = { }; struct flow_dissector *dissector; struct flow_cls_offload *cls; + int ret, old_enable = 0; struct flow_rule *rule; - int ret; if (!tc_can_offload(priv->dev)) return -EOPNOTSUPP; if (!priv->dma_cap.l3l4fnum) return -EOPNOTSUPP; - if (priv->rss.enable) + if (priv->rss.enable) { + old_enable = priv->rss.enable; + priv->rss.enable = false; stmmac_rss_configure(priv, priv->hw, NULL, priv->plat->rx_queues_to_use); + } dissector = kzalloc(sizeof(*dissector), GFP_KERNEL); if (!dissector) { @@ -1499,7 +1506,8 @@ cleanup_cls: cleanup_dissector: kfree(dissector); cleanup_rss: - if (priv->rss.enable) { + if (old_enable) { + priv->rss.enable = old_enable; stmmac_rss_configure(priv, priv->hw, &priv->rss, priv->plat->rx_queues_to_use); }