X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=ofproto%2Fofproto-provider.h;h=15dc34721810f3a5e75c51a6f583a7670e79b231;hb=1e95906159ad032be97a2122e9816b85bdc4ab32;hp=afd17a6019fa1e1e9733f0066fd5f9f3143ede15;hpb=f25d0cf3c366d92042269a4f787f19c741c2530c;p=openvswitch diff --git a/ofproto/ofproto-provider.h b/ofproto/ofproto-provider.h index afd17a60..15dc3472 100644 --- a/ofproto/ofproto-provider.h +++ b/ofproto/ofproto-provider.h @@ -187,6 +187,11 @@ struct rule { struct ofpact *ofpacts; /* Sequence of "struct ofpacts". */ unsigned int ofpacts_len; /* Size of 'ofpacts', in bytes. */ + + /* Flow monitors. */ + enum nx_flow_monitor_flags monitor_flags; + uint64_t add_seqno; /* Sequence number when added. */ + uint64_t modify_seqno; /* Sequence number when changed. */ }; static inline struct rule * @@ -199,9 +204,15 @@ void ofproto_rule_update_used(struct rule *, long long int used); void ofproto_rule_expire(struct rule *, uint8_t reason); void ofproto_rule_destroy(struct rule *); +bool ofproto_rule_has_out_port(const struct rule *, uint16_t out_port); + void ofoperation_complete(struct ofoperation *, enum ofperr); struct rule *ofoperation_get_victim(struct ofoperation *); +bool ofoperation_has_out_port(const struct ofoperation *, uint16_t out_port); + +bool ofproto_rule_is_hidden(const struct rule *); + /* ofproto class structure, to be defined by each ofproto implementation. * * @@ -388,6 +399,9 @@ struct ofproto_class { * - Call ofproto_rule_expire() for each OpenFlow flow that has reached * its hard_timeout or idle_timeout, to expire the flow. * + * (But rules that are part of a pending operation, e.g. rules for + * which ->pending is true, may not expire.) + * * Returns 0 if successful, otherwise a positive errno value. */ int (*run)(struct ofproto *ofproto); @@ -467,10 +481,10 @@ struct ofproto_class { * - 'matched_count' to the number of packets looked up in this flow * table so far that matched one of the flow entries. * - * Keep in mind that all of the members of struct ofp_table_stats are in + * Keep in mind that all of the members of struct ofp10_table_stats are in * network byte order. */ - void (*get_tables)(struct ofproto *ofproto, struct ofp_table_stats *ots); + void (*get_tables)(struct ofproto *ofproto, struct ofp10_table_stats *ots); /* ## ---------------- ## */ /* ## ofport Functions ## */ @@ -1001,6 +1015,15 @@ struct ofproto_class { * not support CFM. */ int (*get_cfm_fault)(const struct ofport *ofport); + /* Check the operational status reported by the remote CFM endpoint of + * 'ofp_port' Returns 1 if operationally up, 0 if operationally down, and + * -1 if CFM is not enabled on 'ofp_port' or does not support operational + * status. + * + * This function may be a null pointer if the ofproto implementation does + * not support CFM. */ + int (*get_cfm_opup)(const struct ofport *ofport); + /* Gets the MPIDs of the remote maintenance points broadcasting to * 'ofport'. Populates 'rmps' with a provider owned array of MPIDs, and * 'n_rmps' with the number of MPIDs in 'rmps'. Returns a number less than