Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp4823847ybl; Wed, 22 Jan 2020 05:26:07 -0800 (PST) X-Google-Smtp-Source: APXvYqwOIYNgy6GX9vep5JLxFLNWDOfa3YXGdOEf5yiRCvVbkzJvtw87+hb6QDcZc4eL6dLFGLJJ X-Received: by 2002:aca:1e11:: with SMTP id m17mr6812773oic.5.1579699567681; Wed, 22 Jan 2020 05:26:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579699567; cv=none; d=google.com; s=arc-20160816; b=wIeBFEtCOREJF1iAhfRFadkCip71M17/R66oYA2h++1cbMojmx9nIHZFbVKY7el7wF xIb8qy8Cab+qKpQCx3YhCPItALujv+eSLr/qJyyxqL/I1d93B2TnfPSb75VUSwPzFaVc GfA3Pe3/Vx4r7QL8Sv84z/ObssT2xl65vGY1CmJAl5mRWS8MQNTiTY7h1qc92UqDt+48 SEQo7gM2uxMSFuLZSUeC/OK8MHTmrQ2EicVYslD12zOs3dgGFZuNezYpteug7l0T1wEK 4/0tDxVZ083h9i7mboZa3/cMlZpKI0qyj3iWksTZ7n4Pq/wDiS2x7roDGc5WXH6myiFy j6sg== 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=CGujyAvQN/Wg249LchniLtn14SkEyeYeY60uE4hedJM=; b=jYA6M5lJ4Ljo4U6aSYOoNdQ8HZQOhW0egdq+XPR+K3onFuIv0rOxIEJeWEE335e52h X/FsQv9nu2XLObyABjVgP95CBDXzpf1zDxDLzTQf8G3ZzH17c6pPAL/JYFCQoaExVjcZ m5ANJDY2zJL2p0Xog9Qv9eZQsoEEPiy8+IlDry+vu2a42Q9En5aUHEa9QLjtQBvbZ0x1 4qRkSPZg5uc1F/Gx0tGj5Zn4gq5X8G7z3AQf5DRv8CPUVO2aP2GaQKm+ZTtAUoJlJvzM bMiCs2TH7Z3cH1MGT43bBI/Z0cagE7X5+5NFC1TlDAm1MwekPQ5qLSrlX8IhIn6OK6w0 hjwQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=fcV46Vuy; 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 b24si23636404otf.34.2020.01.22.05.25.55; Wed, 22 Jan 2020 05:26:07 -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=fcV46Vuy; 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 S1729664AbgAVNZD (ORCPT + 99 others); Wed, 22 Jan 2020 08:25:03 -0500 Received: from mail.kernel.org ([198.145.29.99]:44418 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731117AbgAVNZB (ORCPT ); Wed, 22 Jan 2020 08:25:01 -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 D51532467B; Wed, 22 Jan 2020 13:24:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1579699500; bh=ikhNzRPjtLv6agTCVjiSdi6VCJA/GFt+zgLfGnJjqAI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fcV46VuyQRWD4FHI14s7H6jx7rS4/eYqRoH8PD3bBtOGsm8hITQilDrUS2dgFSCNR M7KHdlpAUCbEpv5gkIXQHA29of1mFfnWOcjZi9rfnlx32U7rgL/qooNYJ6rtnDRSFE x/4d7q6XXlP6H0SBnsfvSXaodqLbG9CWu6iai7Jo= 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 165/222] net: stmmac: selftests: Mark as fail when received VLAN ID != expected Date: Wed, 22 Jan 2020 10:29:11 +0100 Message-Id: <20200122092845.527092902@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 d39b68e5a736afa67d2e9cfb158efdd237d99dbd upstream. When the VLAN ID does not match the expected one it means filter failed in HW. Fix it. Fixes: 94e18382003c ("net: stmmac: selftests: Add selftest for VLAN TX Offload") 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 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c @@ -853,8 +853,12 @@ static int stmmac_test_vlan_validate(str if (tpriv->vlan_id) { if (skb->vlan_proto != htons(proto)) goto out; - if (skb->vlan_tci != tpriv->vlan_id) + if (skb->vlan_tci != tpriv->vlan_id) { + /* Means filter did not work. */ + tpriv->ok = false; + complete(&tpriv->comp); goto out; + } } ehdr = (struct ethhdr *)skb_mac_header(skb);