Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
White Rabbit Switch - Software
Manage
Activity
Members
Labels
Plan
Issues
92
Issue boards
Milestones
Wiki
Code
Merge requests
4
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Projects
White Rabbit Switch - Software
Commits
d710ba3c
Commit
d710ba3c
authored
9 years ago
by
Adam Wujek
Browse files
Options
Downloads
Plain Diff
Merge branch 'adam-hw_addr'
Signed-off-by:
Adam Wujek
<
adam.wujek@cern.ch
>
parents
d729624f
98e7a982
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
userspace/rootfs_override/etc/init.d/rtud.sh
+0
-2
0 additions, 2 deletions
userspace/rootfs_override/etc/init.d/rtud.sh
userspace/wrsw_rtud/rtud.c
+12
-14
12 additions, 14 deletions
userspace/wrsw_rtud/rtud.c
with
12 additions
and
16 deletions
userspace/rootfs_override/etc/init.d/rtud.sh
+
0
−
2
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
}
...
...
This diff is collapsed.
Click to expand it.
userspace/wrsw_rtud/rtud.c
+
12
−
14
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
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
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