/* Other. */ \
DEFINE_OFPACT(NOTE, ofpact_note, data) \
DEFINE_OFPACT(EXIT, ofpact_null, ofpact) \
+ DEFINE_OFPACT(SAMPLE, ofpact_sample, ofpact) \
\
/* Instructions */ \
/* XXX Write-Actions */ \
/* Part of struct ofpact_learn, below. */
struct ofpact_learn_spec {
- int n_bits;
+ int n_bits; /* Number of bits in source and dest. */
- int src_type;
- struct mf_subfield src;
- union mf_subvalue src_imm;
+ int src_type; /* One of NX_LEARN_SRC_*. */
+ struct mf_subfield src; /* NX_LEARN_SRC_FIELD only. */
+ union mf_subvalue src_imm; /* NX_LEARN_SRC_IMMEDIATE only. */
- int dst_type;
- struct mf_subfield dst;
+ int dst_type; /* One of NX_LEARN_DST_*. */
+ struct mf_subfield dst; /* NX_LEARN_DST_MATCH, NX_LEARN_DST_LOAD only. */
};
/* OFPACT_LEARN.
uint8_t data[];
};
+/* OFPACT_SAMPLE.
+ *
+ * Used for NXAST_SAMPLE. */
+struct ofpact_sample {
+ struct ofpact ofpact;
+ uint16_t probability; // Always >0.
+ uint32_t collector_set_id;
+ uint32_t obs_domain_id;
+ uint32_t obs_point_id;
+};
+
/* OFPACT_DEC_TTL.
*
* Used for OFPAT11_DEC_NW_TTL, NXAST_DEC_TTL and NXAST_DEC_TTL_CNT_IDS. */
struct ofpbuf *ofpacts);
enum ofperr ofpacts_pull_openflow11_instructions(struct ofpbuf *openflow,
unsigned int instructions_len,
+ uint8_t table_id,
struct ofpbuf *ofpacts);
enum ofperr ofpacts_check(const struct ofpact[], size_t ofpacts_len,
const struct flow *, int max_ports);