All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net 0/2] More incorrect VCAP offsets for mscc_ocelot switch
@ 2020-09-29 11:20 Vladimir Oltean
  2020-09-29 11:20 ` [PATCH net 1/2] net: dsa: felix: fix incorrect action offsets for VCAP IS2 Vladimir Oltean
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Vladimir Oltean @ 2020-09-29 11:20 UTC (permalink / raw)
  To: davem, netdev
  Cc: xiaoliang.yang_1, hongbo.wang, UNGLinuxDriver, claudiu.manoil,
	alexandre.belloni, andrew, vivien.didelot, f.fainelli, kuba

This small series fixes some wrong tc-flower action fields in the
Seville and Felix DSA drivers.

Vladimir Oltean (2):
  net: dsa: felix: fix incorrect action offsets for VCAP IS2
  net: dsa: seville: fix VCAP IS2 action width

 drivers/net/dsa/ocelot/felix_vsc9959.c   | 12 ++++++------
 drivers/net/dsa/ocelot/seville_vsc9953.c |  2 +-
 2 files changed, 7 insertions(+), 7 deletions(-)

-- 
2.25.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH net 1/2] net: dsa: felix: fix incorrect action offsets for VCAP IS2
  2020-09-29 11:20 [PATCH net 0/2] More incorrect VCAP offsets for mscc_ocelot switch Vladimir Oltean
@ 2020-09-29 11:20 ` Vladimir Oltean
  2020-09-29 11:20 ` [PATCH net 2/2] net: dsa: seville: fix VCAP IS2 action width Vladimir Oltean
  2020-09-29 20:24 ` [PATCH net 0/2] More incorrect VCAP offsets for mscc_ocelot switch David Miller
  2 siblings, 0 replies; 4+ messages in thread
From: Vladimir Oltean @ 2020-09-29 11:20 UTC (permalink / raw)
  To: davem, netdev
  Cc: xiaoliang.yang_1, hongbo.wang, UNGLinuxDriver, claudiu.manoil,
	alexandre.belloni, andrew, vivien.didelot, f.fainelli, kuba

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 <vladimir.oltean@nxp.com>
---
 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 2e9270c00096..af651ae03572 100644
--- a/drivers/net/dsa/ocelot/felix_vsc9959.c
+++ b/drivers/net/dsa/ocelot/felix_vsc9959.c
@@ -686,12 +686,12 @@ static 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


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH net 2/2] net: dsa: seville: fix VCAP IS2 action width
  2020-09-29 11:20 [PATCH net 0/2] More incorrect VCAP offsets for mscc_ocelot switch Vladimir Oltean
  2020-09-29 11:20 ` [PATCH net 1/2] net: dsa: felix: fix incorrect action offsets for VCAP IS2 Vladimir Oltean
@ 2020-09-29 11:20 ` Vladimir Oltean
  2020-09-29 20:24 ` [PATCH net 0/2] More incorrect VCAP offsets for mscc_ocelot switch David Miller
  2 siblings, 0 replies; 4+ messages in thread
From: Vladimir Oltean @ 2020-09-29 11:20 UTC (permalink / raw)
  To: davem, netdev
  Cc: xiaoliang.yang_1, hongbo.wang, UNGLinuxDriver, claudiu.manoil,
	alexandre.belloni, andrew, vivien.didelot, f.fainelli, kuba

Since the actions are packed together in the action RAM, an incorrect
action width means that no action except the first one would behave
correctly.

The tc-flower offload has probably not been tested on this hardware
since its introduction.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
---
 drivers/net/dsa/ocelot/seville_vsc9953.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/dsa/ocelot/seville_vsc9953.c b/drivers/net/dsa/ocelot/seville_vsc9953.c
index e28dd600f464..64e7c1693ab2 100644
--- a/drivers/net/dsa/ocelot/seville_vsc9953.c
+++ b/drivers/net/dsa/ocelot/seville_vsc9953.c
@@ -696,7 +696,7 @@ static const struct vcap_props vsc9953_vcap_props[] = {
 		.action_type_width = 1,
 		.action_table = {
 			[IS2_ACTION_TYPE_NORMAL] = {
-				.width = 44,
+				.width = 50, /* HIT_CNT not included */
 				.count = 2
 			},
 			[IS2_ACTION_TYPE_SMAC_SIP] = {
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH net 0/2] More incorrect VCAP offsets for mscc_ocelot switch
  2020-09-29 11:20 [PATCH net 0/2] More incorrect VCAP offsets for mscc_ocelot switch Vladimir Oltean
  2020-09-29 11:20 ` [PATCH net 1/2] net: dsa: felix: fix incorrect action offsets for VCAP IS2 Vladimir Oltean
  2020-09-29 11:20 ` [PATCH net 2/2] net: dsa: seville: fix VCAP IS2 action width Vladimir Oltean
@ 2020-09-29 20:24 ` David Miller
  2 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2020-09-29 20:24 UTC (permalink / raw)
  To: vladimir.oltean
  Cc: netdev, xiaoliang.yang_1, hongbo.wang, UNGLinuxDriver,
	claudiu.manoil, alexandre.belloni, andrew, vivien.didelot,
	f.fainelli, kuba

From: Vladimir Oltean <vladimir.oltean@nxp.com>
Date: Tue, 29 Sep 2020 14:20:23 +0300

> This small series fixes some wrong tc-flower action fields in the
> Seville and Felix DSA drivers.

Series applied.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-09-29 20:24 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-29 11:20 [PATCH net 0/2] More incorrect VCAP offsets for mscc_ocelot switch Vladimir Oltean
2020-09-29 11:20 ` [PATCH net 1/2] net: dsa: felix: fix incorrect action offsets for VCAP IS2 Vladimir Oltean
2020-09-29 11:20 ` [PATCH net 2/2] net: dsa: seville: fix VCAP IS2 action width Vladimir Oltean
2020-09-29 20:24 ` [PATCH net 0/2] More incorrect VCAP offsets for mscc_ocelot switch David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.