Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp4825265ybl; Wed, 22 Jan 2020 05:27:31 -0800 (PST) X-Google-Smtp-Source: APXvYqzcDdxlyggDxH5Y7vJ/YlWMEOEPZzRMGGfDuJ9kSiaSNDhS5Y2j/sIPYRJ4zR43N1PxHdaJ X-Received: by 2002:aca:48cd:: with SMTP id v196mr6985836oia.102.1579699651134; Wed, 22 Jan 2020 05:27:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579699651; cv=none; d=google.com; s=arc-20160816; b=I1vKzb6lAcJncPw6haOfx9wIAWghVMoC8nXQJUfA1xFezQY90SSguH7jAO2D/EiIhb uW3H27m5j/1ztPjUGstQkz+T4P1S90gL0T3jDNBVP3+pSNYfovr6ywWtIqtYUCMfE6Ts MCqpBFkQZTpOITUvMyuBDznQ1J4ueVjkoOdR/RPzT82IzmmyHjhG7Y9zqCOWCsDoDqE1 URlinNNVy74bLBTUfKM/n97o50D40odUvXkIctf6AiBOnRtKl9XAXi5H3jXRtUB7Sl+m hVJTSG1rnNEbq/pnTcNlqKg7NWqllHSdB5BpLGwENKbHWxRt2i/eQeAfCHBXuZ+oNNTI y7tQ== 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=zuOo2L+JTRbkMMIeu2eQ+aP7TTVGYlRxvme/xa7OXHA=; b=RfhkTLxtzVj91IDAuGWx0TxdoRWIxI3Fr7wz+JDZi1RZglaHhKG8ZR7Ro6fDbkkIlT S9CA9uJr4p0kS2GRJnNjUWCiHBYOGCggBhZMxwDCPybEwmduh+LAIhUs1bdnN5bNh+6T G3mEM/br1QDpEfDnKeD+zjwryA3ciIpFh0zwLCXN6oml4hMoPXGfm5fHgi6qf9qrchOA D4O5I3tQfecwkqZ1qcop+oCT6x+5Q7INk3ibJgCknDHhAkBVk7wCxnPYoJBAu8oSYklg r1pnGcuS8EAhlnyfeLOq8pQE7r8L57fZBe4Fs9hUPrK2frxnXv4aQ+ZHw5frjSc2klr/ A6dg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=eR5yUvxV; 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 w11si21156692oic.62.2020.01.22.05.27.15; Wed, 22 Jan 2020 05:27:31 -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=eR5yUvxV; 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 S1731212AbgAVNZP (ORCPT + 99 others); Wed, 22 Jan 2020 08:25:15 -0500 Received: from mail.kernel.org ([198.145.29.99]:44824 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730771AbgAVNZN (ORCPT ); Wed, 22 Jan 2020 08:25:13 -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 5A21D2467B; Wed, 22 Jan 2020 13:25:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1579699512; bh=m1ojr+3KUybYQi0kamHI+nKZrFOBunYE+YxiTEQEp3I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=eR5yUvxVufW2YvyDiYoZ5OHyu3TV1f/MzFNnYTJZqU+HN+7WxQiatbhIl0dCwCBDp yzjnZI4EovTBaNgEGzvVuriG5hOQ5e1Yn4ti1y/p3FPj+YvjpJ6cDZm7jWVd1lTa/o mAv9UiBvfHLliJslo1Hwvc8M66nFJOE6dEB0sKaU= 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 168/222] net: stmmac: tc: Do not setup flower filtering if RSS is enabled Date: Wed, 22 Jan 2020 10:29:14 +0100 Message-Id: <20200122092845.739671803@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 7bd754c47dd3ad1b048c9641294b0234fcce2c58 upstream. RSS, when enabled, will bypass the L3 and L4 filtering causing it not to work. Add a check before trying to setup the filters. Fixes: 425eabddaf0f ("net: stmmac: Implement L3/L4 Filters using TC Flower") Signed-off-by: Jose Abreu Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c | 4 ++++ 1 file changed, 4 insertions(+) --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c @@ -579,6 +579,10 @@ static int tc_setup_cls(struct stmmac_pr { int ret = 0; + /* When RSS is enabled, the filtering will be bypassed */ + if (priv->rss.enable) + return -EBUSY; + switch (cls->command) { case FLOW_CLS_REPLACE: ret = tc_add_flow(priv, cls);