X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=lib%2Fdpif-provider.h;h=8cdedcd11bfababfbdd09a08507b7b7b686b3db9;hb=5fa270099ab418ed0063144777ec76716dd3a207;hp=1975cc5c1996765c3506dfced9b6762f898bdf28;hpb=a8d9304d121f56af0e6f02677342933579be3277;p=openvswitch diff --git a/lib/dpif-provider.h b/lib/dpif-provider.h index 1975cc5c..8cdedcd1 100644 --- a/lib/dpif-provider.h +++ b/lib/dpif-provider.h @@ -142,6 +142,18 @@ struct dpif_class { * actions. */ int (*get_max_ports)(const struct dpif *dpif); + /* Returns the Netlink PID value to supply in OVS_ACTION_ATTR_USERSPACE + * actions as the OVS_USERSPACE_ATTR_PID attribute's value, for use in + * flows whose packets arrived on port 'port_no'. + * + * The return value only needs to be meaningful when DPIF_UC_ACTION has + * been enabled in the 'dpif''s listen mask, and it is allowed to change + * when DPIF_UC_ACTION is disabled and then re-enabled. + * + * A dpif provider that doesn't have meaningful Netlink PIDs can use NULL + * for this function. This is equivalent to always returning 0. */ + uint32_t (*port_get_pid)(const struct dpif *dpif, uint16_t port_no); + /* Attempts to begin dumping the ports in a dpif. On success, returns 0 * and initializes '*statep' with any data needed for iteration. On * failure, returns a positive errno value. */ @@ -300,7 +312,11 @@ struct dpif_class { /* Sets 'dpif''s "listen mask" to 'listen_mask'. A 1-bit of value 2**X set * in '*listen_mask' requests that 'dpif' will receive messages of the type * (from "enum dpif_upcall_type") with value X when its 'recv' function is - * called. */ + * called. + * + * Turning DPIF_UC_ACTION off and then back on is allowed to change Netlink + * PID assignments (see ->port_get_pid()). The client is responsible for + * updating flows as necessary if it does this. */ int (*recv_set_mask)(struct dpif *dpif, int listen_mask); /* Translates OpenFlow queue ID 'queue_id' (in host byte order) into a