All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ido Schimmel <idosch@idosch.org>
To: netdev@vger.kernel.org
Cc: davem@davemloft.net, kuba@kernel.org, jiri@mellanox.com,
	mlxsw@mellanox.com, Ido Schimmel <idosch@mellanox.com>
Subject: [PATCH net-next 07/11] mlxsw: spectrum_trap: Remove unnecessary field
Date: Mon, 25 May 2020 00:51:03 +0300	[thread overview]
Message-ID: <20200524215107.1315526-8-idosch@idosch.org> (raw)
In-Reply-To: <20200524215107.1315526-1-idosch@idosch.org>

From: Ido Schimmel <idosch@mellanox.com>

Now that traffic class (TC) and priority are set to the same value,
there is no need to store both. Remove the first.

Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Reviewed-by: Jiri Pirko <jiri@mellanox.com>
---
 drivers/net/ethernet/mellanox/mlxsw/spectrum_trap.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_trap.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum_trap.c
index 1d414d0e5431..78f983c1a056 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_trap.c
+++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_trap.c
@@ -21,7 +21,6 @@ struct mlxsw_sp_trap_group_item {
 	struct devlink_trap_group group;
 	u16 hw_group_id;
 	u8 priority;
-	u8 tc;
 };
 
 #define MLXSW_SP_TRAP_LISTENERS_MAX 3
@@ -207,25 +206,21 @@ static const struct mlxsw_sp_trap_group_item mlxsw_sp_trap_group_items_arr[] = {
 		.group = DEVLINK_TRAP_GROUP_GENERIC(L2_DROPS, 1),
 		.hw_group_id = MLXSW_REG_HTGT_TRAP_GROUP_SP_L2_DISCARDS,
 		.priority = 0,
-		.tc = 0,
 	},
 	{
 		.group = DEVLINK_TRAP_GROUP_GENERIC(L3_DROPS, 1),
 		.hw_group_id = MLXSW_REG_HTGT_TRAP_GROUP_SP_L3_DISCARDS,
 		.priority = 0,
-		.tc = 0,
 	},
 	{
 		.group = DEVLINK_TRAP_GROUP_GENERIC(TUNNEL_DROPS, 1),
 		.hw_group_id = MLXSW_REG_HTGT_TRAP_GROUP_SP_TUNNEL_DISCARDS,
 		.priority = 0,
-		.tc = 0,
 	},
 	{
 		.group = DEVLINK_TRAP_GROUP_GENERIC(ACL_DROPS, 1),
 		.hw_group_id = MLXSW_REG_HTGT_TRAP_GROUP_SP_ACL_DISCARDS,
 		.priority = 0,
-		.tc = 0,
 	},
 };
 
@@ -865,7 +860,7 @@ __mlxsw_sp_trap_group_init(struct mlxsw_core *mlxsw_core,
 	}
 
 	mlxsw_reg_htgt_pack(htgt_pl, group_item->hw_group_id, hw_policer_id,
-			    group_item->priority, group_item->tc);
+			    group_item->priority, group_item->priority);
 	return mlxsw_reg_write(mlxsw_core, MLXSW_REG(htgt), htgt_pl);
 }
 
-- 
2.26.2


  parent reply	other threads:[~2020-05-24 21:51 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-24 21:50 [PATCH net-next 00/11] mlxsw: Various trap changes - part 1 Ido Schimmel
2020-05-24 21:50 ` [PATCH net-next 01/11] mlxsw: spectrum: Rename IGMP trap group Ido Schimmel
2020-05-24 21:50 ` [PATCH net-next 02/11] mlxsw: spectrum: Use same trap group for MLD and IGMP packets Ido Schimmel
2020-05-24 21:50 ` [PATCH net-next 03/11] mlxsw: spectrum: Trap IPv4 DHCP packets in router Ido Schimmel
2020-05-24 21:51 ` [PATCH net-next 04/11] mlxsw: spectrum: Change default rate and priority of DHCP packets Ido Schimmel
2020-05-24 21:51 ` [PATCH net-next 05/11] mlxsw: spectrum_buffers: Assign non-zero quotas to TC 0 of the CPU port Ido Schimmel
2020-05-24 21:51 ` [PATCH net-next 06/11] mlxsw: spectrum: Align TC and trap priority Ido Schimmel
2020-05-24 21:51 ` Ido Schimmel [this message]
2020-05-24 21:51 ` [PATCH net-next 08/11] mlxsw: spectrum: Rename ARP trap group Ido Schimmel
2020-05-24 21:51 ` [PATCH net-next 09/11] mlxsw: spectrum: Use same trap group for IPv6 ND and ARP packets Ido Schimmel
2020-05-24 21:51 ` [PATCH net-next 10/11] mlxsw: spectrum: Use dedicated trap group for sampled packets Ido Schimmel
2020-05-24 21:51 ` [PATCH net-next 11/11] mlxsw: spectrum: Fix spelling mistake in trap's name Ido Schimmel
2020-05-25  2:32 ` [PATCH net-next 00/11] mlxsw: Various trap changes - part 1 David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200524215107.1315526-8-idosch@idosch.org \
    --to=idosch@idosch.org \
    --cc=davem@davemloft.net \
    --cc=idosch@mellanox.com \
    --cc=jiri@mellanox.com \
    --cc=kuba@kernel.org \
    --cc=mlxsw@mellanox.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.