aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/ti/netcp_ethss.c
diff options
context:
space:
mode:
authorWingMan Kwok <w-kwok2@ti.com>2015-07-23 15:57:24 -0400
committerDavid S. Miller <davem@davemloft.net>2015-07-27 03:18:40 -0400
commit5be4001eccb954da7f8ae68248167d3dbb6e7177 (patch)
tree1aa17ab545d42b21157407ab4a20777692530ac6 /drivers/net/ethernet/ti/netcp_ethss.c
parent489e8a2f09d772afc98a85ca477bb6bc52400c26 (diff)
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>
Diffstat (limited to 'drivers/net/ethernet/ti/netcp_ethss.c')
-rw-r--r--drivers/net/ethernet/ti/netcp_ethss.c177
1 files changed, 174 insertions, 3 deletions
diff --git a/drivers/net/ethernet/ti/netcp_ethss.c b/drivers/net/ethernet/ti/netcp_ethss.c
index aa330669aa08..01a955cf5603 100644
--- a/drivers/net/ethernet/ti/netcp_ethss.c
+++ b/drivers/net/ethernet/ti/netcp_ethss.c
@@ -872,7 +872,7 @@ static const struct netcp_ethtool_stat gbe13_et_stats[] = {
872}; 872};
873 873
874/* This is the size of entries in GBENU_STATS_HOST */ 874/* 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
876 876
877#define GBENU_STATS_HOST(field) \ 877#define GBENU_STATS_HOST(field) \
878{ \ 878{ \
@@ -881,8 +881,8 @@ static const struct netcp_ethtool_stat gbe13_et_stats[] = {
881 offsetof(struct gbenu_hw_stats, field) \ 881 offsetof(struct gbenu_hw_stats, field) \
882} 882}
883 883
884/* This is the size of entries in GBENU_STATS_HOST */ 884/* This is the size of entries in GBENU_STATS_PORT */
885#define GBENU_ET_STATS_PORT_SIZE 46 885#define GBENU_ET_STATS_PORT_SIZE 65
886 886
887#define GBENU_STATS_P1(field) \ 887#define GBENU_STATS_P1(field) \
888{ \ 888{ \
@@ -974,7 +974,26 @@ static const struct netcp_ethtool_stat gbenu_et_stats[] = {
974 GBENU_STATS_HOST(ale_unknown_mcast_bytes), 974 GBENU_STATS_HOST(ale_unknown_mcast_bytes),
975 GBENU_STATS_HOST(ale_unknown_bcast), 975 GBENU_STATS_HOST(ale_unknown_bcast),
976 GBENU_STATS_HOST(ale_unknown_bcast_bytes), 976 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),
977 GBENU_STATS_HOST(tx_mem_protect_err), 980 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),
978 /* GBENU Module 1 */ 997 /* GBENU Module 1 */
979 GBENU_STATS_P1(rx_good_frames), 998 GBENU_STATS_P1(rx_good_frames),
980 GBENU_STATS_P1(rx_broadcast_frames), 999 GBENU_STATS_P1(rx_broadcast_frames),
@@ -1021,7 +1040,26 @@ static const struct netcp_ethtool_stat gbenu_et_stats[] = {
1021 GBENU_STATS_P1(ale_unknown_mcast_bytes), 1040 GBENU_STATS_P1(ale_unknown_mcast_bytes),
1022 GBENU_STATS_P1(ale_unknown_bcast), 1041 GBENU_STATS_P1(ale_unknown_bcast),
1023 GBENU_STATS_P1(ale_unknown_bcast_bytes), 1042 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),
1024 GBENU_STATS_P1(tx_mem_protect_err), 1046 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),
1025 /* GBENU Module 2 */ 1063 /* GBENU Module 2 */
1026 GBENU_STATS_P2(rx_good_frames), 1064 GBENU_STATS_P2(rx_good_frames),
1027 GBENU_STATS_P2(rx_broadcast_frames), 1065 GBENU_STATS_P2(rx_broadcast_frames),
@@ -1068,7 +1106,26 @@ static const struct netcp_ethtool_stat gbenu_et_stats[] = {
1068 GBENU_STATS_P2(ale_unknown_mcast_bytes), 1106 GBENU_STATS_P2(ale_unknown_mcast_bytes),
1069 GBENU_STATS_P2(ale_unknown_bcast), 1107 GBENU_STATS_P2(ale_unknown_bcast),
1070 GBENU_STATS_P2(ale_unknown_bcast_bytes), 1108 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),
1071 GBENU_STATS_P2(tx_mem_protect_err), 1112 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),
1072 /* GBENU Module 3 */ 1129 /* GBENU Module 3 */
1073 GBENU_STATS_P3(rx_good_frames), 1130 GBENU_STATS_P3(rx_good_frames),
1074 GBENU_STATS_P3(rx_broadcast_frames), 1131 GBENU_STATS_P3(rx_broadcast_frames),
@@ -1115,7 +1172,26 @@ static const struct netcp_ethtool_stat gbenu_et_stats[] = {
1115 GBENU_STATS_P3(ale_unknown_mcast_bytes), 1172 GBENU_STATS_P3(ale_unknown_mcast_bytes),
1116 GBENU_STATS_P3(ale_unknown_bcast), 1173 GBENU_STATS_P3(ale_unknown_bcast),
1117 GBENU_STATS_P3(ale_unknown_bcast_bytes), 1174 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),
1118 GBENU_STATS_P3(tx_mem_protect_err), 1178 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),
1119 /* GBENU Module 4 */ 1195 /* GBENU Module 4 */
1120 GBENU_STATS_P4(rx_good_frames), 1196 GBENU_STATS_P4(rx_good_frames),
1121 GBENU_STATS_P4(rx_broadcast_frames), 1197 GBENU_STATS_P4(rx_broadcast_frames),
@@ -1162,7 +1238,26 @@ static const struct netcp_ethtool_stat gbenu_et_stats[] = {
1162 GBENU_STATS_P4(ale_unknown_mcast_bytes), 1238 GBENU_STATS_P4(ale_unknown_mcast_bytes),
1163 GBENU_STATS_P4(ale_unknown_bcast), 1239 GBENU_STATS_P4(ale_unknown_bcast),
1164 GBENU_STATS_P4(ale_unknown_bcast_bytes), 1240 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),
1165 GBENU_STATS_P4(tx_mem_protect_err), 1244 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),
1166 /* GBENU Module 5 */ 1261 /* GBENU Module 5 */
1167 GBENU_STATS_P5(rx_good_frames), 1262 GBENU_STATS_P5(rx_good_frames),
1168 GBENU_STATS_P5(rx_broadcast_frames), 1263 GBENU_STATS_P5(rx_broadcast_frames),
@@ -1209,7 +1304,26 @@ static const struct netcp_ethtool_stat gbenu_et_stats[] = {
1209 GBENU_STATS_P5(ale_unknown_mcast_bytes), 1304 GBENU_STATS_P5(ale_unknown_mcast_bytes),
1210 GBENU_STATS_P5(ale_unknown_bcast), 1305 GBENU_STATS_P5(ale_unknown_bcast),
1211 GBENU_STATS_P5(ale_unknown_bcast_bytes), 1306 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),
1212 GBENU_STATS_P5(tx_mem_protect_err), 1310 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),
1213 /* GBENU Module 6 */ 1327 /* GBENU Module 6 */
1214 GBENU_STATS_P6(rx_good_frames), 1328 GBENU_STATS_P6(rx_good_frames),
1215 GBENU_STATS_P6(rx_broadcast_frames), 1329 GBENU_STATS_P6(rx_broadcast_frames),
@@ -1256,7 +1370,26 @@ static const struct netcp_ethtool_stat gbenu_et_stats[] = {
1256 GBENU_STATS_P6(ale_unknown_mcast_bytes), 1370 GBENU_STATS_P6(ale_unknown_mcast_bytes),
1257 GBENU_STATS_P6(ale_unknown_bcast), 1371 GBENU_STATS_P6(ale_unknown_bcast),
1258 GBENU_STATS_P6(ale_unknown_bcast_bytes), 1372 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),
1259 GBENU_STATS_P6(tx_mem_protect_err), 1376 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),
1260 /* GBENU Module 7 */ 1393 /* GBENU Module 7 */
1261 GBENU_STATS_P7(rx_good_frames), 1394 GBENU_STATS_P7(rx_good_frames),
1262 GBENU_STATS_P7(rx_broadcast_frames), 1395 GBENU_STATS_P7(rx_broadcast_frames),
@@ -1303,7 +1436,26 @@ static const struct netcp_ethtool_stat gbenu_et_stats[] = {
1303 GBENU_STATS_P7(ale_unknown_mcast_bytes), 1436 GBENU_STATS_P7(ale_unknown_mcast_bytes),
1304 GBENU_STATS_P7(ale_unknown_bcast), 1437 GBENU_STATS_P7(ale_unknown_bcast),
1305 GBENU_STATS_P7(ale_unknown_bcast_bytes), 1438 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),
1306 GBENU_STATS_P7(tx_mem_protect_err), 1442 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),
1307 /* GBENU Module 8 */ 1459 /* GBENU Module 8 */
1308 GBENU_STATS_P8(rx_good_frames), 1460 GBENU_STATS_P8(rx_good_frames),
1309 GBENU_STATS_P8(rx_broadcast_frames), 1461 GBENU_STATS_P8(rx_broadcast_frames),
@@ -1350,7 +1502,26 @@ static const struct netcp_ethtool_stat gbenu_et_stats[] = {
1350 GBENU_STATS_P8(ale_unknown_mcast_bytes), 1502 GBENU_STATS_P8(ale_unknown_mcast_bytes),
1351 GBENU_STATS_P8(ale_unknown_bcast), 1503 GBENU_STATS_P8(ale_unknown_bcast),
1352 GBENU_STATS_P8(ale_unknown_bcast_bytes), 1504 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),
1353 GBENU_STATS_P8(tx_mem_protect_err), 1508 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),
1354}; 1525};
1355 1526
1356#define XGBE_STATS0_INFO(field) \ 1527#define XGBE_STATS0_INFO(field) \