Skip to content

Commit 0afc122

Browse files
Yuval Mintzdavem330
authored andcommitted
mlxsw: reg: Add ext and tc-cong counter groups
This adds the counter group definitions for 2 new counter groups which are necessary for gaining ECN & wred counters. Signed-off-by: Yuval Mintz <yuvalm@mellanox.com> Signed-off-by: Nogah Frankel <nogahf@mellanox.com> Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 96f17e0 commit 0afc122

File tree

1 file changed

+19
-0
lines changed
  • drivers/net/ethernet/mellanox/mlxsw

1 file changed

+19
-0
lines changed

drivers/net/ethernet/mellanox/mlxsw/reg.h

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3341,8 +3341,10 @@ MLXSW_ITEM32(reg, ppcnt, pnat, 0x00, 14, 2);
33413341

33423342
enum mlxsw_reg_ppcnt_grp {
33433343
MLXSW_REG_PPCNT_IEEE_8023_CNT = 0x0,
3344+
MLXSW_REG_PPCNT_EXT_CNT = 0x5,
33443345
MLXSW_REG_PPCNT_PRIO_CNT = 0x10,
33453346
MLXSW_REG_PPCNT_TC_CNT = 0x11,
3347+
MLXSW_REG_PPCNT_TC_CONG_TC = 0x13,
33463348
};
33473349

33483350
/* reg_ppcnt_grp
@@ -3358,6 +3360,7 @@ enum mlxsw_reg_ppcnt_grp {
33583360
* 0x10: Per Priority Counters
33593361
* 0x11: Per Traffic Class Counters
33603362
* 0x12: Physical Layer Counters
3363+
* 0x13: Per Traffic Class Congestion Counters
33613364
* Access: Index
33623365
*/
33633366
MLXSW_ITEM32(reg, ppcnt, grp, 0x00, 0, 6);
@@ -3496,6 +3499,14 @@ MLXSW_ITEM64(reg, ppcnt, a_pause_mac_ctrl_frames_received,
34963499
MLXSW_ITEM64(reg, ppcnt, a_pause_mac_ctrl_frames_transmitted,
34973500
MLXSW_REG_PPCNT_COUNTERS_OFFSET + 0x90, 0, 64);
34983501

3502+
/* Ethernet Extended Counter Group Counters */
3503+
3504+
/* reg_ppcnt_ecn_marked
3505+
* Access: RO
3506+
*/
3507+
MLXSW_ITEM64(reg, ppcnt, ecn_marked,
3508+
MLXSW_REG_PPCNT_COUNTERS_OFFSET + 0x08, 0, 64);
3509+
34993510
/* Ethernet Per Priority Group Counters */
35003511

35013512
/* reg_ppcnt_rx_octets
@@ -3571,6 +3582,14 @@ MLXSW_ITEM64(reg, ppcnt, tc_transmit_queue,
35713582
MLXSW_ITEM64(reg, ppcnt, tc_no_buffer_discard_uc,
35723583
MLXSW_REG_PPCNT_COUNTERS_OFFSET + 0x08, 0, 64);
35733584

3585+
/* Ethernet Per Traffic Class Congestion Group Counters */
3586+
3587+
/* reg_ppcnt_wred_discard
3588+
* Access: RO
3589+
*/
3590+
MLXSW_ITEM64(reg, ppcnt, wred_discard,
3591+
MLXSW_REG_PPCNT_COUNTERS_OFFSET + 0x00, 0, 64);
3592+
35743593
static inline void mlxsw_reg_ppcnt_pack(char *payload, u8 local_port,
35753594
enum mlxsw_reg_ppcnt_grp grp,
35763595
u8 prio_tc)

0 commit comments

Comments
 (0)