X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=lib%2Fdpif.c;h=5402033d092aa42ec5d684d664955b9308e14bd0;hb=d76f09ea77e03ee5a3a7bb67bcab1ac4bb54172b;hp=30384196384444ac11ab6d853aec152bde248132;hpb=d2d8fbebb86eb682fc9507a884e80ff5e6086f03;p=sliver-openvswitch.git diff --git a/lib/dpif.c b/lib/dpif.c index 303841963..5402033d0 100644 --- a/lib/dpif.c +++ b/lib/dpif.c @@ -42,6 +42,18 @@ VLOG_DEFINE_THIS_MODULE(dpif); +COVERAGE_DEFINE(dpif_destroy); +COVERAGE_DEFINE(dpif_port_add); +COVERAGE_DEFINE(dpif_port_del); +COVERAGE_DEFINE(dpif_flow_flush); +COVERAGE_DEFINE(dpif_flow_get); +COVERAGE_DEFINE(dpif_flow_put); +COVERAGE_DEFINE(dpif_flow_del); +COVERAGE_DEFINE(dpif_flow_query_list); +COVERAGE_DEFINE(dpif_flow_query_list_n); +COVERAGE_DEFINE(dpif_execute); +COVERAGE_DEFINE(dpif_purge); + static const struct dpif_class *base_dpif_classes[] = { #ifdef HAVE_NETLINK &dpif_linux_class, @@ -258,8 +270,10 @@ do_open(const char *name, const char *type, bool create, struct dpif **dpifp) goto exit; } - error = registered_class->dpif_class->open(name, type, create, &dpif); + error = registered_class->dpif_class->open(registered_class->dpif_class, + name, create, &dpif); if (!error) { + assert(dpif->dpif_class == registered_class->dpif_class); registered_class->refcount++; } @@ -373,6 +387,7 @@ dpif_get_all_names(const struct dpif *dpif, struct svec *all_names) } } + /* Destroys the datapath that 'dpif' is connected to, first removing all of its * ports. After calling this function, it does not make sense to pass 'dpif' * to any functions other than dpif_name() or dpif_close(). */