Commit 320cbf8e authored by Adam Wujek's avatar Adam Wujek 💬

userspace/wrsw_rtud: fix condition of printing cleaning multicast entries

Fix condition of printing "cleaning multicast entries not supported yet..."
Since the search was done over all entries, it doesn't mean entry is multicast
if port_mask_dst doesn't equal (1 << dest_port)
Signed-off-by: Adam Wujek's avatarAdam Wujek <adam.wujek@cern.ch>
parent 4151c36c
......@@ -563,13 +563,18 @@ void rtu_fd_clear_entries_for_port(int dest_port)
for (j = RTU_BUCKETS; j-- > 0;) {
ent = &rtu_htab[i][j];
if (ent->valid && ent->dynamic) {
if (ent->port_mask_dst == (1 << dest_port))
if (ent->port_mask_dst == (1 << dest_port)) {
/* entry is _only_ for this port */
hw_request(HW_REMOVE_REQ, ent->addr,
ent);
else {
pr_error(
"cleaning multicast entries not supported yet...\n");
}
else if (ent->port_mask_dst & (1 << dest_port)) {
/* entry is for at least two ports
* including current */
pr_error("cleaning multicast entries "
"not supported yet... "
"mask=0x%x port=%d\n",
ent->port_mask_dst, dest_port);
}
}
}
......
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