Commit 98e7a982 authored by Adam Wujek's avatar Adam Wujek 💬

userspace/wrsw_rtud: move creating rule for udp to rtud

Move creating rule for PTP over UDP from rtud init script to wrsw_rtud.
Signed-off-by: Adam Wujek's avatarAdam Wujek <adam.wujek@cern.ch>
parent f2bdd037
......@@ -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
}
......
......@@ -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;
......@@ -119,12 +120,23 @@ static int rtu_create_static_entries()
port_was_up[i] = state_up(hal_ports_local_copy[i].state);
}
/* 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,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment