Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ycai
simbricks
Commits
55028a24
Commit
55028a24
authored
Jun 18, 2022
by
Antoine Kaufmann
Browse files
lib/nicif: SimbricksNicIfNextTimestamp should also consider next sync due
parent
48dc6a89
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
lib/simbricks/nicif/nicif.h
lib/simbricks/nicif/nicif.h
+7
-2
No files found.
lib/simbricks/nicif/nicif.h
View file @
55028a24
...
...
@@ -55,8 +55,13 @@ static inline int SimbricksNicIfSync(struct SimbricksNicIf *nicif,
static
inline
uint64_t
SimbricksNicIfNextTimestamp
(
struct
SimbricksNicIf
*
nicif
)
{
uint64_t
net
=
SimbricksNetIfInTimestamp
(
&
nicif
->
net
);
uint64_t
pcie
=
SimbricksPcieIfH2DInTimestamp
(
&
nicif
->
pcie
);
uint64_t
net_in
=
SimbricksNetIfInTimestamp
(
&
nicif
->
net
);
uint64_t
net_out
=
SimbricksNetIfOutNextSync
(
&
nicif
->
net
);
uint64_t
net
=
(
net_in
<=
net_out
?
net_in
:
net_out
);
uint64_t
pcie_in
=
SimbricksPcieIfH2DInTimestamp
(
&
nicif
->
pcie
);
uint64_t
pcie_out
=
SimbricksPcieIfD2HOutNextSync
(
&
nicif
->
pcie
);
uint64_t
pcie
=
(
pcie_in
<=
pcie_out
?
pcie_in
:
pcie_out
);
return
(
net
<
pcie
?
net
:
pcie
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment