Skip to content

Commit 5be4001

Browse files
wingmankwokdavem330
authored andcommitted
net: netcp: Adds missing statistics for K2L and K2E
This patch adds the missing statistics for the host and slave ports of the CPSW on K2L and K2E platforms. Signed-off-by: WingMan Kwok <w-kwok2@ti.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 489e8a2 commit 5be4001

File tree

1 file changed

+174
-3
lines changed

1 file changed

+174
-3
lines changed

drivers/net/ethernet/ti/netcp_ethss.c

Lines changed: 174 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -872,7 +872,7 @@ static const struct netcp_ethtool_stat gbe13_et_stats[] = {
872872
};
873873

874874
/* This is the size of entries in GBENU_STATS_HOST */
875-
#define GBENU_ET_STATS_HOST_SIZE 33
875+
#define GBENU_ET_STATS_HOST_SIZE 52
876876

877877
#define GBENU_STATS_HOST(field) \
878878
{ \
@@ -881,8 +881,8 @@ static const struct netcp_ethtool_stat gbe13_et_stats[] = {
881881
offsetof(struct gbenu_hw_stats, field) \
882882
}
883883

884-
/* This is the size of entries in GBENU_STATS_HOST */
885-
#define GBENU_ET_STATS_PORT_SIZE 46
884+
/* This is the size of entries in GBENU_STATS_PORT */
885+
#define GBENU_ET_STATS_PORT_SIZE 65
886886

887887
#define GBENU_STATS_P1(field) \
888888
{ \
@@ -974,7 +974,26 @@ static const struct netcp_ethtool_stat gbenu_et_stats[] = {
974974
GBENU_STATS_HOST(ale_unknown_mcast_bytes),
975975
GBENU_STATS_HOST(ale_unknown_bcast),
976976
GBENU_STATS_HOST(ale_unknown_bcast_bytes),
977+
GBENU_STATS_HOST(ale_pol_match),
978+
GBENU_STATS_HOST(ale_pol_match_red),
979+
GBENU_STATS_HOST(ale_pol_match_yellow),
977980
GBENU_STATS_HOST(tx_mem_protect_err),
981+
GBENU_STATS_HOST(tx_pri0_drop),
982+
GBENU_STATS_HOST(tx_pri1_drop),
983+
GBENU_STATS_HOST(tx_pri2_drop),
984+
GBENU_STATS_HOST(tx_pri3_drop),
985+
GBENU_STATS_HOST(tx_pri4_drop),
986+
GBENU_STATS_HOST(tx_pri5_drop),
987+
GBENU_STATS_HOST(tx_pri6_drop),
988+
GBENU_STATS_HOST(tx_pri7_drop),
989+
GBENU_STATS_HOST(tx_pri0_drop_bcnt),
990+
GBENU_STATS_HOST(tx_pri1_drop_bcnt),
991+
GBENU_STATS_HOST(tx_pri2_drop_bcnt),
992+
GBENU_STATS_HOST(tx_pri3_drop_bcnt),
993+
GBENU_STATS_HOST(tx_pri4_drop_bcnt),
994+
GBENU_STATS_HOST(tx_pri5_drop_bcnt),
995+
GBENU_STATS_HOST(tx_pri6_drop_bcnt),
996+
GBENU_STATS_HOST(tx_pri7_drop_bcnt),
978997
/* GBENU Module 1 */
979998
GBENU_STATS_P1(rx_good_frames),
980999
GBENU_STATS_P1(rx_broadcast_frames),
@@ -1021,7 +1040,26 @@ static const struct netcp_ethtool_stat gbenu_et_stats[] = {
10211040
GBENU_STATS_P1(ale_unknown_mcast_bytes),
10221041
GBENU_STATS_P1(ale_unknown_bcast),
10231042
GBENU_STATS_P1(ale_unknown_bcast_bytes),
1043+
GBENU_STATS_P1(ale_pol_match),
1044+
GBENU_STATS_P1(ale_pol_match_red),
1045+
GBENU_STATS_P1(ale_pol_match_yellow),
10241046
GBENU_STATS_P1(tx_mem_protect_err),
1047+
GBENU_STATS_P1(tx_pri0_drop),
1048+
GBENU_STATS_P1(tx_pri1_drop),
1049+
GBENU_STATS_P1(tx_pri2_drop),
1050+
GBENU_STATS_P1(tx_pri3_drop),
1051+
GBENU_STATS_P1(tx_pri4_drop),
1052+
GBENU_STATS_P1(tx_pri5_drop),
1053+
GBENU_STATS_P1(tx_pri6_drop),
1054+
GBENU_STATS_P1(tx_pri7_drop),
1055+
GBENU_STATS_P1(tx_pri0_drop_bcnt),
1056+
GBENU_STATS_P1(tx_pri1_drop_bcnt),
1057+
GBENU_STATS_P1(tx_pri2_drop_bcnt),
1058+
GBENU_STATS_P1(tx_pri3_drop_bcnt),
1059+
GBENU_STATS_P1(tx_pri4_drop_bcnt),
1060+
GBENU_STATS_P1(tx_pri5_drop_bcnt),
1061+
GBENU_STATS_P1(tx_pri6_drop_bcnt),
1062+
GBENU_STATS_P1(tx_pri7_drop_bcnt),
10251063
/* GBENU Module 2 */
10261064
GBENU_STATS_P2(rx_good_frames),
10271065
GBENU_STATS_P2(rx_broadcast_frames),
@@ -1068,7 +1106,26 @@ static const struct netcp_ethtool_stat gbenu_et_stats[] = {
10681106
GBENU_STATS_P2(ale_unknown_mcast_bytes),
10691107
GBENU_STATS_P2(ale_unknown_bcast),
10701108
GBENU_STATS_P2(ale_unknown_bcast_bytes),
1109+
GBENU_STATS_P2(ale_pol_match),
1110+
GBENU_STATS_P2(ale_pol_match_red),
1111+
GBENU_STATS_P2(ale_pol_match_yellow),
10711112
GBENU_STATS_P2(tx_mem_protect_err),
1113+
GBENU_STATS_P2(tx_pri0_drop),
1114+
GBENU_STATS_P2(tx_pri1_drop),
1115+
GBENU_STATS_P2(tx_pri2_drop),
1116+
GBENU_STATS_P2(tx_pri3_drop),
1117+
GBENU_STATS_P2(tx_pri4_drop),
1118+
GBENU_STATS_P2(tx_pri5_drop),
1119+
GBENU_STATS_P2(tx_pri6_drop),
1120+
GBENU_STATS_P2(tx_pri7_drop),
1121+
GBENU_STATS_P2(tx_pri0_drop_bcnt),
1122+
GBENU_STATS_P2(tx_pri1_drop_bcnt),
1123+
GBENU_STATS_P2(tx_pri2_drop_bcnt),
1124+
GBENU_STATS_P2(tx_pri3_drop_bcnt),
1125+
GBENU_STATS_P2(tx_pri4_drop_bcnt),
1126+
GBENU_STATS_P2(tx_pri5_drop_bcnt),
1127+
GBENU_STATS_P2(tx_pri6_drop_bcnt),
1128+
GBENU_STATS_P2(tx_pri7_drop_bcnt),
10721129
/* GBENU Module 3 */
10731130
GBENU_STATS_P3(rx_good_frames),
10741131
GBENU_STATS_P3(rx_broadcast_frames),
@@ -1115,7 +1172,26 @@ static const struct netcp_ethtool_stat gbenu_et_stats[] = {
11151172
GBENU_STATS_P3(ale_unknown_mcast_bytes),
11161173
GBENU_STATS_P3(ale_unknown_bcast),
11171174
GBENU_STATS_P3(ale_unknown_bcast_bytes),
1175+
GBENU_STATS_P3(ale_pol_match),
1176+
GBENU_STATS_P3(ale_pol_match_red),
1177+
GBENU_STATS_P3(ale_pol_match_yellow),
11181178
GBENU_STATS_P3(tx_mem_protect_err),
1179+
GBENU_STATS_P3(tx_pri0_drop),
1180+
GBENU_STATS_P3(tx_pri1_drop),
1181+
GBENU_STATS_P3(tx_pri2_drop),
1182+
GBENU_STATS_P3(tx_pri3_drop),
1183+
GBENU_STATS_P3(tx_pri4_drop),
1184+
GBENU_STATS_P3(tx_pri5_drop),
1185+
GBENU_STATS_P3(tx_pri6_drop),
1186+
GBENU_STATS_P3(tx_pri7_drop),
1187+
GBENU_STATS_P3(tx_pri0_drop_bcnt),
1188+
GBENU_STATS_P3(tx_pri1_drop_bcnt),
1189+
GBENU_STATS_P3(tx_pri2_drop_bcnt),
1190+
GBENU_STATS_P3(tx_pri3_drop_bcnt),
1191+
GBENU_STATS_P3(tx_pri4_drop_bcnt),
1192+
GBENU_STATS_P3(tx_pri5_drop_bcnt),
1193+
GBENU_STATS_P3(tx_pri6_drop_bcnt),
1194+
GBENU_STATS_P3(tx_pri7_drop_bcnt),
11191195
/* GBENU Module 4 */
11201196
GBENU_STATS_P4(rx_good_frames),
11211197
GBENU_STATS_P4(rx_broadcast_frames),
@@ -1162,7 +1238,26 @@ static const struct netcp_ethtool_stat gbenu_et_stats[] = {
11621238
GBENU_STATS_P4(ale_unknown_mcast_bytes),
11631239
GBENU_STATS_P4(ale_unknown_bcast),
11641240
GBENU_STATS_P4(ale_unknown_bcast_bytes),
1241+
GBENU_STATS_P4(ale_pol_match),
1242+
GBENU_STATS_P4(ale_pol_match_red),
1243+
GBENU_STATS_P4(ale_pol_match_yellow),
11651244
GBENU_STATS_P4(tx_mem_protect_err),
1245+
GBENU_STATS_P4(tx_pri0_drop),
1246+
GBENU_STATS_P4(tx_pri1_drop),
1247+
GBENU_STATS_P4(tx_pri2_drop),
1248+
GBENU_STATS_P4(tx_pri3_drop),
1249+
GBENU_STATS_P4(tx_pri4_drop),
1250+
GBENU_STATS_P4(tx_pri5_drop),
1251+
GBENU_STATS_P4(tx_pri6_drop),
1252+
GBENU_STATS_P4(tx_pri7_drop),
1253+
GBENU_STATS_P4(tx_pri0_drop_bcnt),
1254+
GBENU_STATS_P4(tx_pri1_drop_bcnt),
1255+
GBENU_STATS_P4(tx_pri2_drop_bcnt),
1256+
GBENU_STATS_P4(tx_pri3_drop_bcnt),
1257+
GBENU_STATS_P4(tx_pri4_drop_bcnt),
1258+
GBENU_STATS_P4(tx_pri5_drop_bcnt),
1259+
GBENU_STATS_P4(tx_pri6_drop_bcnt),
1260+
GBENU_STATS_P4(tx_pri7_drop_bcnt),
11661261
/* GBENU Module 5 */
11671262
GBENU_STATS_P5(rx_good_frames),
11681263
GBENU_STATS_P5(rx_broadcast_frames),
@@ -1209,7 +1304,26 @@ static const struct netcp_ethtool_stat gbenu_et_stats[] = {
12091304
GBENU_STATS_P5(ale_unknown_mcast_bytes),
12101305
GBENU_STATS_P5(ale_unknown_bcast),
12111306
GBENU_STATS_P5(ale_unknown_bcast_bytes),
1307+
GBENU_STATS_P5(ale_pol_match),
1308+
GBENU_STATS_P5(ale_pol_match_red),
1309+
GBENU_STATS_P5(ale_pol_match_yellow),
12121310
GBENU_STATS_P5(tx_mem_protect_err),
1311+
GBENU_STATS_P5(tx_pri0_drop),
1312+
GBENU_STATS_P5(tx_pri1_drop),
1313+
GBENU_STATS_P5(tx_pri2_drop),
1314+
GBENU_STATS_P5(tx_pri3_drop),
1315+
GBENU_STATS_P5(tx_pri4_drop),
1316+
GBENU_STATS_P5(tx_pri5_drop),
1317+
GBENU_STATS_P5(tx_pri6_drop),
1318+
GBENU_STATS_P5(tx_pri7_drop),
1319+
GBENU_STATS_P5(tx_pri0_drop_bcnt),
1320+
GBENU_STATS_P5(tx_pri1_drop_bcnt),
1321+
GBENU_STATS_P5(tx_pri2_drop_bcnt),
1322+
GBENU_STATS_P5(tx_pri3_drop_bcnt),
1323+
GBENU_STATS_P5(tx_pri4_drop_bcnt),
1324+
GBENU_STATS_P5(tx_pri5_drop_bcnt),
1325+
GBENU_STATS_P5(tx_pri6_drop_bcnt),
1326+
GBENU_STATS_P5(tx_pri7_drop_bcnt),
12131327
/* GBENU Module 6 */
12141328
GBENU_STATS_P6(rx_good_frames),
12151329
GBENU_STATS_P6(rx_broadcast_frames),
@@ -1256,7 +1370,26 @@ static const struct netcp_ethtool_stat gbenu_et_stats[] = {
12561370
GBENU_STATS_P6(ale_unknown_mcast_bytes),
12571371
GBENU_STATS_P6(ale_unknown_bcast),
12581372
GBENU_STATS_P6(ale_unknown_bcast_bytes),
1373+
GBENU_STATS_P6(ale_pol_match),
1374+
GBENU_STATS_P6(ale_pol_match_red),
1375+
GBENU_STATS_P6(ale_pol_match_yellow),
12591376
GBENU_STATS_P6(tx_mem_protect_err),
1377+
GBENU_STATS_P6(tx_pri0_drop),
1378+
GBENU_STATS_P6(tx_pri1_drop),
1379+
GBENU_STATS_P6(tx_pri2_drop),
1380+
GBENU_STATS_P6(tx_pri3_drop),
1381+
GBENU_STATS_P6(tx_pri4_drop),
1382+
GBENU_STATS_P6(tx_pri5_drop),
1383+
GBENU_STATS_P6(tx_pri6_drop),
1384+
GBENU_STATS_P6(tx_pri7_drop),
1385+
GBENU_STATS_P6(tx_pri0_drop_bcnt),
1386+
GBENU_STATS_P6(tx_pri1_drop_bcnt),
1387+
GBENU_STATS_P6(tx_pri2_drop_bcnt),
1388+
GBENU_STATS_P6(tx_pri3_drop_bcnt),
1389+
GBENU_STATS_P6(tx_pri4_drop_bcnt),
1390+
GBENU_STATS_P6(tx_pri5_drop_bcnt),
1391+
GBENU_STATS_P6(tx_pri6_drop_bcnt),
1392+
GBENU_STATS_P6(tx_pri7_drop_bcnt),
12601393
/* GBENU Module 7 */
12611394
GBENU_STATS_P7(rx_good_frames),
12621395
GBENU_STATS_P7(rx_broadcast_frames),
@@ -1303,7 +1436,26 @@ static const struct netcp_ethtool_stat gbenu_et_stats[] = {
13031436
GBENU_STATS_P7(ale_unknown_mcast_bytes),
13041437
GBENU_STATS_P7(ale_unknown_bcast),
13051438
GBENU_STATS_P7(ale_unknown_bcast_bytes),
1439+
GBENU_STATS_P7(ale_pol_match),
1440+
GBENU_STATS_P7(ale_pol_match_red),
1441+
GBENU_STATS_P7(ale_pol_match_yellow),
13061442
GBENU_STATS_P7(tx_mem_protect_err),
1443+
GBENU_STATS_P7(tx_pri0_drop),
1444+
GBENU_STATS_P7(tx_pri1_drop),
1445+
GBENU_STATS_P7(tx_pri2_drop),
1446+
GBENU_STATS_P7(tx_pri3_drop),
1447+
GBENU_STATS_P7(tx_pri4_drop),
1448+
GBENU_STATS_P7(tx_pri5_drop),
1449+
GBENU_STATS_P7(tx_pri6_drop),
1450+
GBENU_STATS_P7(tx_pri7_drop),
1451+
GBENU_STATS_P7(tx_pri0_drop_bcnt),
1452+
GBENU_STATS_P7(tx_pri1_drop_bcnt),
1453+
GBENU_STATS_P7(tx_pri2_drop_bcnt),
1454+
GBENU_STATS_P7(tx_pri3_drop_bcnt),
1455+
GBENU_STATS_P7(tx_pri4_drop_bcnt),
1456+
GBENU_STATS_P7(tx_pri5_drop_bcnt),
1457+
GBENU_STATS_P7(tx_pri6_drop_bcnt),
1458+
GBENU_STATS_P7(tx_pri7_drop_bcnt),
13071459
/* GBENU Module 8 */
13081460
GBENU_STATS_P8(rx_good_frames),
13091461
GBENU_STATS_P8(rx_broadcast_frames),
@@ -1350,7 +1502,26 @@ static const struct netcp_ethtool_stat gbenu_et_stats[] = {
13501502
GBENU_STATS_P8(ale_unknown_mcast_bytes),
13511503
GBENU_STATS_P8(ale_unknown_bcast),
13521504
GBENU_STATS_P8(ale_unknown_bcast_bytes),
1505+
GBENU_STATS_P8(ale_pol_match),
1506+
GBENU_STATS_P8(ale_pol_match_red),
1507+
GBENU_STATS_P8(ale_pol_match_yellow),
13531508
GBENU_STATS_P8(tx_mem_protect_err),
1509+
GBENU_STATS_P8(tx_pri0_drop),
1510+
GBENU_STATS_P8(tx_pri1_drop),
1511+
GBENU_STATS_P8(tx_pri2_drop),
1512+
GBENU_STATS_P8(tx_pri3_drop),
1513+
GBENU_STATS_P8(tx_pri4_drop),
1514+
GBENU_STATS_P8(tx_pri5_drop),
1515+
GBENU_STATS_P8(tx_pri6_drop),
1516+
GBENU_STATS_P8(tx_pri7_drop),
1517+
GBENU_STATS_P8(tx_pri0_drop_bcnt),
1518+
GBENU_STATS_P8(tx_pri1_drop_bcnt),
1519+
GBENU_STATS_P8(tx_pri2_drop_bcnt),
1520+
GBENU_STATS_P8(tx_pri3_drop_bcnt),
1521+
GBENU_STATS_P8(tx_pri4_drop_bcnt),
1522+
GBENU_STATS_P8(tx_pri5_drop_bcnt),
1523+
GBENU_STATS_P8(tx_pri6_drop_bcnt),
1524+
GBENU_STATS_P8(tx_pri7_drop_bcnt),
13541525
};
13551526

13561527
#define XGBE_STATS0_INFO(field) \

0 commit comments

Comments
 (0)