ovs-ofctl bundle <bridge> <bundle>
PicOS OVS supports bundles from version 2.3.
User can add a bundle with the format as follows:
ovs-ofctl bundle <bridge> "[open:bundle_id=<id>,]add:bundle_id=<id>,message=<message>[,add:bundle_id=<id>,message=<message>...][,close:bundle_id=<id>],commit:bundle_id=<id>"
Using bundles is to group related state changes on a switch so that all changes are applied together, or that none of them is applied. The second goal is to better synchronize changes across a set of OpenFlow switches. Bundles can be prepared and pre-validated on each switch and applied at the same time.
PicOS OVS supports applying 10 bundles maximum at the same time. And the maximum messages is 100 of each bundle.
Also supports port/flow/group/meter-mods at present.
Flow-mod
message=add-flow <match><,actions>
User can add a flow by bundle.
Example:
admin@PicOS-OVS$ovs-ofctl bundle br0 "open:bundle_id=1,add:bundle_id=1,message=add-flow in_port=1,dl_src=22:11:11:11:11:11,dl_dst=22:22:22:22:22:22,dl_type=0x0800,nw_src=1.1.1.1,nw_dst=2.2.2.2,nw_proto=6,tp_src=3000,tp_dst=4000,actions=output:2,add:bundle_id=1,message=add-flow priority=40000,in_port=2,actions=mod_dl_src=00:00:00:11:11:11,output:3,close:bundle_id=1,commit:bundle_id=1"
messag=mod-flows <match><,actions>
Modify flows by bundle.
message=del-flows <match>
Delete flows by bundle.
Example:
Delete the flows that match the field.
admin@PicOS-OVS$ovs-ofctl bundle br0 "open:bundle_id=1,add:bundle_id=1,message=del-flows in_port=1,commit:bundle_id=1"
Delete all flows in br0.
admin@PicOS-OVS$ovs-ofctl bundle br0 "open:bundle_id=1,add:bundle_id=1,message=del-flows,commit:bundle_id=1"
Group-mod
message=add-group group_id=<id>,type=<type>,bucket=<actions>[,bucket=<actions>]
Add groups by bundle.
Example:
admin@PicOS-OVS$ovs-ofctl bundle br0 "open:bundle_id=1,add:bundle_id=1,message=add-group group_id=1,type=all,bucket=output:2,bucket=output:3,add:bundle_id=1,message=add-group group_id=2,type=indirect,bucket=output:1,commit:bundle_id=1"
message=mod-group group_id=<id>,type=<type>,bucket=<actions>[,bucket=<actions>]
Modify a group by bundle.
message=del-groups group_id=<id>
Delete groups by bundle.
Example:
admin@PicOS-OVS$ovs-ofctl bundle br0 "open:bundle_id=1,add:bundle_id=1,message=del-groups ,commit:bundle_id=1"
Meter-mod
message=add-meter meter=<id> kbps[,burst,stats],band=type=<type>,rate=<rate>[,burst_size=<size>,prec_level=<level>]
Add meter by bundle.
message=mod-meter meter=<id> kbps[,burst,stats],band=type=<type>,rate=<rate>[,burst_size=<size>,prec_level=<level>]
Modify meter by bundle.
message=del-meter meter=<id>
Delete meter that meter=<id>.
Port-mod
message=mod-port <port> <down/up/no-receive/receive/no-forward/forward/no-packet-in/packet-in>
Modify port state, the configure must be one of 'down/up/no-receive/receive/no-forward/forward/no-packet-in/packet-in'.
Example:
admin@PicOS-OVS$ovs-ofctl bundle br0 'open:bundle_id=1,add:bundle_id=1,message=mod-port te-1/1/1 no-packet-in,commit:bundle_id=1'
Multiple bundles
User can apply multiple bundles at the same time. Each bundle has its own open/add/close/commit/discard.
Example:
root@PicOS-OVS$ovs-ofctl bundle br-iris "open:bundle_id=1,open:bundle_id=2,add:bundle_id=1,message=add-flow dl_src=00:00:00:11:11:11,actions=output:3,add:bundle_id=2,message=add-flow dl_src=00:00:00:11:11:22,actions=output:4,close:bundle_id=1,close:bundle_id=2,commit:bundle_id=1,commit:bundle_id=2"
Copyright © 2024 Pica8 Inc. All Rights Reserved.