X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=lib%2Fdpif.h;h=7f1b6c942febc86a41d0e79f1cdd00326c6a4278;hb=f80022d9df98d29ee41176a4bc6cb91025da84b8;hp=c5e3fc810bd11e77178b2ad9f6ac748e677fcd99;hpb=305b76debf72120672a8ba81d3356b6dccb1da9a;p=sliver-openvswitch.git diff --git a/lib/dpif.h b/lib/dpif.h index c5e3fc810..7f1b6c942 100644 --- a/lib/dpif.h +++ b/lib/dpif.h @@ -377,8 +377,8 @@ int dpif_get_dp_stats(const struct dpif *, struct dpif_dp_stats *); const char *dpif_port_open_type(const char *datapath_type, const char *port_type); -int dpif_port_add(struct dpif *, struct netdev *, uint32_t *port_nop); -int dpif_port_del(struct dpif *, uint32_t port_no); +int dpif_port_add(struct dpif *, struct netdev *, odp_port_t *port_nop); +int dpif_port_del(struct dpif *, odp_port_t port_no); /* A port within a datapath. * @@ -386,19 +386,19 @@ int dpif_port_del(struct dpif *, uint32_t port_no); struct dpif_port { char *name; /* Network device name, e.g. "eth0". */ char *type; /* Network device type, e.g. "system". */ - uint32_t port_no; /* Port number within datapath. */ + odp_port_t port_no; /* Port number within datapath. */ }; void dpif_port_clone(struct dpif_port *, const struct dpif_port *); void dpif_port_destroy(struct dpif_port *); bool dpif_port_exists(const struct dpif *dpif, const char *devname); -int dpif_port_query_by_number(const struct dpif *, uint32_t port_no, +int dpif_port_query_by_number(const struct dpif *, odp_port_t port_no, struct dpif_port *); int dpif_port_query_by_name(const struct dpif *, const char *devname, struct dpif_port *); -int dpif_port_get_name(struct dpif *, uint32_t port_no, +int dpif_port_get_name(struct dpif *, odp_port_t port_no, char *name, size_t name_size); -int dpif_get_max_ports(const struct dpif *); -uint32_t dpif_port_get_pid(const struct dpif *, uint32_t port_no); +odp_port_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 { const struct dpif *dpif; @@ -447,6 +447,7 @@ enum dpif_flow_put_flags { int dpif_flow_flush(struct dpif *); int dpif_flow_put(struct dpif *, enum dpif_flow_put_flags, const struct nlattr *key, size_t key_len, + const struct nlattr *mask, size_t mask_len, const struct nlattr *actions, size_t actions_len, struct dpif_flow_stats *); int dpif_flow_del(struct dpif *, @@ -464,6 +465,7 @@ struct dpif_flow_dump { void dpif_flow_dump_start(struct dpif_flow_dump *, const struct dpif *); bool dpif_flow_dump_next(struct dpif_flow_dump *, const struct nlattr **key, size_t *key_len, + const struct nlattr **mask, size_t *mask_len, const struct nlattr **actions, size_t *actions_len, const struct dpif_flow_stats **); int dpif_flow_dump_done(struct dpif_flow_dump *); @@ -492,6 +494,8 @@ struct dpif_flow_put { enum dpif_flow_put_flags flags; /* DPIF_FP_*. */ const struct nlattr *key; /* Flow to put. */ size_t key_len; /* Length of 'key' in bytes. */ + const struct nlattr *mask; /* Mask to put. */ + size_t mask_len; /* Length of 'mask' in bytes. */ const struct nlattr *actions; /* Actions to perform on flow. */ size_t actions_len; /* Length of 'actions' in bytes. */ @@ -540,10 +544,10 @@ const char *dpif_upcall_type_to_string(enum dpif_upcall_type); /* A packet passed up from the datapath to userspace. * - * If 'key' or 'actions' is nonnull, then it points into data owned by - * 'packet', so their memory cannot be freed separately. (This is hardly a - * great way to do things but it works out OK for the dpif providers and - * clients that exist so far.) + * If 'key', 'actions', or 'userdata' is nonnull, then it points into data + * owned by 'packet', so their memory cannot be freed separately. (This is + * hardly a great way to do things but it works out OK for the dpif providers + * and clients that exist so far.) */ struct dpif_upcall { /* All types. */ @@ -553,7 +557,7 @@ struct dpif_upcall { size_t key_len; /* Length of 'key' in bytes. */ /* DPIF_UC_ACTION only. */ - uint64_t userdata; /* Argument to OVS_ACTION_ATTR_USERSPACE. */ + struct nlattr *userdata; /* Argument to OVS_ACTION_ATTR_USERSPACE. */ }; int dpif_recv_set(struct dpif *, bool enable);