static enum ofperr
decode_OFPAT_RAW10_OUTPUT(const struct ofp10_action_output *oao,
+ enum ofp_version ofp_version OVS_UNUSED,
struct ofpbuf *out)
{
struct ofpact_output *output;
static enum ofperr
decode_OFPAT_RAW11_OUTPUT(const struct ofp11_action_output *oao,
- struct ofpbuf *out)
+ enum ofp_version ofp_version OVS_UNUSED,
+ struct ofpbuf *out)
{
struct ofpact_output *output;
enum ofperr error;
/* Group actions. */
static enum ofperr
-decode_OFPAT_RAW11_GROUP(uint32_t group_id, struct ofpbuf *out)
+decode_OFPAT_RAW11_GROUP(uint32_t group_id,
+ enum ofp_version ofp_version OVS_UNUSED,
+ struct ofpbuf *out)
{
ofpact_put_GROUP(out)->group_id = group_id;
return 0;
static enum ofperr
decode_NXAST_RAW_CONTROLLER(const struct nx_action_controller *nac,
+ enum ofp_version ofp_version OVS_UNUSED,
struct ofpbuf *out)
{
struct ofpact_controller *oc;
static enum ofperr
decode_OFPAT_RAW10_ENQUEUE(const struct ofp10_action_enqueue *oae,
+ enum ofp_version ofp_version OVS_UNUSED,
struct ofpbuf *out)
{
struct ofpact_enqueue *enqueue;
static enum ofperr
decode_NXAST_RAW_OUTPUT_REG(const struct nx_action_output_reg *naor,
+ enum ofp_version ofp_version OVS_UNUSED,
struct ofpbuf *out)
{
struct ofpact_output_reg *output_reg;
static enum ofperr
decode_NXAST_RAW_OUTPUT_REG2(const struct nx_action_output_reg2 *naor,
- struct ofpbuf *out)
+ enum ofp_version ofp_version OVS_UNUSED,
+ struct ofpbuf *out)
{
struct ofpact_output_reg *output_reg;
enum ofperr error;
}
static enum ofperr
-decode_NXAST_RAW_BUNDLE(const struct nx_action_bundle *nab, struct ofpbuf *out)
+decode_NXAST_RAW_BUNDLE(const struct nx_action_bundle *nab,
+ enum ofp_version ofp_version OVS_UNUSED,
+ struct ofpbuf *out)
{
return decode_bundle(false, nab, out);
}
static enum ofperr
decode_NXAST_RAW_BUNDLE_LOAD(const struct nx_action_bundle *nab,
+ enum ofp_version ofp_version OVS_UNUSED,
struct ofpbuf *out)
{
return decode_bundle(true, nab, out);
}
static enum ofperr
-decode_OFPAT_RAW10_SET_VLAN_VID(uint16_t vid, struct ofpbuf *out)
+decode_OFPAT_RAW10_SET_VLAN_VID(uint16_t vid,
+ enum ofp_version ofp_version OVS_UNUSED,
+ struct ofpbuf *out)
{
return decode_set_vlan_vid(vid, true, out);
}
static enum ofperr
-decode_OFPAT_RAW11_SET_VLAN_VID(uint16_t vid, struct ofpbuf *out)
+decode_OFPAT_RAW11_SET_VLAN_VID(uint16_t vid,
+ enum ofp_version ofp_version OVS_UNUSED,
+ struct ofpbuf *out)
{
return decode_set_vlan_vid(vid, false, out);
}
}
static enum ofperr
-decode_OFPAT_RAW10_SET_VLAN_PCP(uint8_t pcp, struct ofpbuf *out)
+decode_OFPAT_RAW10_SET_VLAN_PCP(uint8_t pcp,
+ enum ofp_version ofp_version OVS_UNUSED,
+ struct ofpbuf *out)
{
return decode_set_vlan_pcp(pcp, true, out);
}
static enum ofperr
-decode_OFPAT_RAW11_SET_VLAN_PCP(uint8_t pcp, struct ofpbuf *out)
+decode_OFPAT_RAW11_SET_VLAN_PCP(uint8_t pcp,
+ enum ofp_version ofp_version OVS_UNUSED,
+ struct ofpbuf *out)
{
return decode_set_vlan_pcp(pcp, false, out);
}
/* Push VLAN action. */
static enum ofperr
-decode_OFPAT_RAW11_PUSH_VLAN(ovs_be16 eth_type, struct ofpbuf *out)
+decode_OFPAT_RAW11_PUSH_VLAN(ovs_be16 eth_type,
+ enum ofp_version ofp_version OVS_UNUSED,
+ struct ofpbuf *out)
{
if (eth_type != htons(ETH_TYPE_VLAN_8021Q)) {
/* XXX 802.1AD(QinQ) isn't supported at the moment */
static enum ofperr
decode_OFPAT_RAW_SET_DL_SRC(const struct ofp_action_dl_addr *a,
+ enum ofp_version ofp_version OVS_UNUSED,
struct ofpbuf *out)
{
ofpact_put_SET_ETH_SRC(out)->mac = a->dl_addr;
static enum ofperr
decode_OFPAT_RAW_SET_DL_DST(const struct ofp_action_dl_addr *a,
+ enum ofp_version ofp_version OVS_UNUSED,
struct ofpbuf *out)
{
ofpact_put_SET_ETH_DST(out)->mac = a->dl_addr;
/* Set IPv4 address actions. */
static enum ofperr
-decode_OFPAT_RAW_SET_NW_SRC(ovs_be32 ipv4, struct ofpbuf *out)
+decode_OFPAT_RAW_SET_NW_SRC(ovs_be32 ipv4,
+ enum ofp_version ofp_version OVS_UNUSED,
+ struct ofpbuf *out)
{
ofpact_put_SET_IPV4_SRC(out)->ipv4 = ipv4;
return 0;
}
static enum ofperr
-decode_OFPAT_RAW_SET_NW_DST(ovs_be32 ipv4, struct ofpbuf *out)
+decode_OFPAT_RAW_SET_NW_DST(ovs_be32 ipv4,
+ enum ofp_version ofp_version OVS_UNUSED,
+ struct ofpbuf *out)
{
ofpact_put_SET_IPV4_DST(out)->ipv4 = ipv4;
return 0;
/* Set IPv4/v6 TOS actions. */
static enum ofperr
-decode_OFPAT_RAW_SET_NW_TOS(uint8_t dscp, struct ofpbuf *out)
+decode_OFPAT_RAW_SET_NW_TOS(uint8_t dscp,
+ enum ofp_version ofp_version OVS_UNUSED,
+ struct ofpbuf *out)
{
if (dscp & ~IP_DSCP_MASK) {
return OFPERR_OFPBAC_BAD_ARGUMENT;
/* Set IPv4/v6 ECN actions. */
static enum ofperr
-decode_OFPAT_RAW11_SET_NW_ECN(uint8_t ecn, struct ofpbuf *out)
+decode_OFPAT_RAW11_SET_NW_ECN(uint8_t ecn,
+ enum ofp_version ofp_version OVS_UNUSED,
+ struct ofpbuf *out)
{
if (ecn & ~IP_ECN_MASK) {
return OFPERR_OFPBAC_BAD_ARGUMENT;
/* Set IPv4/v6 TTL actions. */
static enum ofperr
-decode_OFPAT_RAW11_SET_NW_TTL(uint8_t ttl, struct ofpbuf *out)
+decode_OFPAT_RAW11_SET_NW_TTL(uint8_t ttl,
+ enum ofp_version ofp_version OVS_UNUSED,
+ struct ofpbuf *out)
{
ofpact_put_SET_IP_TTL(out)->ttl = ttl;
return 0;
/* Set TCP/UDP/SCTP port actions. */
static enum ofperr
-decode_OFPAT_RAW_SET_TP_SRC(ovs_be16 port, struct ofpbuf *out)
+decode_OFPAT_RAW_SET_TP_SRC(ovs_be16 port,
+ enum ofp_version ofp_version OVS_UNUSED,
+ struct ofpbuf *out)
{
ofpact_put_SET_L4_SRC_PORT(out)->port = ntohs(port);
return 0;
}
static enum ofperr
-decode_OFPAT_RAW_SET_TP_DST(ovs_be16 port, struct ofpbuf *out)
+decode_OFPAT_RAW_SET_TP_DST(ovs_be16 port,
+ enum ofp_version ofp_version OVS_UNUSED,
+ struct ofpbuf *out)
{
ofpact_put_SET_L4_DST_PORT(out)->port = ntohs(port);
return 0;
static enum ofperr
decode_OFPAT_RAW15_COPY_FIELD(const struct ofp15_action_copy_field *oacf,
+ enum ofp_version ofp_version OVS_UNUSED,
struct ofpbuf *ofpacts)
{
return decode_copy_field__(oacf->src_offset, oacf->dst_offset,
static enum ofperr
decode_ONFACT_RAW13_COPY_FIELD(const struct onf_action_copy_field *oacf,
+ enum ofp_version ofp_version OVS_UNUSED,
struct ofpbuf *ofpacts)
{
return decode_copy_field__(oacf->src_offset, oacf->dst_offset,
static enum ofperr
decode_NXAST_RAW_REG_MOVE(const struct nx_action_reg_move *narm,
+ enum ofp_version ofp_version OVS_UNUSED,
struct ofpbuf *ofpacts)
{
struct ofpact_reg_move *move;
static enum ofperr
decode_OFPAT_RAW12_SET_FIELD(const struct ofp12_action_set_field *oasf,
+ enum ofp_version ofp_version OVS_UNUSED,
struct ofpbuf *ofpacts)
{
return decode_ofpat_set_field(oasf, false, ofpacts);
static enum ofperr
decode_OFPAT_RAW15_SET_FIELD(const struct ofp12_action_set_field *oasf,
+ enum ofp_version ofp_version OVS_UNUSED,
struct ofpbuf *ofpacts)
{
return decode_ofpat_set_field(oasf, true, ofpacts);
static enum ofperr
decode_NXAST_RAW_REG_LOAD(const struct nx_action_reg_load *narl,
+ enum ofp_version ofp_version OVS_UNUSED,
struct ofpbuf *out)
{
struct ofpact_set_field *sf = ofpact_put_reg_load(out);
static enum ofperr
decode_NXAST_RAW_REG_LOAD2(const struct nx_action_reg_load2 *narl,
+ enum ofp_version ofp_version OVS_UNUSED,
struct ofpbuf *out)
{
struct ofpact_set_field *sf;
static enum ofperr
decode_NXAST_RAW_STACK_PUSH(const struct nx_action_stack *nasp,
- struct ofpbuf *ofpacts)
+ enum ofp_version ofp_version OVS_UNUSED,
+ struct ofpbuf *ofpacts)
{
struct ofpact_stack *push = ofpact_put_STACK_PUSH(ofpacts);
enum ofperr error = decode_stack_action(nasp, push);
static enum ofperr
decode_NXAST_RAW_STACK_POP(const struct nx_action_stack *nasp,
+ enum ofp_version ofp_version OVS_UNUSED,
struct ofpbuf *ofpacts)
{
struct ofpact_stack *pop = ofpact_put_STACK_POP(ofpacts);
static enum ofperr
decode_NXAST_RAW_DEC_TTL_CNT_IDS(const struct nx_action_cnt_ids *nac_ids,
+ enum ofp_version ofp_version OVS_UNUSED,
struct ofpbuf *out)
{
struct ofpact_cnt_ids *ids;
/* Set MPLS label actions. */
static enum ofperr
-decode_OFPAT_RAW_SET_MPLS_LABEL(ovs_be32 label, struct ofpbuf *out)
+decode_OFPAT_RAW_SET_MPLS_LABEL(ovs_be32 label,
+ enum ofp_version ofp_version OVS_UNUSED,
+ struct ofpbuf *out)
{
ofpact_put_SET_MPLS_LABEL(out)->label = label;
return 0;
/* Set MPLS TC actions. */
static enum ofperr
-decode_OFPAT_RAW_SET_MPLS_TC(uint8_t tc, struct ofpbuf *out)
+decode_OFPAT_RAW_SET_MPLS_TC(uint8_t tc,
+ enum ofp_version ofp_version OVS_UNUSED,
+ struct ofpbuf *out)
{
ofpact_put_SET_MPLS_TC(out)->tc = tc;
return 0;
/* Set MPLS TTL actions. */
static enum ofperr
-decode_OFPAT_RAW_SET_MPLS_TTL(uint8_t ttl, struct ofpbuf *out)
+decode_OFPAT_RAW_SET_MPLS_TTL(uint8_t ttl,
+ enum ofp_version ofp_version OVS_UNUSED,
+ struct ofpbuf *out)
{
ofpact_put_SET_MPLS_TTL(out)->ttl = ttl;
return 0;
/* Push MPLS label action. */
static enum ofperr
-decode_OFPAT_RAW_PUSH_MPLS(ovs_be16 ethertype, struct ofpbuf *out)
+decode_OFPAT_RAW_PUSH_MPLS(ovs_be16 ethertype,
+ enum ofp_version ofp_version OVS_UNUSED,
+ struct ofpbuf *out)
{
struct ofpact_push_mpls *oam;
/* Pop MPLS label action. */
static enum ofperr
-decode_OFPAT_RAW_POP_MPLS(ovs_be16 ethertype, struct ofpbuf *out)
+decode_OFPAT_RAW_POP_MPLS(ovs_be16 ethertype,
+ enum ofp_version ofp_version OVS_UNUSED,
+ struct ofpbuf *out)
{
ofpact_put_POP_MPLS(out)->ethertype = ethertype;
return 0;
/* Set tunnel ID actions. */
static enum ofperr
-decode_NXAST_RAW_SET_TUNNEL(uint32_t tun_id, struct ofpbuf *out)
+decode_NXAST_RAW_SET_TUNNEL(uint32_t tun_id,
+ enum ofp_version ofp_version OVS_UNUSED,
+ struct ofpbuf *out)
{
struct ofpact_tunnel *tunnel = ofpact_put_SET_TUNNEL(out);
tunnel->ofpact.raw = NXAST_RAW_SET_TUNNEL;
}
static enum ofperr
-decode_NXAST_RAW_SET_TUNNEL64(uint64_t tun_id, struct ofpbuf *out)
+decode_NXAST_RAW_SET_TUNNEL64(uint64_t tun_id,
+ enum ofp_version ofp_version OVS_UNUSED,
+ struct ofpbuf *out)
{
struct ofpact_tunnel *tunnel = ofpact_put_SET_TUNNEL(out);
tunnel->ofpact.raw = NXAST_RAW_SET_TUNNEL64;
/* Set queue action. */
static enum ofperr
-decode_OFPAT_RAW_SET_QUEUE(uint32_t queue_id, struct ofpbuf *out)
+decode_OFPAT_RAW_SET_QUEUE(uint32_t queue_id,
+ enum ofp_version ofp_version OVS_UNUSED,
+ struct ofpbuf *out)
{
ofpact_put_SET_QUEUE(out)->queue_id = queue_id;
return 0;
static enum ofperr
decode_NXAST_RAW_FIN_TIMEOUT(const struct nx_action_fin_timeout *naft,
+ enum ofp_version ofp_version OVS_UNUSED,
struct ofpbuf *out)
{
struct ofpact_fin_timeout *oft;
OFP_ASSERT(sizeof(struct nx_action_resubmit) == 16);
static enum ofperr
-decode_NXAST_RAW_RESUBMIT(uint16_t port, struct ofpbuf *out)
+decode_NXAST_RAW_RESUBMIT(uint16_t port,
+ enum ofp_version ofp_version OVS_UNUSED,
+ struct ofpbuf *out)
{
struct ofpact_resubmit *resubmit;
static enum ofperr
decode_NXAST_RAW_RESUBMIT_TABLE(const struct nx_action_resubmit *nar,
+ enum ofp_version ofp_version OVS_UNUSED,
struct ofpbuf *out)
{
struct ofpact_resubmit *resubmit;
* 'ofpacts'. Returns 0 if successful, otherwise an OFPERR_*. */
static enum ofperr
decode_NXAST_RAW_LEARN(const struct nx_action_learn *nal,
+ enum ofp_version ofp_version OVS_UNUSED,
struct ofpbuf *ofpacts)
{
struct ofpact_learn *learn;
static enum ofperr
decode_NXAST_RAW_CONJUNCTION(const struct nx_action_conjunction *nac,
+ enum ofp_version ofp_version OVS_UNUSED,
struct ofpbuf *out)
{
if (nac->n_clauses < 2 || nac->n_clauses > 64
static enum ofperr
decode_NXAST_RAW_MULTIPATH(const struct nx_action_multipath *nam,
+ enum ofp_version ofp_version OVS_UNUSED,
struct ofpbuf *out)
{
uint32_t n_links = ntohs(nam->max_link) + 1;
OFP_ASSERT(sizeof(struct nx_action_note) == 16);
static enum ofperr
-decode_NXAST_RAW_NOTE(const struct nx_action_note *nan, struct ofpbuf *out)
+decode_NXAST_RAW_NOTE(const struct nx_action_note *nan,
+ enum ofp_version ofp_version OVS_UNUSED,
+ struct ofpbuf *out)
{
struct ofpact_note *note;
unsigned int length;
OFP_ASSERT(sizeof(struct nx_action_sample) == 24);
static enum ofperr
-decode_NXAST_RAW_SAMPLE(const struct nx_action_sample *nas, struct ofpbuf *out)
+decode_NXAST_RAW_SAMPLE(const struct nx_action_sample *nas,
+ enum ofp_version ofp_version OVS_UNUSED,
+ struct ofpbuf *out)
{
struct ofpact_sample *sample;
static enum ofperr
decode_NXAST_RAW_WRITE_METADATA(const struct nx_action_write_metadata *nawm,
+ enum ofp_version ofp_version OVS_UNUSED,
struct ofpbuf *out)
{
struct ofpact_metadata *om;
error = ofpact_pull_raw(&openflow, ofp_version, &raw, &arg);
if (!error) {
- error = ofpact_decode(action, raw, arg, ofpacts);
+ error = ofpact_decode(action, raw, ofp_version, arg, ofpacts);
}
if (error) {