Commit 8116b83f authored by Adam Wujek's avatar Adam Wujek 💬

[Feature: 1262] userspace/tools: support removing all static entries in rtu_stat

Change also wrsw_rtud.
Signed-off-by: Adam Wujek's avatarAdam Wujek <adam.wujek@cern.ch>
parent e17d1f55
......@@ -597,7 +597,7 @@ int rtu_fd_remove_entry(uint8_t *mac, uint32_t port_mask, int type)
return removed_entries;
}
void rtu_fd_clear_entries_for_port(int dest_port)
void rtu_fd_clear_entries_for_port(int dest_port, int type)
{
int i; // loop index
int j; // bucket loop index
......@@ -609,7 +609,7 @@ 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 == RTU_ENTRY_TYPE_DYNAMIC)) {
&& (ent->dynamic == type)) {
if (ent->port_mask_dst == (1 << dest_port)) {
/* entry is _only_ for this port */
hw_request(HW_REMOVE_REQ, ent->addr,
......
......@@ -57,7 +57,7 @@ int rtu_fd_create_entry(uint8_t mac[ETH_ALEN],
int rtu_fd_set_aging_time(unsigned long t) __attribute__ ((warn_unused_result));
void rtu_fd_set_hash_poly(uint16_t poly);
void rtu_fd_flush(void);
void rtu_fd_clear_entries_for_port(int dest_port);
void rtu_fd_clear_entries_for_port(int dest_port, int type);
int rtu_fd_remove_entry(uint8_t *mac, uint32_t port_mask, int type);
void rtu_fd_create_vlan_entry(int vid, uint32_t port_mask, uint8_t fid,
......
......@@ -167,7 +167,8 @@ static void rtu_update_ports_state(void)
hal_ports_local_copy[i].name);
rtu_fd_clear_entries_for_port(hal_ports_local_copy[i].
hw_index);
hw_index,
RTU_ENTRY_TYPE_DYNAMIC);
}
port_was_up[i] = link_up;
......
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