Feature/bundle support (#15)
* openflow: Add bundle support * openflow: Add bundle message generator and parser * openflow: Add bundle API
This commit is contained in:
parent
db68e81954
commit
ec1cdb6eff
9 changed files with 388 additions and 11 deletions
|
|
@ -63,14 +63,18 @@ defmodule LearningSwitch.Ofctl do
|
|||
end
|
||||
|
||||
defp init_flow_tables(datapath_id) do
|
||||
:ok = onf_bundle_open(datapath_id, bundle_id: 1, flags: [:atomic, :ordered])
|
||||
|
||||
for flow_options <- [
|
||||
add_default_broadcast_flow_entry(),
|
||||
add_default_flooding_flow_entry(),
|
||||
add_multicast_mac_drop_flow_entry(),
|
||||
add_ipv6_multicast_mac_drop_flow_entry(),
|
||||
add_default_forwarding_flow_entry()] do
|
||||
send_flow_mod_add(datapath_id, flow_options)
|
||||
send_flow_mod_add(datapath_id, Keyword.merge(flow_options, [bundle_id: 1, bundle_flags: [:atomic, :ordered]]))
|
||||
end
|
||||
|
||||
:ok = onf_bundle_commit(datapath_id, bundle_id: 1, flags: [:atomic, :ordered])
|
||||
end
|
||||
|
||||
defp add_forwarding_flow_and_packet_out(packet_in, state) do
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue