Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
S
Software for White Rabbit PTP Core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
32
Issues
32
List
Board
Labels
Milestones
Merge Requests
7
Merge Requests
7
CI / CD
CI / CD
Pipelines
Schedules
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
Software for White Rabbit PTP Core
Commits
8f70a46c
Commit
8f70a46c
authored
May 03, 2023
by
Tristan Gingold
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lib/latency.c: fix build
parent
9ef7cf9f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
9 deletions
+6
-9
latency.c
lib/latency.c
+6
-9
No files found.
lib/latency.c
View file @
8f70a46c
...
...
@@ -29,11 +29,8 @@ static unsigned long prios[] = {7, 6, 0}; /* the prio for the 3 frames */
static
int
ltest_fake_delay_ns
;
/* latency probe: we need to enqueue 3 short frames: 64*3+overhead = 256 */
static
uint8_t
__latency_queue
[
256
];
static
struct
wrpc_socket
*
latency_socket
,
__static_latency_socket
=
{
.
queue
.
buff
=
__latency_queue
,
.
queue
.
size
=
sizeof
(
__latency_queue
),
};
static
DECLARE_WRPC_SOCKET
(
latency_socket
,
256
);
static
struct
wrpc_socket
*
latency_socket
;
static
struct
wr_sockaddr
latency_addr
=
{
.
mac
=
{
0xff
,
0xff
,
0xff
,
0xff
,
0xff
,
0xff
},
/* for sending */
...
...
@@ -43,9 +40,9 @@ static struct wr_sockaddr latency_addr = {
void
latency_init
(
void
)
{
latency_addr
.
ethertype
=
htons
(
CONFIG_LATENCY_ETHTYPE
);
latency_socket
=
ptpd_netif_create_socket
(
&
__static_latency_socket
,
&
latency_addr
,
PTPD_SOCK_RAW_ETHERNET
,
0
);
latency_socket
=
ptpd_netif_create_socket
(
GET_WRPC_SOCKET
(
latency_socket
),
LEN_WRPC_SOCKET
(
latency_socket
)
,
&
latency_addr
,
PTPD_SOCK_RAW_ETHERNET
,
0
);
}
static
struct
latency_frame
{
...
...
@@ -89,7 +86,7 @@ static void latency_report(struct wr_timestamp *lat)
int
i
;
if
(
!
nextj
)
{
const
unsigned
char
*
mac
[
6
]
=
wrc_endpoint_dev
.
mac_addr
;
uint8_t
*
mac
=
wrc_endpoint_dev
.
mac_addr
;
/* first time; pick a time in the future */
nextj
=
jiffies
+
TICS_PER_SECOND
*
(
10
+
(
mac
[
5
]
%
60
));
...
...
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