Hi. I'm currently adding support for packet-out messages in bundles. I started to look at *handle_packet_out*, *handle_bundle_add *and *do_bundle_commit *functions to understand how things work. Here is what I did in each function:
*handle_bundle_add:* added if case for OFPTYPE_PACKET_OUT which does all the validations performed in handle_packet_out as well as saving the packet_out info in the bundle_entry. For this I added a new ofproto_packet_out struct to the union in ofp_bundle_entry. This new struct (created in the same way as ofproto_flow_mod and ofproto_port_mod) contains an ofputil_packet_out, a dp_packet *payload and a flow. If I understand correctly, this three structs are needed later to send the packet_out in the commit phase. *do_bundle_commit: *added if case for OFPTYPE_PACKET_OUT in phase 3 (finish) which calls the ofproto->ofproto_class->packet_out function using the data saved in the bundle entry and then deletes de payload (as done in handle_packet_out). In phase 1 (begin) I only added prev_is_port_mod = false; to the packet-out "if case" because all the validations were done before. Is there a way to verify if the packet can be sent without actually sending it? If not, the ofproto->ofproto_class->packet_out can still return errors, but this will be in the finish phase, which cannot be rolled back. I think that in this case the bundle should still be committed (because it does not affect other modifications like flow-mods and port-mods) and errors can be returned to the controller. Would this be a good option? I would also like to know if I'm going in the right direction or if I did something wrong. Thanks in advance. _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev