@@ -91,7 +91,7 @@ that the message is suppressed.
``OFPRR_IDLE_TIMEOUT`` yes ---
``OFPRR_HARD_TIMEOUT`` yes ---
``OFPRR_DELETE`` yes ---
- ``OFPRR_GROUP_DELETE`` (OF1.4+) yes ---
+ ``OFPRR_GROUP_DELETE`` (OF1.3+) yes ---
``OFPRR_METER_DELETE`` (OF1.4+) yes ---
``OFPRR_EVICTION`` (OF1.4+) yes ---
=========================================== ======= =====
@@ -334,9 +334,11 @@ enum ofp_flow_removed_reason {
((1u << OFPRR_IDLE_TIMEOUT) | \
(1u << OFPRR_HARD_TIMEOUT) | \
(1u << OFPRR_DELETE))
-#define OFPRR14_BITS \
+#define OFPRR13_BITS \
(OFPRR10_BITS | \
- (1u << OFPRR_GROUP_DELETE) | \
+ (1u << OFPRR_GROUP_DELETE))
+#define OFPRR14_BITS \
+ (OFPRR13_BITS | \
(1u << OFPRR_METER_DELETE) | \
(1u << OFPRR_EVICTION))
@@ -11047,15 +11047,21 @@ ofputil_async_cfg_default(enum ofp_version version)
pin |= 1u << OFPR_IMPLICIT_MISS;
}
- return (struct ofputil_async_cfg) {
+ struct ofputil_async_cfg oac = {
.master[OAM_PACKET_IN] = pin,
-
- .master[OAM_FLOW_REMOVED]
- = (version >= OFP14_VERSION ? OFPRR14_BITS : OFPRR10_BITS),
-
.master[OAM_PORT_STATUS] = OFPPR_BITS,
- .slave[OAM_PORT_STATUS] = OFPPR_BITS,
+ .slave[OAM_PORT_STATUS] = OFPPR_BITS
};
+
+ if (version >= OFP14_VERSION) {
+ oac.master[OAM_FLOW_REMOVED] = OFPRR14_BITS;
+ } else if (version == OFP13_VERSION) {
+ oac.master[OAM_FLOW_REMOVED] = OFPRR13_BITS;
+ } else {
+ oac.master[OAM_FLOW_REMOVED] = OFPRR10_BITS;
+ }
+
+ return oac;
}
static void
@@ -3429,8 +3429,8 @@ udp,vlan_tci=0x0000,dl_src=00:26:b9:8c:b0:f9,dl_dst=00:25:83:df:b4:00,nw_src=172
ovs-ofctl -O OpenFlow13 add-group br0 group_id=1234,type=all,bucket=output:10
ovs-ofctl -O OpenFlow13 add-flow br0 send_flow_rem,actions=group:1234
ovs-ofctl -O OpenFlow13 --strict del-groups br0 group_id=1234
- if test X"$1" = X"OFPRR_DELETE"; then shift;
- echo >>expout "OFPT_FLOW_REMOVED (OF1.3): reason=gropu_delete table_id=0"
+ if test X"$1" = X"OFPRR_GROUP_DELETE"; then shift;
+ echo >>expout "OFPT_FLOW_REMOVED (OF1.3): reason=group_delete table_id=0"
fi
AT_FAIL_IF([test X"$1" != X])
@@ -3450,19 +3450,19 @@ check_async 1
# Set miss_send_len to 128, turning on packet-ins for our service connection.
ovs-appctl -t ovs-ofctl ofctl/send 0409000c0123456700000080
-check_async 2 OFPR_ACTION OFPPR_ADD OFPPR_DELETE OFPRR_DELETE
+check_async 2 OFPR_ACTION OFPPR_ADD OFPPR_DELETE OFPRR_DELETE OFPRR_GROUP_DELETE
# Become slave (OF 1.3), which should disable everything except port status.
ovs-appctl -t ovs-ofctl ofctl/send 041800180000000200000003000000000000000000000001
check_async 3 OFPPR_ADD OFPPR_DELETE
# Use OF 1.3 OFPT_SET_ASYNC to enable a patchwork of asynchronous messages.
-ovs-appctl -t ovs-ofctl ofctl/send 041c002000000002000000020000000500000005000000020000000200000005
-check_async 4 OFPR_INVALID_TTL OFPPR_DELETE OFPRR_DELETE
+ovs-appctl -t ovs-ofctl ofctl/send 041c00200000000200000002000000050000000500000002000000020000000d
+check_async 4 OFPR_INVALID_TTL OFPPR_DELETE OFPRR_DELETE OFPRR_GROUP_DELETE
# Set controller ID 123.
ovs-appctl -t ovs-ofctl ofctl/send 04040018000000030000232000000014000000000000007b
-check_async 5 OFPR_NO_MATCH OFPPR_DELETE OFPRR_DELETE
+check_async 5 OFPR_NO_MATCH OFPPR_DELETE OFPRR_DELETE OFPRR_GROUP_DELETE
# Restore controller ID 0.
ovs-appctl -t ovs-ofctl ofctl/send 040400180000000300002320000000140000000000000000
@@ -4708,7 +4708,7 @@ OFPT_GET_ASYNC_REPLY (OF1.3):
master:
PACKET_IN: no_match action
PORT_STATUS: add delete modify
- FLOW_REMOVED: idle hard delete
+ FLOW_REMOVED: idle hard delete group_delete
ROLE_STATUS: (off)
TABLE_STATUS: (off)
REQUESTFORWARD: (off)
Signed-off-by: Justin Pettit <jpettit@ovn.org> --- Documentation/topics/design.rst | 2 +- include/openflow/openflow-common.h | 6 ++++-- lib/ofp-util.c | 18 ++++++++++++------ tests/ofproto.at | 14 +++++++------- 4 files changed, 24 insertions(+), 16 deletions(-)