Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp4204763pxu; Mon, 12 Oct 2020 12:11:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzwa7XnJUlAZSyrYFMEszUTsh9oZwtjGPD2Nfwl1W7rer3ZxgIDjt6+/rO/hFOEo+1X8x8V X-Received: by 2002:a17:906:547:: with SMTP id k7mr9528565eja.204.1602529906835; Mon, 12 Oct 2020 12:11:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602529906; cv=none; d=google.com; s=arc-20160816; b=NJCaaWNX2aR7/nn2m0b6hUZP8KAiZq9YzXwRC5EMDSbNy45BE3kcWaq3NhgnoEgV27 qeO0kNwUbxLCnr4OoMTLzJ8LGa9ADdjvp21S8kyUEEQD9ED1eoARihM2i9CkWBdDsHZx JouYxxYyFJ1QIjI87HIVCtfBV8XI+wZ6snrYjJ4x44g1OZf+wc0Sd2sS1vbnLIJJe6rk bRx7U9cF59rZlCuphJwHmDkDd8RJDNR0uS2QLK8saaR1kWonLH5/VisP1mBVTTsv7FpF a8hw8PL7x+6Qdxs4MjonHNbfkq4Z9vYJNwkMwiFMXeszzucJjg+2tArXVaJEiJyGI2qm ZVaQ== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Df+Oa9rS0f2WMG1maNFKcRPGpybF4h2rOMhbwGy5yy4=; b=guvEpFb05UYFoBU4mGKdOX6bOfeiWbSCYlLLtrNxACtAEDjJY+PW4Fr2C04bweWtpU 1xkZjcxkyM0UFwm7fdt6+9phNM31YI86Oaw5W77G/3KrhZgH2Tz1hx9ojl9QIzoaKfzI DefEW3vM56CiMi3DHPek/M85jRn/HI52M5xgy4ti3RQBJHeD16IOCh0+N5UHYWn/Yg22 JQvVdgSBg1Ty/URN5jarkEcP2/GRL5ZtuAVYTp5QBCki4inWG9NAVA5mah+7SQaDcb5u iq8HmObv90boRuWseCBgQEPtlP5uw7GfxHgp5GREhJIgd3ch3B+FshAypmmNWWDE+C12 GuBA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=0UxSPQLq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f13si13232270edw.577.2020.10.12.12.11.23; Mon, 12 Oct 2020 12:11:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=0UxSPQLq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731284AbgJLTJP (ORCPT + 99 others); Mon, 12 Oct 2020 15:09:15 -0400 Received: from mail.kernel.org ([198.145.29.99]:52268 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388034AbgJLTC5 (ORCPT ); Mon, 12 Oct 2020 15:02:57 -0400 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 1C9A1214DB; Mon, 12 Oct 2020 19:02:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1602529376; bh=F5mjsWYsKPjZrD1iqQb+SSvkejCTMVs+yDwLbTwN5aQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=0UxSPQLq8O2sGbxMAHQgzStP9kJVqpeyXNr0ncLHRDSqQ5MdJRdsuaV9JUj7WNRcl QPDBx7y1/U9y5WBSG1Q++Bte0Fkkyl0JDeEZOHdHmRUA5fp7OcU3gSsE7aqRnPibMV gwdLOEB1bhpO0pMy2l1OyfVQaZOYIX0+JQyLffM0= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Vladimir Oltean , "David S . Miller" , Sasha Levin , netdev@vger.kernel.org Subject: [PATCH AUTOSEL 5.8 13/24] net: dsa: felix: fix incorrect action offsets for VCAP IS2 Date: Mon, 12 Oct 2020 15:02:28 -0400 Message-Id: <20201012190239.3279198-13-sashal@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201012190239.3279198-1-sashal@kernel.org> References: <20201012190239.3279198-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Vladimir Oltean [ Upstream commit 460e985ea07ec23d46af257e84e57b5409576577 ] The port mask width was larger than the actual number of ports, and therefore, all fields following this one were also shifted by the number of excess bits. But the driver doesn't use the REW_OP, SMAC_REPLACE_ENA or ACL_ID bits from the action vector, so the bug was inconsequential. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/dsa/ocelot/felix_vsc9959.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/net/dsa/ocelot/felix_vsc9959.c b/drivers/net/dsa/ocelot/felix_vsc9959.c index 7c167a394b762..885a59c97ff23 100644 --- a/drivers/net/dsa/ocelot/felix_vsc9959.c +++ b/drivers/net/dsa/ocelot/felix_vsc9959.c @@ -647,12 +647,12 @@ struct vcap_field vsc9959_vcap_is2_actions[] = { [VCAP_IS2_ACT_POLICE_ENA] = { 9, 1}, [VCAP_IS2_ACT_POLICE_IDX] = { 10, 9}, [VCAP_IS2_ACT_POLICE_VCAP_ONLY] = { 19, 1}, - [VCAP_IS2_ACT_PORT_MASK] = { 20, 11}, - [VCAP_IS2_ACT_REW_OP] = { 31, 9}, - [VCAP_IS2_ACT_SMAC_REPLACE_ENA] = { 40, 1}, - [VCAP_IS2_ACT_RSV] = { 41, 2}, - [VCAP_IS2_ACT_ACL_ID] = { 43, 6}, - [VCAP_IS2_ACT_HIT_CNT] = { 49, 32}, + [VCAP_IS2_ACT_PORT_MASK] = { 20, 6}, + [VCAP_IS2_ACT_REW_OP] = { 26, 9}, + [VCAP_IS2_ACT_SMAC_REPLACE_ENA] = { 35, 1}, + [VCAP_IS2_ACT_RSV] = { 36, 2}, + [VCAP_IS2_ACT_ACL_ID] = { 38, 6}, + [VCAP_IS2_ACT_HIT_CNT] = { 44, 32}, }; static const struct vcap_props vsc9959_vcap_props[] = { -- 2.25.1