Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
libethernet
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
HAL
libethernet
Commits
99d02dc4
Commit
99d02dc4
authored
1 year ago
by
Amit Kumar
Browse files
Options
Downloads
Patches
Plain Diff
linux: pause frame stats increment
parent
9c0e9ecd
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!17
linux: pause frame stats increment
Pipeline
#138792
passed
1 year ago
Stage: static_code_analysis
Stage: compile_test
Changes
3
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
ethernet.h
+1
-0
1 addition, 0 deletions
ethernet.h
linux/linux/linux_eth.c
+5
-1
5 additions, 1 deletion
linux/linux/linux_eth.c
linux/mtk/mtk_eth.c
+2
-0
2 additions, 0 deletions
linux/mtk/mtk_eth.c
with
8 additions
and
1 deletion
ethernet.h
+
1
−
0
View file @
99d02dc4
...
@@ -72,6 +72,7 @@ struct eth_rmon_stats {
...
@@ -72,6 +72,7 @@ struct eth_rmon_stats {
uint64_t
packets_256to511bytes
;
uint64_t
packets_256to511bytes
;
uint64_t
packets_512to1023bytes
;
uint64_t
packets_512to1023bytes
;
uint64_t
packets_1024to1518bytes
;
uint64_t
packets_1024to1518bytes
;
uint64_t
pause_packets
;
}
tx
,
rx
;
}
tx
,
rx
;
};
};
...
...
This diff is collapsed.
Click to expand it.
linux/linux/linux_eth.c
+
5
−
1
View file @
99d02dc4
...
@@ -39,6 +39,8 @@ typedef enum {
...
@@ -39,6 +39,8 @@ typedef enum {
iow_tx_fraglist_nr_frags_packets
,
iow_tx_fraglist_nr_frags_packets
,
iow_tx_tso_packets
,
iow_tx_tso_packets
,
iow_tx_tso_drop_packets
,
iow_tx_tso_drop_packets
,
iow_tx_gso_packets
,
iow_tx_gso_dropped_packets
,
iow_rx_frame
,
iow_rx_frame
,
iow_rx_bytes
,
iow_rx_bytes
,
iow_rx_bytes_g
,
iow_rx_bytes_g
,
...
@@ -315,7 +317,7 @@ int linux_eth_get_rmon_stats(const char *ifname, struct eth_rmon_stats *rmon)
...
@@ -315,7 +317,7 @@ int linux_eth_get_rmon_stats(const char *ifname, struct eth_rmon_stats *rmon)
ret
=
-
1
;
ret
=
-
1
;
rmon
->
tx
.
packets
=
(
uint64_t
)
g_linux_stats
->
data
[
iow_tx_packets
];
rmon
->
tx
.
packets
=
(
uint64_t
)
g_linux_stats
->
data
[
iow_tx_packets
];
rmon
->
tx
.
bytes
=
(
uint64_t
)
g_linux_stats
->
data
[
iow_tx_byte
s
];
rmon
->
tx
.
bytes
=
(
uint64_t
)
g_linux_stats
->
data
[
iow_tx_byte
];
rmon
->
tx
.
crc_err_packets
=
0
;
rmon
->
tx
.
crc_err_packets
=
0
;
/* These two counters are marked zero because they dont
/* These two counters are marked zero because they dont
* hold much relevancy to Customer
* hold much relevancy to Customer
...
@@ -328,6 +330,7 @@ int linux_eth_get_rmon_stats(const char *ifname, struct eth_rmon_stats *rmon)
...
@@ -328,6 +330,7 @@ int linux_eth_get_rmon_stats(const char *ifname, struct eth_rmon_stats *rmon)
rmon
->
tx
.
packets_256to511bytes
=
(
uint64_t
)
g_linux_stats
->
data
[
iow_tx_pkt256to511
];
rmon
->
tx
.
packets_256to511bytes
=
(
uint64_t
)
g_linux_stats
->
data
[
iow_tx_pkt256to511
];
rmon
->
tx
.
packets_512to1023bytes
=
(
uint64_t
)
g_linux_stats
->
data
[
iow_tx_pkt512to1023
];
rmon
->
tx
.
packets_512to1023bytes
=
(
uint64_t
)
g_linux_stats
->
data
[
iow_tx_pkt512to1023
];
rmon
->
tx
.
packets_1024to1518bytes
=
(
uint64_t
)
g_linux_stats
->
data
[
iow_tx_pkt1024tomax
];
rmon
->
tx
.
packets_1024to1518bytes
=
(
uint64_t
)
g_linux_stats
->
data
[
iow_tx_pkt1024tomax
];
rmon
->
tx
.
pause_packets
=
(
uint64_t
)
g_linux_stats
->
data
[
iow_tx_pause
];
rmon
->
rx
.
bytes
=
(
uint64_t
)
g_linux_stats
->
data
[
iow_rx_byte
];
rmon
->
rx
.
bytes
=
(
uint64_t
)
g_linux_stats
->
data
[
iow_rx_byte
];
rmon
->
rx
.
packets
=
(
uint64_t
)
g_linux_stats
->
data
[
iow_rx_packets
];
rmon
->
rx
.
packets
=
(
uint64_t
)
g_linux_stats
->
data
[
iow_rx_packets
];
...
@@ -338,6 +341,7 @@ int linux_eth_get_rmon_stats(const char *ifname, struct eth_rmon_stats *rmon)
...
@@ -338,6 +341,7 @@ int linux_eth_get_rmon_stats(const char *ifname, struct eth_rmon_stats *rmon)
rmon
->
rx
.
over_sz_packets
=
(
uint64_t
)
g_linux_stats
->
data
[
iow_rx_oversize
];
rmon
->
rx
.
over_sz_packets
=
(
uint64_t
)
g_linux_stats
->
data
[
iow_rx_oversize
];
rmon
->
rx
.
packets_64bytes
=
(
uint64_t
)
g_linux_stats
->
data
[
iow_rx_pkt64
];
rmon
->
rx
.
packets_64bytes
=
(
uint64_t
)
g_linux_stats
->
data
[
iow_rx_pkt64
];
rmon
->
rx
.
packets_65to127bytes
=
(
uint64_t
)
g_linux_stats
->
data
[
iow_rx_pkt65to127
];
rmon
->
rx
.
packets_65to127bytes
=
(
uint64_t
)
g_linux_stats
->
data
[
iow_rx_pkt65to127
];
rmon
->
rx
.
pause_packets
=
(
uint64_t
)
g_linux_stats
->
data
[
iow_rx_pause
];
free
(
g_linux_stats
);
free
(
g_linux_stats
);
...
...
This diff is collapsed.
Click to expand it.
linux/mtk/mtk_eth.c
+
2
−
0
View file @
99d02dc4
...
@@ -214,6 +214,7 @@ int mtk_eth_get_rmon_stats(const char *ifname, struct eth_rmon_stats *rmon)
...
@@ -214,6 +214,7 @@ int mtk_eth_get_rmon_stats(const char *ifname, struct eth_rmon_stats *rmon)
rmon
->
tx
.
packets_256to511bytes
=
g_mtk_stat
.
data
[
iow_TxPktSz256To511
];
rmon
->
tx
.
packets_256to511bytes
=
g_mtk_stat
.
data
[
iow_TxPktSz256To511
];
rmon
->
tx
.
packets_512to1023bytes
=
g_mtk_stat
.
data
[
iow_TxPktSz512To1023
];
rmon
->
tx
.
packets_512to1023bytes
=
g_mtk_stat
.
data
[
iow_TxPktSz512To1023
];
rmon
->
tx
.
packets_1024to1518bytes
=
g_mtk_stat
.
data
[
iow_Tx1024ToMax
];
rmon
->
tx
.
packets_1024to1518bytes
=
g_mtk_stat
.
data
[
iow_Tx1024ToMax
];
rmon
->
tx
.
pause_packets
=
g_mtk_stat
.
data
[
iow_TxPause
];
rmon
->
rx
.
bytes
=
g_mtk_stat
.
data
[
iow_RxBytes
];
rmon
->
rx
.
bytes
=
g_mtk_stat
.
data
[
iow_RxBytes
];
rmon
->
rx
.
packets
=
g_mtk_stat
.
data
[
iow_rx_packets
];
rmon
->
rx
.
packets
=
g_mtk_stat
.
data
[
iow_rx_packets
];
...
@@ -228,6 +229,7 @@ int mtk_eth_get_rmon_stats(const char *ifname, struct eth_rmon_stats *rmon)
...
@@ -228,6 +229,7 @@ int mtk_eth_get_rmon_stats(const char *ifname, struct eth_rmon_stats *rmon)
rmon
->
rx
.
packets_256to511bytes
=
g_mtk_stat
.
data
[
iow_RxPktSz256To511
];
rmon
->
rx
.
packets_256to511bytes
=
g_mtk_stat
.
data
[
iow_RxPktSz256To511
];
rmon
->
rx
.
packets_512to1023bytes
=
g_mtk_stat
.
data
[
iow_RxPktSz512To1023
];
rmon
->
rx
.
packets_512to1023bytes
=
g_mtk_stat
.
data
[
iow_RxPktSz512To1023
];
rmon
->
rx
.
packets_1024to1518bytes
=
g_mtk_stat
.
data
[
iow_RxPktSz1024ToMax
];
rmon
->
rx
.
packets_1024to1518bytes
=
g_mtk_stat
.
data
[
iow_RxPktSz1024ToMax
];
rmon
->
tx
.
pause_packets
=
g_mtk_stat
.
data
[
iow_RxPause
];
return
ret
;
return
ret
;
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment