50
55
ovs_be64 *cookie_mask);
51
56
enum ofperr oxm_pull_match(struct ofpbuf *, struct match *);
52
57
enum ofperr oxm_pull_match_loose(struct ofpbuf *, struct match *);
58
enum ofperr oxm_pull_field_array(const void *, size_t fields_len,
59
struct field_array *);
53
60
int nx_put_match(struct ofpbuf *, const struct match *,
54
61
ovs_be64 cookie, ovs_be64 cookie_mask);
55
62
int oxm_put_match(struct ofpbuf *, const struct match *, enum ofp_version);
63
void oxm_format_field_array(struct ds *, const struct field_array *);
64
int oxm_put_field_array(struct ofpbuf *, const struct field_array *,
65
enum ofp_version version);
67
/* Decoding and encoding OXM/NXM headers (just a field ID) or entries (a field
68
* ID followed by a value and possibly a mask). */
69
enum ofperr nx_pull_entry(struct ofpbuf *, const struct mf_field **,
70
union mf_value *value, union mf_value *mask);
71
enum ofperr nx_pull_header(struct ofpbuf *, const struct mf_field **,
73
void nx_put_entry(struct ofpbuf *, enum mf_field_id, enum ofp_version,
74
const union mf_value *value, const union mf_value *mask);
75
void nx_put_header(struct ofpbuf *, enum mf_field_id, enum ofp_version,
78
/* NXM and OXM protocol headers values.
80
* These are often alternatives to nx_pull_entry/header() and
81
* nx_put_entry/header() for decoding and encoding OXM/NXM. In those cases,
82
* the nx_*() functions should be preferred because they can support the 64-bit
83
* "experimenter" OXM format (even though it is not yet implemented). */
84
uint32_t mf_nxm_header(enum mf_field_id);
85
const struct mf_field *mf_from_nxm_header(uint32_t nxm_header);
57
87
char *nx_match_to_string(const uint8_t *, unsigned int match_len);
58
88
char *oxm_match_to_string(const struct ofpbuf *, unsigned int match_len);
59
89
int nx_match_from_string(const char *, struct ofpbuf *);
60
90
int oxm_match_from_string(const char *, struct ofpbuf *);
92
void nx_format_field_name(enum mf_field_id, enum ofp_version, struct ds *);
62
94
char *nxm_parse_reg_move(struct ofpact_reg_move *, const char *)
64
char *nxm_parse_reg_load(struct ofpact_reg_load *, const char *)
95
OVS_WARN_UNUSED_RESULT;
67
97
void nxm_format_reg_move(const struct ofpact_reg_move *, struct ds *);
68
void nxm_format_reg_load(const struct ofpact_reg_load *, struct ds *);
70
enum ofperr nxm_reg_move_from_openflow(const struct nx_action_reg_move *,
71
struct ofpbuf *ofpacts);
72
enum ofperr nxm_reg_load_from_openflow(const struct nx_action_reg_load *,
73
struct ofpbuf *ofpacts);
75
99
enum ofperr nxm_reg_move_check(const struct ofpact_reg_move *,
76
100
const struct flow *);
77
enum ofperr nxm_reg_load_check(const struct ofpact_reg_load *,
80
void nxm_reg_move_to_nxast(const struct ofpact_reg_move *,
81
struct ofpbuf *openflow);
82
void nxm_reg_load_to_nxast(const struct ofpact_reg_load *,
83
struct ofpbuf *openflow);
85
102
void nxm_execute_reg_move(const struct ofpact_reg_move *, struct flow *,
86
103
struct flow_wildcards *);
87
void nxm_execute_reg_load(const struct ofpact_reg_load *, struct flow *,
88
struct flow_wildcards *);
89
104
void nxm_reg_load(const struct mf_subfield *, uint64_t src_data,
90
105
struct flow *, struct flow_wildcards *);
92
107
char *nxm_parse_stack_action(struct ofpact_stack *, const char *)
108
OVS_WARN_UNUSED_RESULT;
95
110
void nxm_format_stack_push(const struct ofpact_stack *, struct ds *);
96
111
void nxm_format_stack_pop(const struct ofpact_stack *, struct ds *);
98
enum ofperr nxm_stack_push_from_openflow(const struct nx_action_stack *,
99
struct ofpbuf *ofpacts);
100
enum ofperr nxm_stack_pop_from_openflow(const struct nx_action_stack *,
101
struct ofpbuf *ofpacts);
102
113
enum ofperr nxm_stack_push_check(const struct ofpact_stack *,
103
114
const struct flow *);
104
115
enum ofperr nxm_stack_pop_check(const struct ofpact_stack *,
105
116
const struct flow *);
107
void nxm_stack_push_to_nxast(const struct ofpact_stack *,
108
struct ofpbuf *openflow);
109
void nxm_stack_pop_to_nxast(const struct ofpact_stack *,
110
struct ofpbuf *openflow);
112
118
void nxm_execute_stack_push(const struct ofpact_stack *,
113
119
const struct flow *, struct flow_wildcards *,
114
120
struct ofpbuf *);