X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=lib%2Fodp-util.h;h=0b34383ce11a53d39051795c6b48acf57acdc2e4;hb=29089a540cfa30a834e3ee19a8b4c52ff2e331b2;hp=ad0fb30ef7b76a013aa77469d85d13dfe18c192e;hpb=85c9de194b9f432f7b8a66bda980cbab52a55b72;p=sliver-openvswitch.git diff --git a/lib/odp-util.h b/lib/odp-util.h index ad0fb30ef..0b34383ce 100644 --- a/lib/odp-util.h +++ b/lib/odp-util.h @@ -127,8 +127,10 @@ void commit_odp_actions(const struct flow *, struct flow *base, enum user_action_cookie_type { USER_ACTION_COOKIE_UNSPEC, - USER_ACTION_COOKIE_SFLOW, /* Packet for sFlow sampling. */ - USER_ACTION_COOKIE_SLOW_PATH /* Userspace must process this flow. */ + USER_ACTION_COOKIE_SFLOW, /* Packet for per-bridge sFlow sampling. */ + USER_ACTION_COOKIE_SLOW_PATH, /* Userspace must process this flow. */ + USER_ACTION_COOKIE_FLOW_SAMPLE, /* Packet for per-flow sampling. */ + USER_ACTION_COOKIE_IPFIX, /* Packet for per-bridge IPFIX sampling. */ }; /* user_action_cookie is passed as argument to OVS_ACTION_ATTR_USERSPACE. @@ -147,8 +149,20 @@ union user_action_cookie { uint16_t unused; uint32_t reason; /* enum slow_path_reason. */ } slow_path; + + struct { + uint16_t type; /* USER_ACTION_COOKIE_FLOW_SAMPLE. */ + uint16_t probability; /* Sampling probability. */ + uint32_t collector_set_id; /* ID of IPFIX collector set. */ + uint32_t obs_domain_id; /* Observation Domain ID. */ + uint32_t obs_point_id; /* Observation Point ID. */ + } flow_sample; + + struct { + uint16_t type; /* USER_ACTION_COOKIE_IPFIX. */ + } ipfix; }; -BUILD_ASSERT_DECL(sizeof(union user_action_cookie) == 8); +BUILD_ASSERT_DECL(sizeof(union user_action_cookie) == 16); size_t odp_put_userspace_action(uint32_t pid, const void *userdata, size_t userdata_size,