X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=ofproto%2Fofproto-provider.h;h=4736b440f536871c8a7bfe96433777eb38619beb;hb=11a574a737fa506c8e66c7bd42fa3186e70c286f;hp=6286d8197c72f9e03bd73a1631ff129e2ad0339d;hpb=e8f2a2a2fa62fcab47f7f9691e2fd64690d9e950;p=openvswitch diff --git a/ofproto/ofproto-provider.h b/ofproto/ofproto-provider.h index 6286d819..4736b440 100644 --- a/ofproto/ofproto-provider.h +++ b/ofproto/ofproto-provider.h @@ -359,6 +359,37 @@ struct ofproto_class { */ int (*del)(const char *type, const char *name); +/* ## ------------------------ ## */ +/* ## Top-Level type Functions ## */ +/* ## ------------------------ ## */ + + /* Performs any periodic activity required on ofprotos of type + * 'type'. + * + * An ofproto provider may implement it or not, depending on whether + * it needs type-level maintenance. + * + * Returns 0 if successful, otherwise a positive errno value. */ + int (*type_run)(const char *type); + + /* Performs periodic activity required on ofprotos of type 'type' + * that needs to be done with the least possible latency. + * + * This is run multiple times per main loop. An ofproto provider may + * implement it or not, according to whether it provides a performance + * boost for that ofproto implementation. + * + * Returns 0 if successful, otherwise a positive errno value. */ + int (*type_run_fast)(const char *type); + + /* Causes the poll loop to wake up when a type 'type''s 'run' + * function needs to be called, e.g. by calling the timer or fd + * waiting functions in poll-loop.h. + * + * An ofproto provider may implement it or not, depending on whether + * it needs type-level maintenance. */ + void (*type_wait)(const char *type); + /* ## --------------------------- ## */ /* ## Top-Level ofproto Functions ## */ /* ## --------------------------- ## */