From 8cd24ea753c4f7592988d40e65debaddc968a36c Mon Sep 17 00:00:00 2001 From: Open vSwitch CI Date: Nov 29 2024 21:59:59 +0000 Subject: Import openvswitch3.4-3.4.0-21 from Fast DataPath --- diff --git a/SOURCES/openvswitch-3.4.0.patch b/SOURCES/openvswitch-3.4.0.patch index 21643b3..dc00414 100644 --- a/SOURCES/openvswitch-3.4.0.patch +++ b/SOURCES/openvswitch-3.4.0.patch @@ -1277,6 +1277,36 @@ index f55a2cba99..c9cab970ec 100644 }; /* A flow classifier. */ +diff --git a/lib/db-ctl-base.c b/lib/db-ctl-base.c +index b3e9b92d19..de046a4ed0 100644 +--- a/lib/db-ctl-base.c ++++ b/lib/db-ctl-base.c +@@ -831,14 +831,10 @@ check_condition(const struct ovsdb_idl_table_class *table, + } else { + struct ovsdb_datum a; + ++ ovsdb_datum_init_empty(&a); + if (found) { + a.n = 1; + a.keys = &have_datum->values[idx]; +- a.values = NULL; +- } else { +- a.n = 0; +- a.keys = NULL; +- a.values = NULL; + } + + retval = evaluate_relop(&a, &b, &type, operator); +@@ -1160,8 +1156,8 @@ list_record(const struct ovsdb_idl_row *row, + + atom.uuid = row->uuid; + ++ ovsdb_datum_init_empty(&datum); + datum.keys = &atom; +- datum.values = NULL; + datum.n = 1; + + cell->json = ovsdb_datum_to_json(&datum, &ovsdb_type_uuid); diff --git a/lib/dpdk.c b/lib/dpdk.c index 940c43c070..b7516257c5 100644 --- a/lib/dpdk.c @@ -1467,11 +1497,55 @@ index 16c56608d8..529d64fe1d 100644 } else if (IP_VER(ip->ip_ihl_ver) == 6) { dp_packet_hwol_set_tx_ipv6(packet); } +diff --git a/lib/ofp-actions.c b/lib/ofp-actions.c +index fe6a17b6da..8a05f7c9c8 100644 +--- a/lib/ofp-actions.c ++++ b/lib/ofp-actions.c +@@ -3402,21 +3402,21 @@ ofpact_put_set_field(struct ofpbuf *ofpacts, const struct mf_field *field, + struct ofpact_set_field *sf = ofpact_put_SET_FIELD(ofpacts); + sf->field = field; + +- /* Fill in the value and mask if given, otherwise put zeroes so that the +- * caller may fill in the value and mask itself. */ ++ /* Fill with all zeroes to make sure the padding is initialized. */ ++ ofpbuf_put_zeros(ofpacts, total_size); ++ sf = ofpacts->header; ++ ++ /* Fill in the value and mask if given, otherwise keep the zeroes ++ * so that the caller may fill in the value and mask itself. */ + if (value) { +- ofpbuf_put_uninit(ofpacts, total_size); +- sf = ofpacts->header; + memcpy(sf->value, value, field->n_bytes); + if (mask) { + memcpy(ofpact_set_field_mask(sf), mask, field->n_bytes); + } else { + memset(ofpact_set_field_mask(sf), 0xff, field->n_bytes); + } +- } else { +- ofpbuf_put_zeros(ofpacts, total_size); +- sf = ofpacts->header; + } ++ + /* Update length. */ + ofpact_finish_SET_FIELD(ofpacts, &sf); + diff --git a/lib/ovsdb-idl.c b/lib/ovsdb-idl.c -index ba720474b6..d92df28d19 100644 +index ba720474b6..4c2a3e3aa9 100644 --- a/lib/ovsdb-idl.c +++ b/lib/ovsdb-idl.c -@@ -3783,6 +3783,8 @@ ovsdb_idl_txn_delete(const struct ovsdb_idl_row *row_) +@@ -728,7 +728,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); +@@ -3783,6 +3785,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); @@ -1480,6 +1554,64 @@ index ba720474b6..d92df28d19 100644 ovsdb_idl_row_clear_new(row); ovs_assert(!row->prereqs); hmap_remove(&row->table->rows, &row->hmap_node); +diff --git a/lib/ovsdb-types.c b/lib/ovsdb-types.c +index 197cee1c67..69f1325972 100644 +--- a/lib/ovsdb-types.c ++++ b/lib/ovsdb-types.c +@@ -145,6 +145,7 @@ ovsdb_base_type_init(struct ovsdb_base_type *base, enum ovsdb_atomic_type type) + case OVSDB_TYPE_UUID: + base->uuid.refTableName = NULL; + base->uuid.refTable = NULL; ++ base->uuid.refType = OVSDB_REF_STRONG; + break; + + case OVSDB_N_TYPES: +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.c b/lib/stream.c +index 71039e24f1..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; + diff --git a/lib/vconn.c b/lib/vconn.c index e9603432d2..4b1c262eaa 100644 --- a/lib/vconn.c @@ -1570,7 +1702,7 @@ index c31869a4c7..45a36fabb9 100644 VLOG_INFO("bond %s: active member is now %s", bond->name, member->name); diff --git a/ofproto/ofproto-dpif-upcall.c b/ofproto/ofproto-dpif-upcall.c -index 4d39bc5a71..e7d4c2b2c3 100644 +index 4d39bc5a71..bb0c55a334 100644 --- a/ofproto/ofproto-dpif-upcall.c +++ b/ofproto/ofproto-dpif-upcall.c @@ -57,6 +57,7 @@ COVERAGE_DEFINE(dumped_inconsistent_flow); @@ -1597,7 +1729,15 @@ index 4d39bc5a71..e7d4c2b2c3 100644 /* 'state' debug information. */ unsigned int state_thread OVS_GUARDED; /* Thread that transitions. */ -@@ -3040,6 +3043,21 @@ revalidator_sweep__(struct revalidator *revalidator, bool purge) +@@ -1825,6 +1828,7 @@ 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; +@@ -3040,6 +3044,21 @@ revalidator_sweep__(struct revalidator *revalidator, bool purge) result = revalidate_ukey(udpif, ukey, &stats, &odp_actions, reval_seq, &recircs, &del_reason); } @@ -3023,6 +3163,18 @@ index 202ff04922..063280bfb0 100644 done dnl Each server should have at least one connection. +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 41c1525f45..710341b655 100644 --- a/tests/test-ovsdb.c @@ -3079,6 +3231,19 @@ index 41c1525f45..710341b655 100644 ovsdb_idl_destroy(idl); printf("%03d: End test\n", step); } +diff --git a/utilities/ovs-vsctl.c b/utilities/ovs-vsctl.c +index 495be35652..edef0f18ef 100644 +--- a/utilities/ovs-vsctl.c ++++ b/utilities/ovs-vsctl.c +@@ -278,7 +278,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); diff --git a/utilities/usdt-scripts/flow_reval_monitor.py b/utilities/usdt-scripts/flow_reval_monitor.py index 28479a5650..80c9c98bdb 100755 --- a/utilities/usdt-scripts/flow_reval_monitor.py @@ -3136,6 +3301,19 @@ index 36cb4e4951..89f844bf8d 100644

