Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Q
qosmngr
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
Container registry
Model registry
Operate
Environments
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
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
HAL
qosmngr
Commits
46032701
Commit
46032701
authored
Jul 29, 2021
by
Amit Kumar
Committed by
Rahul Thakur
Jul 29, 2021
Browse files
Options
Downloads
Patches
Plain Diff
qosmngr: accumulation of stats done based on driver does read and reset of stats or read.
parent
0a3ee19d
No related branches found
No related tags found
1 merge request
!10
qosmngr: accumulation of stats done based on driver does read and reset of stats or read.
Pipeline
#40489
failed
Jan 25, 2022
Stage: static_code_analysis
Stage: functional_test
Stage: api_test
Changes
1
Pipelines
4
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/qosmngr.c
+15
-5
15 additions, 5 deletions
src/qosmngr.c
with
15 additions
and
5 deletions
src/qosmngr.c
+
15
−
5
View file @
46032701
...
@@ -203,6 +203,7 @@ static int prepare_stats_blob(struct blob_buf *b, struct qos_stats *stats, void
...
@@ -203,6 +203,7 @@ static int prepare_stats_blob(struct blob_buf *b, struct qos_stats *stats, void
{
{
int
index
;
int
index
;
int
ret
=
0
;
int
ret
=
0
;
int
is_read_and_reset
;
// Initialize global q_stat global struct
// Initialize global q_stat global struct
if
(
init_flag
)
{
if
(
init_flag
)
{
...
@@ -214,7 +215,7 @@ static int prepare_stats_blob(struct blob_buf *b, struct qos_stats *stats, void
...
@@ -214,7 +215,7 @@ static int prepare_stats_blob(struct blob_buf *b, struct qos_stats *stats, void
init_flag
=
0
;
init_flag
=
0
;
}
}
ret
=
qos_get_stats
(
ifname
,
qid
,
stats
);
ret
=
qos_get_stats
(
ifname
,
qid
,
stats
,
&
is_read_and_reset
);
if
(
ret
!=
0
)
{
if
(
ret
!=
0
)
{
syslog
(
LOG_ERR
,
"blob_get_status: ret %d
\n
"
,
ret
);
syslog
(
LOG_ERR
,
"blob_get_status: ret %d
\n
"
,
ret
);
return
ret
;
return
ret
;
...
@@ -222,10 +223,19 @@ static int prepare_stats_blob(struct blob_buf *b, struct qos_stats *stats, void
...
@@ -222,10 +223,19 @@ static int prepare_stats_blob(struct blob_buf *b, struct qos_stats *stats, void
index
=
get_interface_index
(
ifname
);
index
=
get_interface_index
(
ifname
);
/*BCM968 CHIP, stats read from driver is accunulated stats, while in other its read and reset */
if
(
!
is_read_and_reset
)
{
q_stat
[
index
][
qid
].
tx_packets
=
stats
->
tx_packets
;
q_stat
[
index
][
qid
].
tx_bytes
=
stats
->
tx_bytes
;
q_stat
[
index
][
qid
].
tx_dropped_packets
=
stats
->
tx_dropped_packets
;
q_stat
[
index
][
qid
].
tx_dropped_bytes
=
stats
->
tx_dropped_bytes
;
}
else
{
q_stat
[
index
][
qid
].
tx_packets
+=
stats
->
tx_packets
;
q_stat
[
index
][
qid
].
tx_packets
+=
stats
->
tx_packets
;
q_stat
[
index
][
qid
].
tx_bytes
+=
stats
->
tx_bytes
;
q_stat
[
index
][
qid
].
tx_bytes
+=
stats
->
tx_bytes
;
q_stat
[
index
][
qid
].
tx_dropped_packets
+=
stats
->
tx_dropped_packets
;
q_stat
[
index
][
qid
].
tx_dropped_packets
+=
stats
->
tx_dropped_packets
;
q_stat
[
index
][
qid
].
tx_dropped_bytes
+=
stats
->
tx_dropped_bytes
;
q_stat
[
index
][
qid
].
tx_dropped_bytes
+=
stats
->
tx_dropped_bytes
;
}
dd
=
blobmsg_open_table
(
b
,
""
);
dd
=
blobmsg_open_table
(
b
,
""
);
...
...
...
...
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
sign in
to comment