Commit 343a89b7 authored by Adam Wujek's avatar Adam Wujek 💬

userspace/wrsw_rtud: rename network interfaces from wrX to wriX+1

Signed-off-by: Adam Wujek's avatarAdam Wujek <adam.wujek@cern.ch>
parent a002b0fc
......@@ -572,8 +572,9 @@ void rtu_fd_clear_entries_for_port(int dest_port)
* including current */
pr_error("cleaning multicast entries "
"not supported yet... "
"mask=0x%x port=%d\n",
ent->port_mask_dst, dest_port);
"mask=0x%x port=%d (wri%d)\n",
ent->port_mask_dst,
dest_port + 1, dest_port + 1);
}
}
}
......
......@@ -155,7 +155,7 @@ static void rtu_update_ports_state(void)
int link_up;
/* update hal_ports_local_copy */
read_ports();
for (i = 0; i <= MAX_PORT; i++) {
for (i = 0; (i <= MAX_PORT) && (i < hal_nports_local); i++) {
if (!hal_ports_local_copy[i].in_use)
continue;
......@@ -222,8 +222,8 @@ static int rtu_daemon_learning_process(void)
err = rtu_read_learning_queue(&req);
if (!err) {
pr_debug(
"ureq: port %d src %s VID %d priority %d\n",
req.port_id,
"ureq: port %d (wri%d) src %s VID %d priority %d\n",
req.port_id + 1, req.port_id + 1,
mac_to_string(req.src),
req.has_vid ? req.vid : 0,
req.has_prio ? req.prio : 0);
......@@ -233,7 +233,7 @@ static int rtu_daemon_learning_process(void)
if (p->in_use && p->hw_index == req.port_id
&& !state_up(p->state)) {
port_down = 1;
pr_debug("port down %d\n", i);
pr_debug("port down %s\n", p->name);
break;
}
}
......
......@@ -53,7 +53,8 @@ int rtudexp_clear_entries(const struct minipc_pd *pd,
int iface_num = (int)args[0];
int *p_ret = (int *)ret; //force pointed to int type
pr_debug("Removing dynamic entries on interface %d\n", iface_num);
pr_debug("Removing dynamic entries on interface %d (wri%d)\n",
iface_num + 1, iface_num + 1);
rtu_fd_clear_entries_for_port(iface_num);
*p_ret = 0;
......@@ -80,8 +81,9 @@ int rtudexp_add_entry(const struct minipc_pd *pd, uint32_t * args, void *ret)
"%s is an invalid MAC format (XX:XX:XX:XX:XX:XX)\n",
strEHA);
pr_info("Create entry for (MAC=%s) port %x, mode:%s\n",
mac_to_string(mac_tmp), 1 << port, (mode) ? "DYNAMIC" : "STATIC");
pr_info("Create entry for (MAC=%s) port %x (wri%d), mode:%s\n",
mac_to_string(mac_tmp), 1 << port, port + 1,
(mode) ? "DYNAMIC" : "STATIC");
*p_ret =
rtu_fd_create_entry(mac_tmp, 0, 1 << port, mode, OVERRIDE_EXISTING);
return *p_ret;
......
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