Commit d710ba3c authored by Adam Wujek's avatar Adam Wujek 💬

Merge branch 'adam-hw_addr'

Signed-off-by: Adam Wujek's avatarAdam Wujek <adam.wujek@cern.ch>
parents d729624f 98e7a982
......@@ -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;
......@@ -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,
......
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