From 32ca25fe8893854ffbca0abb5e317e7ef9f728c7 Mon Sep 17 00:00:00 2001 From: Open vSwitch CI Date: Feb 01 2022 03:43:59 +0000 Subject: Import openvswitch2.13-2.13.0-154 from Fast DataPath --- diff --git a/SOURCES/openvswitch-2.13.0.patch b/SOURCES/openvswitch-2.13.0.patch index 91cb9fb..1814ec3 100644 --- a/SOURCES/openvswitch-2.13.0.patch +++ b/SOURCES/openvswitch-2.13.0.patch @@ -84887,6 +84887,28 @@ index 28382e0123..02a9235d51 100644 prop_len = sizeof(*pnmt); break; } +diff --git a/lib/ofp-flow.c b/lib/ofp-flow.c +index ff0396845a..3bc744f78f 100644 +--- a/lib/ofp-flow.c ++++ b/lib/ofp-flow.c +@@ -1254,7 +1254,16 @@ ofputil_append_flow_stats_reply(const struct ofputil_flow_stats *fs, + OVS_NOT_REACHED(); + } + +- ofpmp_postappend(replies, start_ofs); ++ if ((reply->size - start_ofs) > (UINT16_MAX - ofpbuf_headersize(reply))) { ++ /* When this happens, the reply will not fit in a single OFP message, ++ * and we should not append it to the queue. We will log a warning ++ * and continue with the next flow stat entry. */ ++ reply->size = start_ofs; ++ VLOG_WARN_RL(&rl, "Flow exceeded the maximum flow statistics reply " ++ "size and was excluded from the response set"); ++ } else { ++ ofpmp_postappend(replies, start_ofs); ++ } + fs_->match.flow.tunnel.metadata.tab = orig_tun_table; + } + diff --git a/lib/ofp-group.c b/lib/ofp-group.c index b675e802c3..cc33feda4a 100644 --- a/lib/ofp-group.c @@ -85018,7 +85040,7 @@ index 30d1d08eba..00497d940c 100644 struct ovsdb_idl_class { diff --git a/lib/ovsdb-idl.c b/lib/ovsdb-idl.c -index 190143f363..325050f21e 100644 +index 190143f363..3fd500dec3 100644 --- a/lib/ovsdb-idl.c +++ b/lib/ovsdb-idl.c @@ -219,9 +219,12 @@ struct ovsdb_idl_db { @@ -85616,13 +85638,13 @@ index 190143f363..325050f21e 100644 + const struct ovsdb_idl_arc *arc; + LIST_FOR_EACH (arc, dst_node, &row->dst_arcs) { + struct ovsdb_idl_row *ref = arc->src; -+ -+ if (ovs_list_is_empty(&ref->track_node) && -+ ovsdb_idl_track_is_set(ref->table)) { - const struct ovsdb_idl_arc *arc; - LIST_FOR_EACH (arc, dst_node, &row->dst_arcs) { - add_tracked_change_for_references(arc->src); ++ if (ovs_list_is_empty(&ref->track_node) && ++ ovsdb_idl_track_is_set(ref->table)) { ++ + ovsdb_idl_row_track_change(ref, OVSDB_IDL_CHANGE_MODIFY); + add_tracked_change_for_references(ref); } @@ -85744,6 +85766,17 @@ index 190143f363..325050f21e 100644 return row; } +@@ -5323,6 +5571,10 @@ void + ovsdb_idl_loop_destroy(struct ovsdb_idl_loop *loop) + { + if (loop) { ++ if (loop->committing_txn) { ++ ovsdb_idl_txn_abort(loop->committing_txn); ++ ovsdb_idl_txn_destroy(loop->committing_txn); ++ } + ovsdb_idl_destroy(loop->idl); + } + } diff --git a/lib/ovsdb-idl.h b/lib/ovsdb-idl.h index 9f12ce3206..6ad6d3a54e 100644 --- a/lib/ovsdb-idl.h @@ -89857,7 +89890,7 @@ index ff1cc93707..694146b428 100644 AT_CLEANUP diff --git a/tests/ovs-ofctl.at b/tests/ovs-ofctl.at -index c8062c8acc..ebf0dc41c0 100644 +index c8062c8acc..9adfcbe2d0 100644 --- a/tests/ovs-ofctl.at +++ b/tests/ovs-ofctl.at @@ -101,6 +101,7 @@ for test_case in \ @@ -89918,6 +89951,29 @@ index c8062c8acc..ebf0dc41c0 100644 ]]) AT_CLEANUP +@@ -3223,3 +3246,22 @@ dnl because we need ovs-vswitchd to have the controller config before starting + dnl the controller to 'snoop' the OpenFlow messages from beginning + OVS_VSWITCHD_STOP(["/connection failed (No such file or directory)/d"]) + AT_CLEANUP ++ ++ ++AT_SETUP([ovs-ofctl show-flows - Oversized flow]) ++OVS_VSWITCHD_START ++ ++printf " priority=90,icmp,reg15=0x8005,metadata=0x1,nw_dst=11.0.0.1,icmp_type=8,icmp_code=0 actions=" > flow.txt ++for i in `seq 1 1022`; do printf "set_field:0x399->reg13,set_field:0x$i->reg15,resubmit(,39),"; done >> flow.txt ++printf "resubmit(,39)\n" >> flow.txt ++ ++AT_CHECK([ovs-ofctl -O OpenFlow15 add-flows br0 flow.txt]) ++ ++AT_CHECK([ovs-ofctl -O OpenFlow10 dump-flows br0 | ofctl_strip | sed '/NXST_FLOW/d' | sort], [0], []) ++OVS_WAIT_UNTIL([grep -q "ofp_flow|WARN|Flow exceeded the maximum flow statistics reply size and was excluded from the response set" ovs-vswitchd.log]) ++ ++cat flow.txt > expout ++AT_CHECK([ovs-ofctl -O OpenFlow15 dump-flows br0 | ofctl_strip | sed '/OFPST_FLOW/d' | sort], [0], [expout]) ++ ++OVS_VSWITCHD_STOP(["/Flow exceeded the maximum flow statistics reply size and was excluded from the response set/d"]) ++AT_CLEANUP diff --git a/tests/ovs-vsctl.at b/tests/ovs-vsctl.at index 55c7a6e179..1f1fc3c79a 100644 --- a/tests/ovs-vsctl.at diff --git a/SPECS/openvswitch2.13.spec b/SPECS/openvswitch2.13.spec index c77ddab..d748b7e 100644 --- a/SPECS/openvswitch2.13.spec +++ b/SPECS/openvswitch2.13.spec @@ -59,7 +59,7 @@ Summary: Open vSwitch Group: System Environment/Daemons daemon/database/utilities URL: http://www.openvswitch.org/ Version: 2.13.0 -Release: 153%{?commit0:.%{date}git%{shortcommit0}}%{?commit1:dpdk%{shortcommit1}}%{?dist} +Release: 154%{?commit0:.%{date}git%{shortcommit0}}%{?commit1:dpdk%{shortcommit1}}%{?dist} # Nearly all of openvswitch is ASL 2.0. The bugtool is LGPLv2+, and the # lib/sflow*.[ch] files are SISSL @@ -715,6 +715,13 @@ exit 0 %endif %changelog +* Mon Jan 31 2022 Open vSwitch CI - 2.13.0-154 +- Merging upstream branch-2.13 [RH git: 7c20278b9e] + Commit list: + feffcbf2b0 ovsdb-idl: ovsdb_idl_loop_destroy must also destroy the committing txn. + 813ddb8a2e ofp-flow: Skip flow reply if it exceeds the maximum message size. + + * Wed Jan 26 2022 Open vSwitch CI - 2.13.0-153 - Merging upstream branch-2.13 [RH git: 607e493104] Commit list: