Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
W
White Rabbit Switch - Software
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
86
Issues
86
List
Board
Labels
Milestones
Merge Requests
4
Merge Requests
4
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
White Rabbit Switch - Software
Commits
d710ba3c
Commit
d710ba3c
authored
Jul 09, 2015
by
Adam Wujek
💬
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'adam-hw_addr'
Signed-off-by:
Adam Wujek
<
adam.wujek@cern.ch
>
parents
d729624f
98e7a982
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
16 deletions
+12
-16
rtud.sh
userspace/rootfs_override/etc/init.d/rtud.sh
+0
-2
rtud.c
userspace/wrsw_rtud/rtud.c
+12
-14
No files found.
userspace/rootfs_override/etc/init.d/rtud.sh
View file @
d710ba3c
...
...
@@ -32,8 +32,6 @@ start() {
echo
"Failed (already running?)"
else
eval
/wr/bin/wrsw_rtud
$LOGPIPE
\&
# ensure we receive UDP PTP frames, since ppsi supports UDP too.
/wr/bin/rtu_stat add 01:00:5e:00:01:81 18 0 &
echo
"OK"
fi
}
...
...
userspace/wrsw_rtud/rtud.c
View file @
d710ba3c
...
...
@@ -93,6 +93,7 @@ static int rtu_create_static_entries()
uint8_t
bcast_mac
[]
=
{
0xff
,
0xff
,
0xff
,
0xff
,
0xff
,
0xff
};
uint8_t
slow_proto_mac
[]
=
{
0x01
,
0x80
,
0xc2
,
0x00
,
0x00
,
0x01
};
uint8_t
ptp_mcast_mac
[]
=
{
0x01
,
0x1b
,
0x19
,
0x00
,
0x00
,
0x00
};
uint8_t
udp_ptp_mac
[]
=
{
0x01
,
0x00
,
0x5e
,
0x00
,
0x01
,
0x81
};
int
i
,
err
;
uint32_t
enabled_port_mask
=
0
;
...
...
@@ -117,28 +118,25 @@ static int rtu_create_static_entries()
enabled_port_mask
|=
(
1
<<
hal_ports_local_copy
[
i
].
hw_index
);
port_was_up
[
i
]
=
state_up
(
hal_ports_local_copy
[
i
].
state
);
pr_info
(
"adding static route for port %s index %d [mac %s]
\n
"
,
hal_ports_local_copy
[
i
].
name
,
hal_ports_local_copy
[
i
].
hw_index
,
mac_to_string
(
hal_ports_local_copy
[
i
].
hw_addr
)
);
err
=
rtu_fd_create_entry
(
hal_ports_local_copy
[
i
].
hw_addr
,
0
,
(
1
<<
hal_nports_local
),
STATIC
,
OVERRIDE_EXISTING
);
if
(
err
)
return
err
;
}
/* PTP over UDP */
pr_info
(
"adding entry for PTP over UDP
\n
"
);
err
=
rtu_fd_create_entry
(
udp_ptp_mac
,
0
,
(
1
<<
hal_nports_local
),
STATIC
,
OVERRIDE_EXISTING
);
if
(
err
)
return
err
;
// Broadcast MAC
pr_info
(
"adding static route for broadcast MAC...
\n
"
);
err
=
rtu_fd_create_entry
(
bcast_mac
,
0
,
enabled_port_mask
|
(
1
<<
hal_nports_local
),
STATIC
,
OVERRIDE_EXISTING
);
if
(
err
)
return
err
;
err
=
rtu_fd_create_entry
(
ptp_mcast_mac
,
0
,
(
1
<<
hal_nports_local
),
STATIC
,
...
...
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