diff --git a/SOURCES/openvswitch-3.2.0.patch b/SOURCES/openvswitch-3.2.0.patch index 9cab150..cc0c6c8 100644 --- a/SOURCES/openvswitch-3.2.0.patch +++ b/SOURCES/openvswitch-3.2.0.patch @@ -3327,10 +3327,21 @@ index 0b9dc4278c..9b7e06e0c7 100644 if (!wc->masks.vlans[i].tci) { break; diff --git a/lib/mcast-snooping.c b/lib/mcast-snooping.c -index 029ca28558..43805ae4d5 100644 +index 029ca28558..98ec67281b 100644 --- a/lib/mcast-snooping.c +++ b/lib/mcast-snooping.c -@@ -946,8 +946,9 @@ mcast_snooping_wait(struct mcast_snooping *ms) +@@ -407,7 +407,9 @@ mcast_snooping_add_group(struct mcast_snooping *ms, + uint32_t hash = mcast_table_hash(ms, addr, vlan); + + if (hmap_count(&ms->table) >= ms->max_entries) { +- group_get_lru(ms, &grp); ++ if (!group_get_lru(ms, &grp)) { ++ return false; ++ } + mcast_snooping_flush_group(ms, grp); + } + +@@ -946,8 +948,9 @@ mcast_snooping_wait(struct mcast_snooping *ms) void mcast_snooping_flush_bundle(struct mcast_snooping *ms, void *port) { @@ -3341,7 +3352,7 @@ index 029ca28558..43805ae4d5 100644 if (!mcast_snooping_enabled(ms)) { return; -@@ -971,5 +972,19 @@ mcast_snooping_flush_bundle(struct mcast_snooping *ms, void *port) +@@ -971,5 +974,19 @@ mcast_snooping_flush_bundle(struct mcast_snooping *ms, void *port) } } @@ -4225,7 +4236,7 @@ index 9ad42b232d..56512fc28d 100644 if (inner_error) { char *s = ovsdb_error_to_string_free(inner_error); diff --git a/lib/ovsdb-idl.c b/lib/ovsdb-idl.c -index 634fbb56df..ba720474b6 100644 +index 634fbb56df..d92df28d19 100644 --- a/lib/ovsdb-idl.c +++ b/lib/ovsdb-idl.c @@ -177,6 +177,7 @@ static void ovsdb_idl_row_mark_backrefs_for_reparsing(struct ovsdb_idl_row *); @@ -4270,6 +4281,15 @@ index 634fbb56df..ba720474b6 100644 } static struct ovsdb_idl_row * +@@ -3776,6 +3783,8 @@ ovsdb_idl_txn_delete(const struct ovsdb_idl_row *row_) + ovsdb_idl_remove_from_indexes(row_); + if (!row->old_datum) { + ovsdb_idl_row_unparse(row); ++ ovsdb_idl_destroy_all_map_op_lists(row); ++ ovsdb_idl_destroy_all_set_op_lists(row); + ovsdb_idl_row_clear_new(row); + ovs_assert(!row->prereqs); + hmap_remove(&row->table->rows, &row->hmap_node); diff --git a/lib/ovsdb-types.h b/lib/ovsdb-types.h index 9777efea33..688fe56337 100644 --- a/lib/ovsdb-types.h @@ -4710,7 +4730,7 @@ index 3fb3a4b40f..3357717ca7 100644 } } diff --git a/lib/vconn.c b/lib/vconn.c -index b556762277..e9603432d2 100644 +index b556762277..4b1c262eaa 100644 --- a/lib/vconn.c +++ b/lib/vconn.c @@ -682,7 +682,6 @@ do_send(struct vconn *vconn, struct ofpbuf *msg) @@ -4731,6 +4751,35 @@ index b556762277..e9603432d2 100644 return retval; } +@@ -1015,6 +1017,8 @@ recv_flow_stats_reply(struct vconn *vconn, ovs_be32 send_xid, + VLOG_WARN_RL(&rl, "received bad reply: %s", + ofp_to_string(reply->data, reply->size, + NULL, NULL, 1)); ++ ofpbuf_delete(reply); ++ *replyp = NULL; + return EPROTO; + } + } +@@ -1029,9 +1033,9 @@ recv_flow_stats_reply(struct vconn *vconn, ovs_be32 send_xid, + case EOF: + more = ofpmp_more(reply->header); + ofpbuf_delete(reply); ++ *replyp = NULL; + reply = NULL; + if (!more) { +- *replyp = NULL; + return EOF; + } + break; +@@ -1039,6 +1043,8 @@ recv_flow_stats_reply(struct vconn *vconn, ovs_be32 send_xid, + default: + VLOG_WARN_RL(&rl, "parse error in reply (%s)", + ofperr_to_string(retval)); ++ ofpbuf_delete(reply); ++ *replyp = NULL; + return EPROTO; + } + } diff --git a/lib/vlog.c b/lib/vlog.c index b2653142f3..38df70d927 100644 --- a/lib/vlog.c @@ -4748,7 +4797,7 @@ index b2653142f3..38df70d927 100644 /* Install new log file. */ diff --git a/ofproto/bond.c b/ofproto/bond.c -index cfdf44f854..c31869a4c7 100644 +index cfdf44f854..0858de3746 100644 --- a/ofproto/bond.c +++ b/ofproto/bond.c @@ -186,7 +186,7 @@ static struct bond_member *choose_output_member(const struct bond *, @@ -4760,6 +4809,15 @@ index cfdf44f854..c31869a4c7 100644 static bool bond_may_recirc(const struct bond *); static void bond_update_post_recirc_rules__(struct bond *, bool force) OVS_REQ_WRLOCK(rwlock); +@@ -246,7 +246,7 @@ bond_create(const struct bond_settings *s, struct ofproto_dpif *ofproto) + ovs_refcount_init(&bond->ref_cnt); + hmap_init(&bond->pr_rule_ops); + +- bond->active_member_mac = eth_addr_zero; ++ bond->active_member_mac = s->active_member_mac; + bond->active_member_changed = false; + bond->primary = NULL; + @@ -299,7 +299,10 @@ bond_unref(struct bond *bond) } free(bond->hash); @@ -4967,18 +5025,29 @@ index f579a5ca46..f023b10cdf 100644 /* A node within a next_ct_states list. */ diff --git a/ofproto/ofproto-dpif-upcall.c b/ofproto/ofproto-dpif-upcall.c -index 04b583f816..7d324e7e0a 100644 +index 04b583f816..f78f3331c8 100644 --- a/ofproto/ofproto-dpif-upcall.c +++ b/ofproto/ofproto-dpif-upcall.c -@@ -58,6 +58,7 @@ COVERAGE_DEFINE(handler_duplicate_upcall); +@@ -56,8 +56,10 @@ COVERAGE_DEFINE(dumped_duplicate_flow); + COVERAGE_DEFINE(dumped_new_flow); + COVERAGE_DEFINE(handler_duplicate_upcall); COVERAGE_DEFINE(revalidate_missed_dp_flow); ++COVERAGE_DEFINE(revalidate_missing_dp_flow); COVERAGE_DEFINE(ukey_dp_change); COVERAGE_DEFINE(ukey_invalid_stat_reset); +COVERAGE_DEFINE(ukey_replace_contention); COVERAGE_DEFINE(upcall_flow_limit_hit); COVERAGE_DEFINE(upcall_flow_limit_kill); COVERAGE_DEFINE(upcall_ukey_contention); -@@ -988,7 +989,7 @@ udpif_revalidator(void *arg) +@@ -296,6 +298,7 @@ struct udpif_key { + uint64_t dump_seq OVS_GUARDED; /* Tracks udpif->dump_seq. */ + uint64_t reval_seq OVS_GUARDED; /* Tracks udpif->reval_seq. */ + enum ukey_state state OVS_GUARDED; /* Tracks ukey lifetime. */ ++ uint32_t missed_dumps OVS_GUARDED; /* Missed consecutive dumps. */ + + /* 'state' debug information. */ + unsigned int state_thread OVS_GUARDED; /* Thread that transitions. */ +@@ -988,7 +991,7 @@ udpif_revalidator(void *arg) udpif->reval_exit = latch_is_set(&udpif->exit_latch); start_time = time_msec(); @@ -4987,7 +5056,7 @@ index 04b583f816..7d324e7e0a 100644 bool terse_dump; terse_dump = udpif_use_ufid(udpif); -@@ -998,10 +999,15 @@ udpif_revalidator(void *arg) +@@ -998,10 +1001,15 @@ udpif_revalidator(void *arg) } } @@ -5004,7 +5073,7 @@ index 04b583f816..7d324e7e0a 100644 } if (udpif->reval_exit) { -@@ -1415,8 +1421,6 @@ upcall_cb(const struct dp_packet *packet, const struct flow *flow, ovs_u128 *ufi +@@ -1415,8 +1423,6 @@ upcall_cb(const struct dp_packet *packet, const struct flow *flow, ovs_u128 *ufi } if (upcall.ukey && !ukey_install(udpif, upcall.ukey)) { @@ -5013,7 +5082,7 @@ index 04b583f816..7d324e7e0a 100644 error = ENOSPC; } out: -@@ -1914,15 +1918,15 @@ try_ukey_replace(struct umap *umap, struct udpif_key *old_ukey, +@@ -1914,15 +1920,15 @@ try_ukey_replace(struct umap *umap, struct udpif_key *old_ukey, transition_ukey(old_ukey, UKEY_DELETED); transition_ukey(new_ukey, UKEY_VISIBLE); replaced = true; @@ -5034,7 +5103,7 @@ index 04b583f816..7d324e7e0a 100644 return replaced; } -@@ -2941,6 +2945,7 @@ revalidator_sweep__(struct revalidator *revalidator, bool purge) +@@ -2941,6 +2947,7 @@ revalidator_sweep__(struct revalidator *revalidator, bool purge) /* Handler threads could be holding a ukey lock while it installs a * new flow, so don't hang around waiting for access to it. */ if (ovs_mutex_trylock(&ukey->mutex)) { @@ -5042,7 +5111,28 @@ index 04b583f816..7d324e7e0a 100644 continue; } ukey_state = ukey->state; -@@ -3195,11 +3200,19 @@ upcall_unixctl_purge(struct unixctl_conn *conn, int argc OVS_UNUSED, +@@ -2962,6 +2969,20 @@ revalidator_sweep__(struct revalidator *revalidator, bool purge) + result = revalidate_ukey(udpif, ukey, &stats, &odp_actions, + reval_seq, &recircs); + } ++ ++ if (ukey->dump_seq != dump_seq) { ++ ukey->missed_dumps++; ++ if (ukey->missed_dumps >= 4) { ++ /* If the flow was not dumped for 4 revalidator rounds, ++ * we can assume the datapath flow no longer exists ++ * and the ukey should be deleted. */ ++ COVERAGE_INC(revalidate_missing_dp_flow); ++ result = UKEY_DELETE; ++ } ++ } else { ++ ukey->missed_dumps = 0; ++ } ++ + if (result != UKEY_KEEP) { + /* Clears 'recircs' if filled by revalidate_ukey(). */ + reval_op_init(&ops[n_ops++], result, udpif, ukey, &recircs, +@@ -3195,11 +3216,19 @@ upcall_unixctl_purge(struct unixctl_conn *conn, int argc OVS_UNUSED, struct udpif *udpif; LIST_FOR_EACH (udpif, list_node, &all_udpifs) { @@ -7766,7 +7856,7 @@ index 14aa554169..6a07e23c64 100644 + AT_CLEANUP diff --git a/tests/ofproto-dpif.at b/tests/ofproto-dpif.at -index f242f77f31..9edb743792 100644 +index f242f77f31..2bf568d7e3 100644 --- a/tests/ofproto-dpif.at +++ b/tests/ofproto-dpif.at @@ -547,6 +547,23 @@ ovs-appctl time/warp 1000 100 @@ -7793,7 +7883,81 @@ index f242f77f31..9edb743792 100644 OVS_VSWITCHD_STOP() AT_CLEANUP -@@ -930,6 +947,28 @@ AT_CHECK([tail -1 stdout], [0], +@@ -740,6 +757,73 @@ Datapath actions: drop + OVS_VSWITCHD_STOP() + AT_CLEANUP + ++AT_SETUP([ofproto-dpif - active bond member survives restart]) ++dnl Create bond0 with members p1, p2 and p3. Initially, set p2 as active. ++dnl Restart ovs-vswitchd. Check that p2 is still active. ++OVS_VSWITCHD_START( ++ [add-bond br0 bond0 p1 p2 p3 bond_mode=active-backup -- \ ++ set interface p1 type=dummy ofport_request=1 -- \ ++ set interface p2 type=dummy ofport_request=2 -- \ ++ set interface p3 type=dummy ofport_request=3 --]) ++AT_CHECK([ovs-appctl bond/set-active-member bond0 p2], [0], [ignore]) ++OVS_WAIT_UNTIL_EQUAL([ovs-appctl bond/show | STRIP_RECIRC_ID | STRIP_ACTIVE_MEMBER_MAC], [dnl ++---- bond0 ---- ++bond_mode: active-backup ++bond may use recirculation: no, ++bond-hash-basis: 0 ++lb_output action: disabled, bond-id: -1 ++updelay: 0 ms ++downdelay: 0 ms ++lacp_status: off ++lacp_fallback_ab: false ++active-backup primary: ++ ++ ++member p1: enabled ++ may_enable: true ++ ++member p2: enabled ++ active member ++ may_enable: true ++ ++member p3: enabled ++ may_enable: true ++]) ++ ++dnl Restart ovs-vswitchd with an empty ovs-vswitchd log file. ++OVS_APP_EXIT_AND_WAIT([ovs-vswitchd]) ++mv ovs-vswitchd.log ovs-vswitchd_1.log ++AT_CHECK([ovs-vswitchd --enable-dummy --disable-system --disable-system-route --detach \ ++ --no-chdir --pidfile --log-file -vfile:rconn:dbg -vvconn -vofproto_dpif -vunixctl], ++ [0], [], [stderr]) ++ ++OVS_WAIT_UNTIL_EQUAL([ovs-appctl bond/show | STRIP_RECIRC_ID | STRIP_ACTIVE_MEMBER_MAC], [dnl ++---- bond0 ---- ++bond_mode: active-backup ++bond may use recirculation: no, ++bond-hash-basis: 0 ++lb_output action: disabled, bond-id: -1 ++updelay: 0 ms ++downdelay: 0 ms ++lacp_status: off ++lacp_fallback_ab: false ++active-backup primary: ++ ++ ++member p1: enabled ++ may_enable: true ++ ++member p2: enabled ++ active member ++ may_enable: true ++ ++member p3: enabled ++ may_enable: true ++]) ++ ++OVS_VSWITCHD_STOP ++AT_CLEANUP ++ + AT_SETUP([bond - allow duplicated frames]) + dnl Receiving of duplicated multicast frames should be allowed with 'all_members_active'. + OVS_VSWITCHD_START([dnl +@@ -930,6 +1014,28 @@ AT_CHECK([tail -1 stdout], [0], OVS_VSWITCHD_STOP AT_CLEANUP @@ -7822,7 +7986,7 @@ index f242f77f31..9edb743792 100644 AT_SETUP([ofproto-dpif - group actions have no effect afterwards]) OVS_VSWITCHD_START add_of_ports br0 1 10 -@@ -5854,6 +5893,40 @@ OVS_WAIT_UNTIL([check_flows], [ovs-ofctl dump-flows br0]) +@@ -5854,6 +5960,40 @@ OVS_WAIT_UNTIL([check_flows], [ovs-ofctl dump-flows br0]) OVS_VSWITCHD_STOP AT_CLEANUP @@ -7863,7 +8027,7 @@ index f242f77f31..9edb743792 100644 AT_SETUP([ofproto-dpif - debug_slow action]) OVS_VSWITCHD_START add_of_ports br0 1 2 3 -@@ -6144,6 +6217,57 @@ AT_CHECK([test 1 = `$PYTHON3 "$top_srcdir/utilities/ovs-pcap.in" p2-tx.pcap | wc +@@ -6144,6 +6284,57 @@ AT_CHECK([test 1 = `$PYTHON3 "$top_srcdir/utilities/ovs-pcap.in" p2-tx.pcap | wc OVS_VSWITCHD_STOP AT_CLEANUP @@ -7921,7 +8085,7 @@ index f242f77f31..9edb743792 100644 AT_SETUP([ofproto-dpif - continuation with patch port]) AT_KEYWORDS([continuations pause resume]) OVS_VSWITCHD_START( -@@ -7619,12 +7743,14 @@ dummy@ovs-dummy: hit:0 missed:0 +@@ -7619,12 +7810,14 @@ dummy@ovs-dummy: hit:0 missed:0 vm1 5/3: (dummy: ifindex=2011) ]) @@ -7939,7 +8103,7 @@ index f242f77f31..9edb743792 100644 dnl Prime ARP Cache for 1.1.2.92 AT_CHECK([ovs-appctl netdev-dummy/receive p0 'recirc_id(0),in_port(1),eth(src=f8:bc:12:44:34:b6,dst=ff:ff:ff:ff:ff:ff),eth_type(0x0806),arp(sip=1.1.2.92,tip=1.1.2.88,op=2,sha=f8:bc:12:44:34:b6,tha=00:00:00:00:00:00)']) -@@ -7635,10 +7761,13 @@ ovs-vsctl \ +@@ -7635,10 +7828,13 @@ ovs-vsctl \ --id=@sf create sflow targets=\"127.0.0.1:$SFLOW_PORT\" agent=127.0.0.1 \ header=128 sampling=1 polling=0 @@ -7955,8 +8119,57 @@ index f242f77f31..9edb743792 100644 ]) dnl add rule for int-br to force packet onto tunnel. There is no ifindex +@@ -12007,3 +12203,48 @@ AT_CHECK([test 1 = `ovs-ofctl parse-pcap p2-tx.pcap | wc -l`]) + + OVS_VSWITCHD_STOP + AT_CLEANUP ++ ++AT_SETUP([ofproto-dpif - Cleanup missing datapath flows]) ++ ++OVS_VSWITCHD_START ++add_of_ports br0 1 2 ++ ++m4_define([ICMP_PKT], [m4_join([,], ++ [eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800)], ++ [ipv4(src=10.10.10.2,dst=10.10.10.1,proto=1,tos=1,ttl=128,frag=no)], ++ [icmp(type=8,code=0)])]) ++ ++AT_CHECK([ovs-ofctl del-flows br0]) ++AT_CHECK([ovs-ofctl add-flow br0 'actions=normal' ]) ++ ++AT_CHECK([ovs-appctl netdev-dummy/receive p1 'ICMP_PKT']) ++ ++AT_CHECK([ovs-appctl dpctl/dump-flows --names | strip_used | strip_stats | dnl ++ strip_duration | strip_dp_hash | sort], [0], [dnl ++flow-dump from the main thread: ++recirc_id(0),in_port(p1),packet_type(ns=0,id=0),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(frag=no), packets:0, bytes:0, used:never, actions:br0,p2 ++]) ++ ++dnl Make sure the ukey exists. ++AT_CHECK([ovs-appctl upcall/show | grep '(keys' | awk '{print $3}' | \ ++ grep -q '1)'], [0]) ++ ++dnl Delete all datapath flows, and make sure they are gone. ++AT_CHECK([ovs-appctl dpctl/del-flows]) ++AT_CHECK([ovs-appctl dpctl/dump-flows --names ], [0], []) ++ ++dnl Move forward in time and make sure we have at least 4 * 500ms. ++AT_CHECK([ovs-appctl time/warp 3000 300], [0], [ignore]) ++ ++dnl Make sure no more ukeys exists. ++AT_CHECK([ovs-appctl upcall/show | grep '(keys' | awk '{print $3}' | \ ++ grep -qv '0)'], [1]) ++ ++dnl Verify coverage counter was hit. ++AT_CHECK([ovs-appctl coverage/read-counter revalidate_missing_dp_flow], [0], ++ [dnl ++1 ++]) ++ ++OVS_VSWITCHD_STOP(["/failed to flow_del (No such file or directory)/d"]) ++AT_CLEANUP diff --git a/tests/ofproto-macros.at b/tests/ofproto-macros.at -index d2e6ac768b..6213e6d91c 100644 +index d2e6ac768b..e295f882bd 100644 --- a/tests/ofproto-macros.at +++ b/tests/ofproto-macros.at @@ -141,6 +141,21 @@ strip_stats () { @@ -7981,6 +8194,18 @@ index d2e6ac768b..6213e6d91c 100644 # Changes all 'recirc(...)' and 'recirc=...' to say 'recirc()' and # 'recirc=' respectively. This should make output easier to # compare. +@@ -149,6 +164,11 @@ strip_recirc() { + s/recirc_id=[[x0-9]]*/recirc_id=/ + s/recirc([[x0-9]]*)/recirc()/' + } ++ ++# Strips dp_hash from output. ++strip_dp_hash() { ++ sed 's/dp_hash([[0-9a-fx/]]*),//' ++} + m4_divert_pop([PREPARE_TESTS]) + + m4_define([TESTABLE_LOG], [-vPATTERN:ANY:'%c|%p|%m']) diff --git a/tests/ofproto.at b/tests/ofproto.at index 2fa8486a86..2889f81fb1 100644 --- a/tests/ofproto.at @@ -8158,7 +8383,7 @@ index 9fbf5dc897..987e05103d 100644 OVS_START_SHELL_HELPERS diff --git a/tests/ovsdb-idl.at b/tests/ovsdb-idl.at -index df5a9d2fd2..79e85d7068 100644 +index df5a9d2fd2..a914ccb7d1 100644 --- a/tests/ovsdb-idl.at +++ b/tests/ovsdb-idl.at @@ -29,8 +29,8 @@ m4_define([OVSDB_START_IDLTEST], @@ -8328,7 +8553,30 @@ index df5a9d2fd2..79e85d7068 100644 dnl This test checks that deleting both the destination and source of the dnl reference doesn't remove the reference in the source tracked record. OVSDB_CHECK_IDL_TRACK([track, simple idl, initially populated, weak references, multiple deletes], -@@ -1972,6 +2083,36 @@ OVSDB_CHECK_IDL_NOTIFY([simple idl verify notify], +@@ -1756,7 +1867,10 @@ OVSDB_CHECK_IDL_PARTIAL_UPDATE_MAP_COLUMN([map, simple2 idl-partial-update-map-c + 007: name=String2 smap=[[key2 : value2]] imap=[[3 : myids2]] + 008: After trying to delete a deleted element + 009: name=String2 smap=[[key2 : value2]] imap=[[3 : myids2]] +-010: End test ++010: After Create element, update smap and Delete element ++011: name=String2 smap=[[key2 : value2]] imap=[[3 : myids2]] ++012: After update smap and Delete element ++014: End test + ]]) + + OVSDB_CHECK_IDL_PY([partial-map idl], +@@ -1819,7 +1933,9 @@ OVSDB_CHECK_IDL_PARTIAL_UPDATE_SET_COLUMN([set, simple3 idl-partial-update-set-c + 009: table simple3: name=String2 uset=[<0>,<1>,<4>] uref=[] uuid=<2> + 010: After add to other table + set of strong ref + 011: table simple3: name=String2 uset=[<0>,<1>,<4>] uref=[<5>] uuid=<2> +-012: End test ++012: After Create element, update set and Delete element ++013: table simple3: name=String2 uset=[<0>,<1>,<4>] uref=[<5>] uuid=<2> ++014: End test + ]]) + + OVSDB_CHECK_IDL_PY([partial-set idl], +@@ -1972,6 +2088,36 @@ OVSDB_CHECK_IDL_NOTIFY([simple idl verify notify], 015: done ]]) @@ -8365,7 +8613,7 @@ index df5a9d2fd2..79e85d7068 100644 # Tests to verify the functionality of the one column compound index. # It tests index for one column string and integer indexes. # The run of test-ovsdb generates the output of the display of data using the different indexes defined in -@@ -2332,6 +2473,23 @@ CHECK_STREAM_OPEN_BLOCK([Python3], [$PYTHON3 $srcdir/test-stream.py], +@@ -2332,6 +2478,23 @@ CHECK_STREAM_OPEN_BLOCK([Python3], [$PYTHON3 $srcdir/test-stream.py], CHECK_STREAM_OPEN_BLOCK([Python3], [$PYTHON3 $srcdir/test-stream.py], [ssl6], [[[::1]]]) @@ -8389,7 +8637,7 @@ index df5a9d2fd2..79e85d7068 100644 # same as OVSDB_CHECK_IDL but uses Python IDL implementation with tcp # with multiple remotes to assert the idl connects to the leader of the Raft cluster m4_define([OVSDB_CHECK_IDL_LEADER_ONLY_PY], -@@ -2347,10 +2505,11 @@ m4_define([OVSDB_CHECK_IDL_LEADER_ONLY_PY], +@@ -2347,10 +2510,11 @@ m4_define([OVSDB_CHECK_IDL_LEADER_ONLY_PY], pids=$(cat s2.pid s3.pid s1.pid | tr '\n' ',') echo $pids AT_CHECK([$PYTHON3 $srcdir/test-ovsdb.py -t30 idl-cluster $srcdir/idltest.ovsschema $remotes $pids $3], @@ -8402,7 +8650,7 @@ index df5a9d2fd2..79e85d7068 100644 AT_CLEANUP]) OVSDB_CHECK_IDL_LEADER_ONLY_PY([Check Python IDL connects to leader], 3, ['remote']) -@@ -2393,6 +2552,7 @@ m4_define([OVSDB_CHECK_CLUSTER_IDL_C], +@@ -2393,6 +2557,7 @@ m4_define([OVSDB_CHECK_CLUSTER_IDL_C], AT_CHECK([sort stdout | uuidfilt]m4_if([$7],,, [[| $7]]), [0], [$5]) m4_ifval([$8], [AT_CHECK([grep '$8' stderr], [1])], [], []) @@ -8410,7 +8658,7 @@ index df5a9d2fd2..79e85d7068 100644 AT_CLEANUP]) # Same as OVSDB_CHECK_CLUSTER_IDL_C but uses the Python IDL implementation. -@@ -2413,6 +2573,7 @@ m4_define([OVSDB_CHECK_CLUSTER_IDL_PY], +@@ -2413,6 +2578,7 @@ m4_define([OVSDB_CHECK_CLUSTER_IDL_PY], AT_CHECK([sort stdout | uuidfilt]m4_if([$7],,, [[| $7]]), [0], [$5]) m4_if([$8], [AT_CHECK([grep '$8' stderr], [1])], [], []) @@ -8418,7 +8666,7 @@ index df5a9d2fd2..79e85d7068 100644 AT_CLEANUP]) m4_define([OVSDB_CHECK_CLUSTER_IDL], -@@ -2686,3 +2847,93 @@ OVSDB_CHECK_IDL_PERS_UUID_INSERT([simple idl, persistent uuid insert], +@@ -2686,3 +2852,93 @@ OVSDB_CHECK_IDL_PERS_UUID_INSERT([simple idl, persistent uuid insert], 011: done ]], [['This UUID would duplicate a UUID already present within the table or deleted within the same transaction']]) @@ -11469,7 +11717,7 @@ index a38bf9e6df..86a223caff 100644 for (i = 0; i < n_threads; i++) { printf(" %6" PRIu64, thread_working_ms[i]); diff --git a/tests/test-ovsdb.c b/tests/test-ovsdb.c -index c761822e62..e6d83e12da 100644 +index c761822e62..371dc7314b 100644 --- a/tests/test-ovsdb.c +++ b/tests/test-ovsdb.c @@ -2023,6 +2023,24 @@ print_idl_row_updated_link2(const struct idltest_link2 *l2, int step) @@ -11571,6 +11819,58 @@ index c761822e62..e6d83e12da 100644 } seqno = ovsdb_idl_get_seqno(idl); +@@ -2970,6 +3020,29 @@ do_idl_partial_update_map_column(struct ovs_cmdl_context *ctx) + printf("%03d: After trying to delete a deleted element\n", step++); + dump_simple2(idl, myRow, step++); + ++ myTxn = ovsdb_idl_txn_create(idl); ++ myRow = idltest_simple2_insert(myTxn); ++ idltest_simple2_update_smap_setkey(myRow, "key3", "myList3"); ++ idltest_simple2_set_name(myRow, "String2"); ++ idltest_simple2_delete(myRow); ++ ovsdb_idl_txn_commit_block(myTxn); ++ ovsdb_idl_txn_destroy(myTxn); ++ ovsdb_idl_get_initial_snapshot(idl); ++ printf("%03d: After Create element, update smap and Delete element\n", ++ step++); ++ dump_simple2(idl, myRow, step++); ++ ++ myTxn = ovsdb_idl_txn_create(idl); ++ myRow = idltest_simple2_first(idl); ++ idltest_simple2_update_smap_setkey(myRow, "key4", "myList4"); ++ idltest_simple2_set_name(myRow, "String3"); ++ idltest_simple2_delete(myRow); ++ ovsdb_idl_txn_commit_block(myTxn); ++ ovsdb_idl_txn_destroy(myTxn); ++ ovsdb_idl_get_initial_snapshot(idl); ++ printf("%03d: After update smap and Delete element\n", step++); ++ dump_simple2(idl, myRow, step++); ++ + ovsdb_idl_destroy(idl); + printf("%03d: End test\n", step); + } +@@ -3068,6 +3141,21 @@ do_idl_partial_update_set_column(struct ovs_cmdl_context *ctx) + ovsdb_idl_get_initial_snapshot(idl); + printf("%03d: After add to other table + set of strong ref\n", step++); + dump_simple3(idl, myRow, step++); ++ ++ /* create row, insert key, delete row */ ++ myTxn = ovsdb_idl_txn_create(idl); ++ myRow = idltest_simple3_insert(myTxn); ++ uuid_from_string(&uuid_to_add, "12345678-dd3f-4616-ab6a-83a490bb0991"); ++ idltest_simple3_update_uset_addvalue(myRow, uuid_to_add); ++ idltest_simple3_set_name(myRow, "String2"); ++ idltest_simple3_delete(myRow); ++ ovsdb_idl_txn_commit_block(myTxn); ++ ovsdb_idl_txn_destroy(myTxn); ++ ovsdb_idl_get_initial_snapshot(idl); ++ printf("%03d: After Create element, update set and Delete element\n", ++ step++); ++ dump_simple3(idl, myRow, step++); ++ + ovsdb_idl_destroy(idl); + printf("%03d: End test\n", step); + } diff --git a/tests/test-ovsdb.py b/tests/test-ovsdb.py index a841adba4e..67a45f044b 100644 --- a/tests/test-ovsdb.py diff --git a/SPECS/openvswitch3.2.spec b/SPECS/openvswitch3.2.spec index 7e27153..f2d703a 100644 --- a/SPECS/openvswitch3.2.spec +++ b/SPECS/openvswitch3.2.spec @@ -57,7 +57,7 @@ Summary: Open vSwitch Group: System Environment/Daemons daemon/database/utilities URL: http://www.openvswitch.org/ Version: 3.2.0 -Release: 99%{?dist} +Release: 100%{?dist} # Nearly all of openvswitch is ASL 2.0. The bugtool is LGPLv2+, and the # lib/sflow*.[ch] files are SISSL @@ -763,6 +763,16 @@ exit 0 %endif %changelog +* Mon Sep 16 2024 Open vSwitch CI - 3.2.0-100 +- Merging upstream branch-3.2 [RH git: 1fcec6e3a9] + Commit list: + 1e56776eff vconn: Always properly free flow stats reply. + bc9ee566bc mcast-snooping: Properly check group_get_lru return code. + 7959967da9 ovsdb-idl: Fix IDL memory leak. + fc2e861b97 ofproto/bond: Preserve active bond member over restarts. + 4acf9b0b71 ofproto-dpif-upcall: Avoid stale ukeys leaks. + + * Tue Aug 27 2024 Open vSwitch CI - 3.2.0-99 - Merging upstream branch-3.2 [RH git: 35c31c786b] Commit list: