- * 4.5. The client calls "rule_delete". Immediately or eventually, the
- * implementation calls ofoperation_complete() to indicate that the
- * deletion completed. Deletion is not allowed to fail, so it must
- * be successful.
- *
- *
- * Asynchronous Operation Support
- * ==============================
- *
- * The "insert" and "delete" life-cycle operations on rules can operate
- * asynchronously, meaning that ->rule_insert() and ->rule_delete() only
- * need to initiate their respective operations and do not need to wait for
- * them to complete before they return. ->rule_modify_actions() also
- * operates asynchronously.
- *
- * An ofproto implementation reports the success or failure of an
- * asynchronous operation on a rule using the rule's 'pending' member,
- * which points to a opaque "struct ofoperation" that represents the
- * ongoing operation. When the operation completes, the ofproto
- * implementation calls ofoperation_complete(), passing the ofoperation and
- * an error indication.
- *
- * Only the following contexts may call ofoperation_complete():
- *
- * - The function called to initiate the operation, e.g. ->rule_insert()
- * or ->rule_delete(). This is the best choice if the operation
- * completes quickly.
- *
- * - The implementation's ->run() function.
- *
- * - The implementation's ->destruct() function.
- *
- * The ofproto base code updates the flow table optimistically, assuming
- * that the operation will probably succeed:
- *
- * - ofproto adds the rule in the flow table before calling
- * ->rule_insert().
- *
- * - ofproto updates the rule's actions and other properties before
- * calling ->rule_modify_actions().
- *
- * - ofproto removes the rule before calling ->rule_delete().
- *
- * With one exception, when an asynchronous operation completes with an
- * error, ofoperation_complete() backs out the already applied changes:
- *
- * - If adding a rule in the flow table fails, ofproto removes the new
- * rule.
- *
- * - If modifying a rule fails, ofproto restores the original actions
- * (and other properties).
- *
- * - Removing a rule is not allowed to fail. It must always succeed.
- *
- * The ofproto base code serializes operations: if any operation is in
- * progress on a given rule, ofproto postpones initiating any new operation
- * on that rule until the pending operation completes. Therefore, every
- * operation must eventually complete through a call to
- * ofoperation_complete() to avoid delaying new operations indefinitely
- * (including any OpenFlow request that affects the rule in question, even
- * just to query its statistics).