Signed-off-by: Simon Horman <[email protected]>
---
v2
* add ofpact_to_openflow11() change
---
lib/ofp-actions.c | 11 ++++++++++-
lib/ofp-parse.c | 5 +++++
lib/ofp-util.def | 2 +-
3 files changed, 16 insertions(+), 2 deletions(-)
diff --git a/lib/ofp-actions.c b/lib/ofp-actions.c
index 170e796..564e420 100644
--- a/lib/ofp-actions.c
+++ b/lib/ofp-actions.c
@@ -727,6 +727,11 @@ ofpact_from_openflow11(const union ofp_action *a, struct
ofpbuf *out)
ofpact_put_STRIP_VLAN(out);
break;
+ case OFPUTIL_OFPAT11_SET_QUEUE:
+ ofpact_put_SET_QUEUE(out)->queue_id =
+ ntohl(((const struct ofp11_action_set_queue *)a)->queue_id);
+ break;
+
case OFPUTIL_OFPAT11_SET_DL_SRC:
memcpy(ofpact_put_SET_ETH_SRC(out)->mac,
((const struct ofp_action_dl_addr *) a)->dl_addr, ETH_ADDR_LEN);
@@ -1566,6 +1571,11 @@ ofpact_to_openflow11(const struct ofpact *a, struct
ofpbuf *out)
htons(ETH_TYPE_VLAN_8021Q);
break;
+ case OFPACT_SET_QUEUE:
+ ofputil_put_OFPAT11_SET_QUEUE(out)->queue_id
+ = htonl(ofpact_get_SET_QUEUE(a)->queue_id);
+ break;
+
case OFPACT_SET_ETH_SRC:
memcpy(ofputil_put_OFPAT11_SET_DL_SRC(out)->dl_addr,
ofpact_get_SET_ETH_SRC(a)->mac, ETH_ADDR_LEN);
@@ -1619,7 +1629,6 @@ ofpact_to_openflow11(const struct ofpact *a, struct
ofpbuf *out)
case OFPACT_REG_MOVE:
case OFPACT_REG_LOAD:
case OFPACT_SET_TUNNEL:
- case OFPACT_SET_QUEUE:
case OFPACT_POP_QUEUE:
case OFPACT_FIN_TIMEOUT:
case OFPACT_RESUBMIT:
diff --git a/lib/ofp-parse.c b/lib/ofp-parse.c
index d64d461..65f023a 100644
--- a/lib/ofp-parse.c
+++ b/lib/ofp-parse.c
@@ -434,6 +434,11 @@ parse_named_action(enum ofputil_action_code code, const
struct flow *flow,
ofpact_put_PUSH_VLAN(ofpacts);
break;
+ case OFPUTIL_OFPAT11_SET_QUEUE:
+ ofpact_put_SET_QUEUE(ofpacts)->queue_id = str_to_u32(arg);
+ break;
+
+
case OFPUTIL_OFPAT10_SET_DL_SRC:
case OFPUTIL_OFPAT11_SET_DL_SRC:
str_to_mac(arg, ofpact_put_SET_ETH_SRC(ofpacts)->mac);
diff --git a/lib/ofp-util.def b/lib/ofp-util.def
index 39575ba..421adb1 100644
--- a/lib/ofp-util.def
+++ b/lib/ofp-util.def
@@ -32,7 +32,7 @@ OFPAT11_ACTION(OFPAT11_SET_TP_SRC, ofp_action_tp_port, 0,
"mod_tp_src")
OFPAT11_ACTION(OFPAT11_SET_TP_DST, ofp_action_tp_port, 0, "mod_tp_dst")
OFPAT11_ACTION(OFPAT11_PUSH_VLAN, ofp11_action_push, 0, "push_vlan")
OFPAT11_ACTION(OFPAT11_POP_VLAN, ofp_action_header, 0, "pop_vlan")
-//OFPAT11_ACTION(OFPAT11_SET_QUEUE, ofp11_action_set_queue, 0, "set_queue")
+OFPAT11_ACTION(OFPAT11_SET_QUEUE, ofp11_action_set_queue, 0, "set_queue")
//OFPAT11_ACTION(OFPAT11_SET_NW_TTL, ofp11_action_nw_ttl, 0, "set_nw_ttl")
OFPAT11_ACTION(OFPAT11_DEC_NW_TTL, ofp_action_header, 0, NULL)
OFPAT11_ACTION(OFPAT12_SET_FIELD, ofp12_action_set_field, 1, "set_field")
--
1.7.10.4
_______________________________________________
dev mailing list
[email protected]
http://openvswitch.org/mailman/listinfo/dev