+diff --git a/vtep/vtep-ctl.c b/vtep/vtep-ctl.c +index 26b8540b4a..880c95f0e3 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); diff --git a/dpdk/.github/workflows/build.yml b/dpdk/.github/workflows/build.yml index 272a6ffc7f..6b35c56da0 100644 --- a/dpdk/.github/workflows/build.yml diff --git a/SPECS/openvswitch3.4.spec b/SPECS/openvswitch3.4.spec index a288f17..a9ffadc 100644 --- a/SPECS/openvswitch3.4.spec +++ b/SPECS/openvswitch3.4.spec @@ -57,7 +57,7 @@ Summary: Open vSwitch Group: System Environment/Daemons daemon/database/utilities URL: http://www.openvswitch.org/ Version: 3.4.0 -Release: 20%{?dist} +Release: 21%{?dist} # Nearly all of openvswitch is ASL 2.0. The bugtool is LGPLv2+, and the # lib/sflow*.[ch] files are SISSL @@ -770,6 +770,19 @@ exit 0 %endif %changelog +* Fri Nov 29 2024 Open vSwitch CI - 3.4.0-21 +- Merging upstream branch-3.4 [RH git: ac163d63af] + Commit list: + 77e82fa315 ovsdb-idl: Fix use of uninitialized datum for graph consistency check. + fb1dad5be1 db-ctl-base: Fix uninitialized datum fields while checking conditions. + 9bda0df40e ovsdb-types: Fix use of uninitialized reference type. + 3ed582f4a8 ofproto-dpif-upcall: Fix use of uninitialized missed dumps counter. + fcc8c2a917 ovs-vsctl, vtep-ctl: Silence memory sanitizer warning for longindex. + 76c3deb141 tests: multipath: Fix use of uninitialized wildcards. + b359f1cf78 stream: replay: Fix potential NULL dereference on write failure. + 4d8155a5c1 ofp-actions: Fix use of uninitialized padding in set-field. + + * Fri Nov 29 2024 Open vSwitch CI - 3.4.0-20 - Merging upstream branch-3.4 [RH git: 6ad38fd5b2] Commit list: