X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=lib%2Fdpif.h;h=7a258c70b8c8e972ae89bffec8f7290657f78a95;hb=0141e875a14cc30fe9c207a83616861055531d4d;hp=7f1b6c942febc86a41d0e79f1cdd00326c6a4278;hpb=4e022ec09e14ac89add74c1b4b8e3ff3873edbf0;p=sliver-openvswitch.git diff --git a/lib/dpif.h b/lib/dpif.h index 7f1b6c942..7a258c70b 100644 --- a/lib/dpif.h +++ b/lib/dpif.h @@ -317,6 +317,24 @@ * location. * * - Adding and removing ports to achieve a new configuration. + * + * + * Thread-safety + * ============= + * + * Most of the dpif functions are fully thread-safe: they may be called from + * any number of threads on the same or different dpif objects. The exceptions + * are: + * + * - dpif_port_poll() and dpif_port_poll_wait() are conditionally + * thread-safe: they may be called from different threads only on + * different dpif objects. + * + * - Functions that operate on struct dpif_port_dump or struct + * dpif_flow_dump are conditionally thread-safe with respect to those + * objects. That is, one may dump ports or flows from any number of + * threads at once, but each thread must use its own struct dpif_port_dump + * or dpif_flow_dump. */ #ifndef DPIF_H #define DPIF_H 1 @@ -397,7 +415,7 @@ int dpif_port_query_by_name(const struct dpif *, const char *devname, struct dpif_port *); int dpif_port_get_name(struct dpif *, odp_port_t port_no, char *name, size_t name_size); -odp_port_t dpif_get_max_ports(const struct dpif *); +uint32_t dpif_get_max_ports(const struct dpif *); uint32_t dpif_port_get_pid(const struct dpif *, odp_port_t port_no); struct dpif_port_dump {