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