Skip to content

Commit

Permalink
Fix missing removal after moving isolate
Browse files Browse the repository at this point in the history
  • Loading branch information
tbarbette committed Dec 7, 2020
1 parent 84efd4b commit b9f3521
Showing 1 changed file with 1 addition and 14 deletions.
15 changes: 1 addition & 14 deletions elements/userlevel/fromdpdkdevice.cc
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,7 @@ enum {
h_mtu,
h_device, h_isolate,
#if HAVE_FLOW_API
h_rule_add, h_rules_del, h_rules_isolate, h_rules_flush,
h_rule_add, h_rules_del, h_rules_flush,
h_rules_list, h_rules_list_with_hits, h_rules_ids_global, h_rules_ids_internal,
h_rules_count, h_rules_count_with_hits, h_rule_packet_hits, h_rule_byte_count,
h_rules_aggr_stats
Expand Down Expand Up @@ -603,10 +603,6 @@ String FromDPDKDevice::statistics_handler(Element *e, void *thunk)
portid_t port_id = fd->get_device()->get_port_id();
return String(FlowRuleManager::get_flow_rule_mgr(port_id)->flow_rules_with_hits_count());
}
case h_rules_isolate: {
portid_t port_id = fd->get_device()->get_port_id();
return String(FlowRuleManager::isolated(port_id) ? "1" : "0");
}
#endif
case h_nombufs:
return String(stats.rx_nombuf);
Expand Down Expand Up @@ -758,14 +754,6 @@ int FromDPDKDevice::flow_handler(
// Batch deletion
return flow_rule_mgr->flow_rules_delete((uint32_t *) rule_ids, rules_nb);
}
case h_rules_isolate: {
if (input.empty()) {
return errh->error("DPDK Flow Rule Manager (port %u): Specify isolation mode (true/1 -> isolation, otherwise no isolation)", port_id);
}
bool status = (input.lower() == "true") || (input.lower() == "1") ? true : false;
FlowRuleManager::set_isolation_mode(port_id, status);
return 0;
}
case h_rules_flush: {
return flow_rule_mgr->flow_rules_flush();
}
Expand Down Expand Up @@ -946,7 +934,6 @@ void FromDPDKDevice::add_handlers()
add_read_handler (FlowRuleManager::FLOW_RULE_LIST_WITH_HITS, statistics_handler, h_rules_list_with_hits);
add_read_handler (FlowRuleManager::FLOW_RULE_COUNT, statistics_handler, h_rules_count);
add_read_handler (FlowRuleManager::FLOW_RULE_COUNT_WITH_HITS, statistics_handler, h_rules_count_with_hits);
add_read_handler (FlowRuleManager::FLOW_RULE_ISOLATE, statistics_handler, h_rules_isolate);
#endif

add_read_handler("mtu",read_handler, h_mtu);
Expand Down

0 comments on commit b9f3521

Please sign in to comment.