From 83a064d5db74dccb55f9ec8c9725b0d981e1db60 Mon Sep 17 00:00:00 2001 From: Open vSwitch CI Date: Nov 30 2024 02:30:10 +0000 Subject: Import openvswitch2.17-2.17.0-193 from Fast DataPath --- diff --git a/SOURCES/openvswitch-2.17.0.patch b/SOURCES/openvswitch-2.17.0.patch index 8b7b58e..c66080e 100644 --- a/SOURCES/openvswitch-2.17.0.patch +++ b/SOURCES/openvswitch-2.17.0.patch @@ -115460,7 +115460,7 @@ index 47115a7b85..ba5d179a65 100644 /* Transactions with named-uuid row names. */ struct json *ovsdb_datum_to_json_with_row_names(const struct ovsdb_datum *, diff --git a/lib/ovsdb-idl.c b/lib/ovsdb-idl.c -index c19128d55c..ca0b1c3635 100644 +index c19128d55c..31fabe2fbc 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 *); @@ -115502,7 +115502,18 @@ index c19128d55c..ca0b1c3635 100644 ovs_list_remove(&arc->src_node); ovs_list_remove(&arc->dst_node); free(arc); -@@ -1041,8 +1042,8 @@ ovsdb_idl_condition_destroy(struct ovsdb_idl_condition *cond) +@@ -708,7 +709,9 @@ ovsdb_idl_check_consistency(const struct ovsdb_idl *idl) + size_t n_columns = shash_count(&row->table->columns); + for (size_t j = 0; j < n_columns; j++) { + const struct ovsdb_type *type = &class->columns[j].type; +- const struct ovsdb_datum *datum = &row->new_datum[j]; ++ const struct ovsdb_datum *datum; ++ ++ datum = ovsdb_idl_read(row, &class->columns[j]); + add_row_references(&type->key, + datum->keys, datum->n, &row->uuid, + &dsts, &n_dsts, &allocated_dsts); +@@ -1041,8 +1044,8 @@ ovsdb_idl_condition_destroy(struct ovsdb_idl_condition *cond) void ovsdb_idl_condition_clear(struct ovsdb_idl_condition *cond) { @@ -115513,7 +115524,7 @@ index c19128d55c..ca0b1c3635 100644 hmap_remove(&cond->clauses, &clause->hmap_node); ovsdb_idl_clause_destroy(clause); } -@@ -1345,14 +1346,15 @@ ovsdb_idl_track_clear__(struct ovsdb_idl *idl, bool flush_all) +@@ -1345,14 +1348,15 @@ ovsdb_idl_track_clear__(struct ovsdb_idl *idl, bool flush_all) struct ovsdb_idl_table *table = &idl->tables[i]; if (!ovs_list_is_empty(&table->track_list)) { @@ -115531,7 +115542,7 @@ index c19128d55c..ca0b1c3635 100644 if (ovsdb_idl_row_is_orphan(row)) { ovsdb_idl_row_unparse(row); -@@ -1480,9 +1482,9 @@ ovsdb_idl_parse_update(struct ovsdb_idl *idl, +@@ -1480,9 +1484,9 @@ ovsdb_idl_parse_update(struct ovsdb_idl *idl, static void ovsdb_idl_reparse_deleted(struct ovsdb_idl *db) { @@ -115543,7 +115554,7 @@ index c19128d55c..ca0b1c3635 100644 ovsdb_idl_row_untrack_change(row); add_tracked_change_for_references(row); ovsdb_idl_row_reparse_backrefs(row); -@@ -1572,6 +1574,7 @@ ovsdb_idl_process_update(struct ovsdb_idl_table *table, +@@ -1572,6 +1576,7 @@ ovsdb_idl_process_update(struct ovsdb_idl_table *table, ru->columns); } else if (ovsdb_idl_row_is_orphan(row)) { ovsdb_idl_row_untrack_change(row); @@ -115551,7 +115562,7 @@ index c19128d55c..ca0b1c3635 100644 ovsdb_idl_insert_row(row, ru->columns); } else { VLOG_ERR_RL(&semantic_rl, "cannot add existing row "UUID_FMT" to " -@@ -1906,8 +1909,8 @@ ovsdb_idl_index_create2(struct ovsdb_idl *idl, +@@ -1906,8 +1911,8 @@ ovsdb_idl_index_create2(struct ovsdb_idl *idl, static void ovsdb_idl_destroy_indexes(struct ovsdb_idl_table *table) { @@ -115562,7 +115573,7 @@ index c19128d55c..ca0b1c3635 100644 skiplist_destroy(index->skiplist, NULL); free(index->columns); free(index); -@@ -2145,12 +2148,12 @@ ovsdb_idl_row_clear_new(struct ovsdb_idl_row *row) +@@ -2145,12 +2150,12 @@ ovsdb_idl_row_clear_new(struct ovsdb_idl_row *row) static void ovsdb_idl_row_clear_arcs(struct ovsdb_idl_row *row, bool destroy_dsts) { @@ -115577,7 +115588,7 @@ index c19128d55c..ca0b1c3635 100644 ovs_list_remove(&arc->dst_node); if (destroy_dsts && ovsdb_idl_row_is_orphan(arc->dst) -@@ -2166,7 +2169,7 @@ ovsdb_idl_row_clear_arcs(struct ovsdb_idl_row *row, bool destroy_dsts) +@@ -2166,7 +2171,7 @@ ovsdb_idl_row_clear_arcs(struct ovsdb_idl_row *row, bool destroy_dsts) static void ovsdb_idl_row_reparse_backrefs(struct ovsdb_idl_row *row) { @@ -115586,7 +115597,7 @@ index c19128d55c..ca0b1c3635 100644 /* This is trickier than it looks. ovsdb_idl_row_clear_arcs() will destroy * 'arc', so we need to use the "safe" variant of list traversal. However, -@@ -2178,7 +2181,7 @@ ovsdb_idl_row_reparse_backrefs(struct ovsdb_idl_row *row) +@@ -2178,7 +2183,7 @@ ovsdb_idl_row_reparse_backrefs(struct ovsdb_idl_row *row) * (If duplicate arcs were possible then we would need to make sure that * 'next' didn't also point into 'arc''s destination, but we forbid * duplicate arcs.) */ @@ -115595,7 +115606,7 @@ index c19128d55c..ca0b1c3635 100644 struct ovsdb_idl_row *ref = arc->src; ovsdb_idl_row_unparse(ref); -@@ -2223,11 +2226,15 @@ ovsdb_idl_row_untrack_change(struct ovsdb_idl_row *row) +@@ -2223,11 +2228,15 @@ ovsdb_idl_row_untrack_change(struct ovsdb_idl_row *row) return; } @@ -115613,7 +115624,7 @@ index c19128d55c..ca0b1c3635 100644 } static struct ovsdb_idl_row * -@@ -2329,9 +2336,9 @@ ovsdb_idl_row_destroy_postprocess(struct ovsdb_idl *idl) +@@ -2329,9 +2338,9 @@ ovsdb_idl_row_destroy_postprocess(struct ovsdb_idl *idl) struct ovsdb_idl_table *table = &idl->tables[i]; if (!ovs_list_is_empty(&table->track_list)) { @@ -115625,7 +115636,7 @@ index c19128d55c..ca0b1c3635 100644 if (!ovsdb_idl_track_is_set(row->table)) { ovs_list_remove(&row->track_node); ovsdb_idl_row_unparse(row); -@@ -2367,6 +2374,10 @@ ovsdb_idl_insert_row(struct ovsdb_idl_row *row, const struct shash *data) +@@ -2367,6 +2376,10 @@ ovsdb_idl_insert_row(struct ovsdb_idl_row *row, const struct shash *data) static void ovsdb_idl_delete_row(struct ovsdb_idl_row *row) { @@ -115636,7 +115647,7 @@ index c19128d55c..ca0b1c3635 100644 ovsdb_idl_remove_from_indexes(row); ovsdb_idl_row_clear_arcs(row, true); ovsdb_idl_row_destroy(row); -@@ -2729,7 +2740,7 @@ ovsdb_idl_txn_increment(struct ovsdb_idl_txn *txn, +@@ -2729,7 +2742,7 @@ ovsdb_idl_txn_increment(struct ovsdb_idl_txn *txn, void ovsdb_idl_txn_destroy(struct ovsdb_idl_txn *txn) { @@ -115645,7 +115656,7 @@ index c19128d55c..ca0b1c3635 100644 if (txn->status == TXN_INCOMPLETE) { ovsdb_cs_forget_transaction(txn->idl->cs, txn->request_id); -@@ -2739,7 +2750,7 @@ ovsdb_idl_txn_destroy(struct ovsdb_idl_txn *txn) +@@ -2739,7 +2752,7 @@ ovsdb_idl_txn_destroy(struct ovsdb_idl_txn *txn) ovsdb_idl_txn_abort(txn); ds_destroy(&txn->comment); free(txn->error); @@ -115654,7 +115665,7 @@ index c19128d55c..ca0b1c3635 100644 free(insert); } hmap_destroy(&txn->inserted_rows); -@@ -2824,7 +2835,7 @@ substitute_uuids(struct json *json, const struct ovsdb_idl_txn *txn) +@@ -2824,7 +2837,7 @@ substitute_uuids(struct json *json, const struct ovsdb_idl_txn *txn) static void ovsdb_idl_txn_disassemble(struct ovsdb_idl_txn *txn) { @@ -115663,7 +115674,7 @@ index c19128d55c..ca0b1c3635 100644 /* This must happen early. Otherwise, ovsdb_idl_row_parse() will call an * ovsdb_idl_column's 'parse' function, which will call -@@ -2832,7 +2843,7 @@ ovsdb_idl_txn_disassemble(struct ovsdb_idl_txn *txn) +@@ -2832,7 +2845,7 @@ ovsdb_idl_txn_disassemble(struct ovsdb_idl_txn *txn) * transaction and fail to update the graph. */ txn->idl->txn = NULL; @@ -115672,7 +115683,7 @@ index c19128d55c..ca0b1c3635 100644 enum { INSERTED, MODIFIED, DELETED } op = (!row->new_datum ? DELETED : !row->old_datum ? INSERTED -@@ -3691,6 +3702,8 @@ ovsdb_idl_txn_delete(const struct ovsdb_idl_row *row_) +@@ -3691,6 +3704,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); @@ -116677,6 +116688,30 @@ index 1c71df1a12..ec567603b1 100644 struct stopwatch *sw = node->data; shash_delete(&stopwatches, node); free(sw); +diff --git a/lib/stream-replay.c b/lib/stream-replay.c +index 21da5220ef..eb552a529e 100644 +--- a/lib/stream-replay.c ++++ b/lib/stream-replay.c +@@ -114,8 +114,8 @@ stream_replay_open_wfd(struct stream *s, int open_result, const char *name) + ovs_replay_unlock(); + + if (ovs_replay_write(f, NULL, -open_result, true)) { +- VLOG_ERR_RL(&rl, "%s: failed to write 'open' failure: %d", +- s->name, open_result); ++ VLOG_ERR_RL(&rl, "%s: failed to write 'open' result: %d", ++ name, open_result); + } + if (open_result) { + /* We recorded failure to open the stream. */ +@@ -343,7 +343,7 @@ pstream_replay_open_wfd(struct pstream *ps, int listen_result, + + if (ovs_replay_write(f, NULL, -listen_result, true)) { + VLOG_ERR_RL(&rl, "%s: failed to write 'listen' result: %d", +- ps->name, listen_result); ++ name, listen_result); + } + + if (listen_result) { diff --git a/lib/stream-ssl.c b/lib/stream-ssl.c index f4fe3432e7..86747e58ba 100644 --- a/lib/stream-ssl.c @@ -116740,9 +116775,27 @@ index f4fe3432e7..86747e58ba 100644 /* Returns true if SSL is at least partially configured. */ bool diff --git a/lib/stream.c b/lib/stream.c -index fcaddf10ad..71039e24f1 100644 +index fcaddf10ad..6f5821689e 100644 --- a/lib/stream.c +++ b/lib/stream.c +@@ -216,7 +216,7 @@ int + stream_open(const char *name, struct stream **streamp, uint8_t dscp) + { + const struct stream_class *class; +- struct stream *stream; ++ struct stream *stream = NULL; + char *suffix_copy; + int error; + +@@ -547,7 +547,7 @@ int + pstream_open(const char *name, struct pstream **pstreamp, uint8_t dscp) + { + const struct pstream_class *class; +- struct pstream *pstream; ++ struct pstream *pstream = NULL; + char *suffix_copy; + int error; + @@ -788,7 +788,7 @@ stream_parse_target_with_default_port(const char *target, int default_port, struct sockaddr_storage *ss) { @@ -119127,7 +119180,7 @@ index 4b04f1756f..f55d054d29 100644 /* A node within a next_ct_states list. */ diff --git a/ofproto/ofproto-dpif-upcall.c b/ofproto/ofproto-dpif-upcall.c -index 57f94df544..5c06beb16a 100644 +index 57f94df544..52336c0c87 100644 --- a/ofproto/ofproto-dpif-upcall.c +++ b/ofproto/ofproto-dpif-upcall.c @@ -47,17 +47,22 @@ @@ -119243,15 +119296,18 @@ index 57f94df544..5c06beb16a 100644 error = ENOSPC; } out: -@@ -1746,6 +1775,7 @@ ukey_create__(const struct nlattr *key, size_t key_len, +@@ -1744,8 +1773,10 @@ ukey_create__(const struct nlattr *key, size_t key_len, + ukey->state_thread = ovsthread_id_self(); + ukey->state_where = OVS_SOURCE_LOCATOR; ukey->created = ukey->flow_time = time_msec(); ++ ukey->missed_dumps = 0; memset(&ukey->stats, 0, sizeof ukey->stats); ukey->stats.used = used; + ukey->dp_layer = NULL; ukey->xcache = NULL; ukey->offloaded = false; -@@ -1868,19 +1898,20 @@ try_ukey_replace(struct umap *umap, struct udpif_key *old_ukey, +@@ -1868,19 +1899,20 @@ try_ukey_replace(struct umap *umap, struct udpif_key *old_ukey, ovs_mutex_lock(&new_ukey->mutex); cmap_replace(&umap->cmap, &old_ukey->cmap_node, &new_ukey->cmap_node, new_ukey->hash); @@ -119277,7 +119333,7 @@ index 57f94df544..5c06beb16a 100644 return replaced; } -@@ -2074,10 +2105,12 @@ ukey_delete(struct umap *umap, struct udpif_key *ukey) +@@ -2074,10 +2106,12 @@ ukey_delete(struct umap *umap, struct udpif_key *ukey) } static bool @@ -119292,7 +119348,7 @@ index 57f94df544..5c06beb16a 100644 if (!used) { /* Always revalidate the first time a flow is dumped. */ -@@ -2104,8 +2137,12 @@ should_revalidate(const struct udpif *udpif, uint64_t packets, +@@ -2104,8 +2138,12 @@ should_revalidate(const struct udpif *udpif, uint64_t packets, duration = now - used; metric = duration / packets; @@ -119307,7 +119363,7 @@ index 57f94df544..5c06beb16a 100644 return true; } return false; -@@ -2303,7 +2340,7 @@ static enum reval_result +@@ -2303,7 +2341,7 @@ static enum reval_result revalidate_ukey(struct udpif *udpif, struct udpif_key *ukey, const struct dpif_flow_stats *stats, struct ofpbuf *odp_actions, uint64_t reval_seq, @@ -119316,7 +119372,7 @@ index 57f94df544..5c06beb16a 100644 OVS_REQUIRES(ukey->mutex) { bool need_revalidate = ukey->reval_seq != reval_seq; -@@ -2321,8 +2358,15 @@ revalidate_ukey(struct udpif *udpif, struct udpif_key *ukey, +@@ -2321,8 +2359,15 @@ revalidate_ukey(struct udpif *udpif, struct udpif_key *ukey, ? stats->n_bytes - ukey->stats.n_bytes : 0); @@ -119333,7 +119389,7 @@ index 57f94df544..5c06beb16a 100644 if (!ukey->xcache) { ukey->xcache = xlate_cache_new(); } else { -@@ -2338,7 +2382,7 @@ revalidate_ukey(struct udpif *udpif, struct udpif_key *ukey, +@@ -2338,7 +2383,7 @@ revalidate_ukey(struct udpif *udpif, struct udpif_key *ukey, /* Stats for deleted flows will be attributed upon flow deletion. Skip. */ if (result != UKEY_DELETE) { @@ -119342,7 +119398,7 @@ index 57f94df544..5c06beb16a 100644 ukey->stats = *stats; ukey->reval_seq = reval_seq; } -@@ -2434,6 +2478,15 @@ push_dp_ops(struct udpif *udpif, struct ukey_op *ops, size_t n_ops) +@@ -2434,6 +2479,15 @@ push_dp_ops(struct udpif *udpif, struct ukey_op *ops, size_t n_ops) push->tcp_flags = stats->tcp_flags | op->ukey->stats.tcp_flags; push->n_packets = stats->n_packets - op->ukey->stats.n_packets; push->n_bytes = stats->n_bytes - op->ukey->stats.n_bytes; @@ -119358,7 +119414,7 @@ index 57f94df544..5c06beb16a 100644 ovs_mutex_unlock(&op->ukey->mutex); } else { push = stats; -@@ -2738,6 +2791,22 @@ revalidate(struct revalidator *revalidator) +@@ -2738,6 +2792,22 @@ revalidate(struct revalidator *revalidator) continue; } @@ -119381,7 +119437,7 @@ index 57f94df544..5c06beb16a 100644 already_dumped = ukey->dump_seq == dump_seq; if (already_dumped) { /* The flow has already been handled during this flow dump -@@ -2769,8 +2838,7 @@ revalidate(struct revalidator *revalidator) +@@ -2769,8 +2839,7 @@ revalidate(struct revalidator *revalidator) result = UKEY_DELETE; } else { result = revalidate_ukey(udpif, ukey, &stats, &odp_actions, @@ -119391,7 +119447,7 @@ index 57f94df544..5c06beb16a 100644 } ukey->dump_seq = dump_seq; -@@ -2836,6 +2904,7 @@ revalidator_sweep__(struct revalidator *revalidator, bool purge) +@@ -2836,6 +2905,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)) { @@ -119399,7 +119455,7 @@ index 57f94df544..5c06beb16a 100644 continue; } ukey_state = ukey->state; -@@ -2853,10 +2922,24 @@ revalidator_sweep__(struct revalidator *revalidator, bool purge) +@@ -2853,10 +2923,24 @@ revalidator_sweep__(struct revalidator *revalidator, bool purge) } else { struct dpif_flow_stats stats; COVERAGE_INC(revalidate_missed_dp_flow); @@ -119426,7 +119482,7 @@ index 57f94df544..5c06beb16a 100644 if (result != UKEY_KEEP) { /* Clears 'recircs' if filled by revalidate_ukey(). */ reval_op_init(&ops[n_ops++], result, udpif, ukey, &recircs, -@@ -3090,15 +3173,48 @@ upcall_unixctl_purge(struct unixctl_conn *conn, int argc OVS_UNUSED, +@@ -3090,15 +3174,48 @@ upcall_unixctl_purge(struct unixctl_conn *conn, int argc OVS_UNUSED, struct udpif *udpif; LIST_FOR_EACH (udpif, list_node, &all_udpifs) { @@ -136010,6 +136066,18 @@ index a38bf9e6df..86a223caff 100644 printf("%s: %6d", prefix, reader_elapsed); for (i = 0; i < n_threads; i++) { printf(" %6" PRIu64, thread_working_ms[i]); +diff --git a/tests/test-multipath.c b/tests/test-multipath.c +index 08d2cbaebf..4e9a3ab5c2 100644 +--- a/tests/test-multipath.c ++++ b/tests/test-multipath.c +@@ -63,6 +63,7 @@ test_multipath_main(int argc, char *argv[]) + struct flow flow; + + flow_random_hash_fields(&flow); ++ flow_wildcards_init_catchall(&wc); + + mp.max_link = n - 1; + multipath_execute(&mp, &flow, &wc); diff --git a/tests/test-ovsdb.c b/tests/test-ovsdb.c index ca4e87b811..ab3662f238 100644 --- a/tests/test-ovsdb.c @@ -138248,9 +138316,18 @@ index fc8245bfb5..c5ad24fb70 # http://stackoverflow.com/questions/10060500/bash-how-to-evaluate-ps1-ps2, # but changed quite a lot to make it more robust. diff --git a/utilities/ovs-vsctl.c b/utilities/ovs-vsctl.c -index 37cc72d401..1032089fc2 100644 +index 37cc72d401..09a5ba2579 100644 --- a/utilities/ovs-vsctl.c +++ b/utilities/ovs-vsctl.c +@@ -277,7 +277,7 @@ parse_options(int argc, char *argv[], struct shash *local_options) + ctl_add_cmd_options(&options, &n_options, &allocated_options, OPT_LOCAL); + + for (;;) { +- int idx; ++ int idx = INT_MAX; + int c; + + c = getopt_long(argc, argv, short_options, options, &idx); @@ -1100,14 +1100,14 @@ cmd_emer_reset(struct ctl_context *ctx) const struct ovsrec_bridge *br; const struct ovsrec_port *port; @@ -138808,9 +138885,18 @@ index 0c66326171..ab851c3c02 100644 diff --git a/vtep/vtep-ctl.c b/vtep/vtep-ctl.c -index ab552457d9..99c4adcd53 100644 +index ab552457d9..5a010cb508 100644 --- a/vtep/vtep-ctl.c +++ b/vtep/vtep-ctl.c +@@ -206,7 +206,7 @@ parse_options(int argc, char *argv[], struct shash *local_options) + ctl_add_cmd_options(&options, &n_options, &allocated_options, OPT_LOCAL); + + for (;;) { +- int idx; ++ int idx = INT_MAX; + int c; + + c = getopt_long(argc, argv, short_options, options, &idx); @@ -801,16 +801,16 @@ vtep_ctl_context_invalidate_cache(struct ctl_context *ctx) SHASH_FOR_EACH (node, &vtepctl_ctx->lswitches) { diff --git a/SPECS/openvswitch2.17.spec b/SPECS/openvswitch2.17.spec index b28017e..5955027 100644 --- a/SPECS/openvswitch2.17.spec +++ b/SPECS/openvswitch2.17.spec @@ -63,7 +63,7 @@ Summary: Open vSwitch Group: System Environment/Daemons daemon/database/utilities URL: http://www.openvswitch.org/ Version: 2.17.0 -Release: 192%{?dist} +Release: 193%{?dist} # Nearly all of openvswitch is ASL 2.0. The bugtool is LGPLv2+, and the # lib/sflow*.[ch] files are SISSL @@ -749,6 +749,16 @@ exit 0 %endif %changelog +* Fri Nov 29 2024 Open vSwitch CI - 2.17.0-193 +- Merging upstream branch-2.17 [RH git: 59a95d2f66] + Commit list: + 61d4bb8083 ovsdb-idl: Fix use of uninitialized datum for graph consistency check. + bc82c01d0b ofproto-dpif-upcall: Fix use of uninitialized missed dumps counter. + 9fde9e7dea ovs-vsctl, vtep-ctl: Silence memory sanitizer warning for longindex. + 3813a32264 tests: multipath: Fix use of uninitialized wildcards. + e0c18c6bde stream: replay: Fix potential NULL dereference on write failure. + + * Wed Oct 30 2024 Open vSwitch CI - 2.17.0-192 - Merging upstream branch-2.17 [RH git: 661f1ae580] Commit list: