Signed-off-by: Simon Horman <[email protected]>
---
v4
* Manual rebase
v3
* No change
v2
* Use ofputil_put_match()
---
lib/ofp-util.c | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/lib/ofp-util.c b/lib/ofp-util.c
index 633f6ae..194d1de 100644
--- a/lib/ofp-util.c
+++ b/lib/ofp-util.c
@@ -2346,6 +2346,23 @@ ofputil_encode_flow_removed(const struct
ofputil_flow_removed *fr,
uint8_t ofp_version = ofputil_protocol_to_ofp_version(protocol);
switch (protocol) {
+ case OFPUTIL_P_OF12: {
+ struct ofp12_flow_removed *ofr;
+
+ ofr = make_openflow_xid(sizeof *ofr, ofp_version,
+ OFPT_FLOW_REMOVED, 0, &msg);
+ ofr->cookie = fr->cookie;
+ ofr->priority = htons(fr->rule.priority);
+ ofr->reason = fr->reason;
+ ofr->table_id = 0;
+ ofr->duration_sec = htonl(fr->duration_sec);
+ ofr->duration_nsec = htonl(fr->duration_nsec);
+ ofr->idle_timeout = htons(fr->idle_timeout);
+ ofr->packet_count = htonll(fr->packet_count);
+ ofr->byte_count = htonll(fr->byte_count);
+ ofputil_put_match(msg, &fr->rule, 0, 0, protocol);
+ break;
+ }
case OFPUTIL_P_OF10:
case OFPUTIL_P_OF10_TID: {
--
1.7.10.2.484.gcd07cc5
_______________________________________________
dev mailing list
[email protected]
http://openvswitch.org/mailman/listinfo/dev