diff --git a/SOURCES/openvswitch-2.17.0.patch b/SOURCES/openvswitch-2.17.0.patch index 739b469..864a2a4 100644 --- a/SOURCES/openvswitch-2.17.0.patch +++ b/SOURCES/openvswitch-2.17.0.patch @@ -38,7 +38,7 @@ index a7ae793bc4..29be50029b 100644 memory: 4G diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml -index eac3504e48..6c9dddbb59 100644 +index eac3504e48..6ccab8e908 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -6,7 +6,7 @@ jobs: @@ -59,6 +59,76 @@ index eac3504e48..6c9dddbb59 100644 timeout-minutes: 30 strategy: +@@ -111,7 +111,7 @@ jobs: + + steps: + - name: checkout +- uses: actions/checkout@v2 ++ uses: actions/checkout@v3 + + - name: update PATH + run: | +@@ -119,7 +119,7 @@ jobs: + echo "$HOME/.local/bin" >> $GITHUB_PATH + + - name: set up python +- uses: actions/setup-python@v2 ++ uses: actions/setup-python@v4 + with: + python-version: '3.9' + +@@ -135,7 +135,7 @@ jobs: + + - name: cache + if: matrix.dpdk != '' || matrix.dpdk_shared != '' +- uses: actions/cache@v2 ++ uses: actions/cache@v3 + env: + matrix_key: ${{ matrix.dpdk }}${{ matrix.dpdk_shared }} + ci_key: ${{ hashFiles('dpdk-ci-signature') }} +@@ -163,7 +163,7 @@ jobs: + + - name: upload deb packages + if: matrix.deb_package != '' +- uses: actions/upload-artifact@v2 ++ uses: actions/upload-artifact@v3 + with: + name: deb-packages + path: '/home/runner/work/ovs/*.deb' +@@ -182,7 +182,7 @@ jobs: + + - name: upload logs on failure + if: failure() || cancelled() +- uses: actions/upload-artifact@v2 ++ uses: actions/upload-artifact@v3 + with: + name: logs-linux-${{ join(matrix.*, '-') }} + path: logs.tgz +@@ -201,13 +201,13 @@ jobs: + + steps: + - name: checkout +- uses: actions/checkout@v2 ++ uses: actions/checkout@v3 + - name: update PATH + run: | + echo "$HOME/bin" >> $GITHUB_PATH + echo "$HOME/.local/bin" >> $GITHUB_PATH + - name: set up python +- uses: actions/setup-python@v2 ++ uses: actions/setup-python@v4 + with: + python-version: '3.9' + - name: install dependencies +@@ -218,7 +218,7 @@ jobs: + run: ./.ci/osx-build.sh + - name: upload logs on failure + if: failure() +- uses: actions/upload-artifact@v2 ++ uses: actions/upload-artifact@v3 + with: + name: logs-osx-clang---disable-ssl + path: config.log diff --git a/Documentation/faq/releases.rst b/Documentation/faq/releases.rst index af524251ff..49895c595f 100644 --- a/Documentation/faq/releases.rst @@ -52272,7 +52342,7 @@ index 507db2aea2..d452663743 100644 if (ipf_purge_list_check(ipf, ipf_list, now)) { ipf_completed_list_clean(&ipf->frag_lists, ipf_list); diff --git a/lib/json.c b/lib/json.c -index 720c73d940..042aab83b3 100644 +index 720c73d940..27a829656b 100644 --- a/lib/json.c +++ b/lib/json.c @@ -397,9 +397,9 @@ json_destroy__(struct json *json) @@ -52287,6 +52357,63 @@ index 720c73d940..042aab83b3 100644 struct json *value = node->data; json_destroy(value); +@@ -420,8 +420,8 @@ json_destroy_array(struct json_array *array) + free(array->elems); + } + +-static struct json *json_clone_object(const struct shash *object); +-static struct json *json_clone_array(const struct json_array *array); ++static struct json *json_deep_clone_object(const struct shash *object); ++static struct json *json_deep_clone_array(const struct json_array *array); + + /* Returns a deep copy of 'json'. */ + struct json * +@@ -429,10 +429,10 @@ json_deep_clone(const struct json *json) + { + switch (json->type) { + case JSON_OBJECT: +- return json_clone_object(json->object); ++ return json_deep_clone_object(json->object); + + case JSON_ARRAY: +- return json_clone_array(&json->array); ++ return json_deep_clone_array(&json->array); + + case JSON_STRING: + return json_string_create(json->string); +@@ -464,7 +464,7 @@ json_nullable_clone(const struct json *json) + } + + static struct json * +-json_clone_object(const struct shash *object) ++json_deep_clone_object(const struct shash *object) + { + struct shash_node *node; + struct json *json; +@@ -472,20 +472,20 @@ json_clone_object(const struct shash *object) + json = json_object_create(); + SHASH_FOR_EACH (node, object) { + struct json *value = node->data; +- json_object_put(json, node->name, json_clone(value)); ++ json_object_put(json, node->name, json_deep_clone(value)); + } + return json; + } + + static struct json * +-json_clone_array(const struct json_array *array) ++json_deep_clone_array(const struct json_array *array) + { + struct json **elems; + size_t i; + + elems = xmalloc(array->n * sizeof *elems); + for (i = 0; i < array->n; i++) { +- elems[i] = json_clone(array->elems[i]); ++ elems[i] = json_deep_clone(array->elems[i]); + } + return json_array_create(elems, array->n); + } diff --git a/lib/lacp.c b/lib/lacp.c index 89d711225f..3252f17ebf 100644 --- a/lib/lacp.c @@ -64582,6 +64709,170 @@ index 9259b0b3fc..e50c7c3807 100644 hmap_destroy(&hmap); } +diff --git a/tests/test-json.c b/tests/test-json.c +index 072a537252..fa51bb31c5 100644 +--- a/tests/test-json.c ++++ b/tests/test-json.c +@@ -34,8 +34,123 @@ static int pretty = 0; + * instead of exactly one object or array. */ + static int multiple = 0; + ++static void test_json_equal(const struct json *a, const struct json *b, ++ bool allow_the_same); ++ ++static void ++test_json_equal_object(const struct shash *a, const struct shash *b, ++ bool allow_the_same) ++{ ++ struct shash_node *a_node; ++ ++ ovs_assert(allow_the_same || a != b); ++ ++ if (a == b) { ++ return; ++ } ++ ++ ovs_assert(shash_count(a) == shash_count(b)); ++ ++ SHASH_FOR_EACH (a_node, a) { ++ struct shash_node *b_node = shash_find(b, a_node->name); ++ ++ ovs_assert(b_node); ++ test_json_equal(a_node->data, b_node->data, allow_the_same); ++ } ++} ++ ++static void ++test_json_equal_array(const struct json_array *a, const struct json_array *b, ++ bool allow_the_same) ++{ ++ ovs_assert(allow_the_same || a != b); ++ ++ if (a == b) { ++ return; ++ } ++ ++ ovs_assert(a->n == b->n); ++ ++ for (size_t i = 0; i < a->n; i++) { ++ test_json_equal(a->elems[i], b->elems[i], allow_the_same); ++ } ++} ++ ++static void ++test_json_equal(const struct json *a, const struct json *b, ++ bool allow_the_same) ++{ ++ ovs_assert(allow_the_same || a != b); ++ ovs_assert(a && b); ++ ++ if (a == b) { ++ ovs_assert(a->count > 1); ++ return; ++ } ++ ++ ovs_assert(a->type == b->type); ++ ++ switch (a->type) { ++ case JSON_OBJECT: ++ test_json_equal_object(a->object, b->object, allow_the_same); ++ return; ++ ++ case JSON_ARRAY: ++ test_json_equal_array(&a->array, &b->array, allow_the_same); ++ return; ++ ++ case JSON_STRING: ++ case JSON_SERIALIZED_OBJECT: ++ ovs_assert(a->string != b->string); ++ ovs_assert(!strcmp(a->string, b->string)); ++ return; ++ ++ case JSON_NULL: ++ case JSON_FALSE: ++ case JSON_TRUE: ++ return; ++ ++ case JSON_INTEGER: ++ ovs_assert(a->integer == b->integer); ++ return; ++ ++ case JSON_REAL: ++ ovs_assert(a->real == b->real); ++ return; ++ ++ case JSON_N_TYPES: ++ default: ++ OVS_NOT_REACHED(); ++ } ++} ++ ++static void ++test_json_clone(struct json *json) ++{ ++ struct json *copy, *deep_copy; ++ ++ copy = json_clone(json); ++ ++ ovs_assert(json_equal(json, copy)); ++ test_json_equal(json, copy, true); ++ ovs_assert(json->count == 2); ++ ++ json_destroy(copy); ++ ovs_assert(json->count == 1); ++ ++ deep_copy = json_deep_clone(json); ++ ++ ovs_assert(json_equal(json, deep_copy)); ++ test_json_equal(json, deep_copy, false); ++ ovs_assert(json->count == 1); ++ ovs_assert(deep_copy->count == 1); ++ ++ json_destroy(deep_copy); ++ ovs_assert(json->count == 1); ++} ++ + static bool +-print_and_free_json(struct json *json) ++print_test_and_free_json(struct json *json) + { + bool ok; + if (json->type == JSON_STRING) { +@@ -47,6 +162,7 @@ print_and_free_json(struct json *json) + free(s); + ok = true; + } ++ test_json_clone(json); + json_destroy(json); + return ok; + } +@@ -89,7 +205,7 @@ parse_multiple(FILE *stream) + + used += json_parser_feed(parser, &buffer[used], n - used); + if (used < n) { +- if (!print_and_free_json(json_parser_finish(parser))) { ++ if (!print_test_and_free_json(json_parser_finish(parser))) { + ok = false; + } + parser = NULL; +@@ -97,7 +213,7 @@ parse_multiple(FILE *stream) + } + } + if (parser) { +- if (!print_and_free_json(json_parser_finish(parser))) { ++ if (!print_test_and_free_json(json_parser_finish(parser))) { + ok = false; + } + } +@@ -150,7 +266,7 @@ test_json_main(int argc, char *argv[]) + if (multiple) { + ok = parse_multiple(stream); + } else { +- ok = print_and_free_json(json_from_stream(stream)); ++ ok = print_test_and_free_json(json_from_stream(stream)); + } + + fclose(stream); diff --git a/tests/test-list.c b/tests/test-list.c index 6f1fb059bc..ac82f2048e 100644 --- a/tests/test-list.c @@ -65265,7 +65556,7 @@ index fb2025b765..67092ecf7e 100755 awk '/^ *0x/ {if (cnt != 0) printf ","; \ cnt++;printf "{class="$1",type="$2",len="$3"}->"$4}' diff --git a/utilities/ovs-tcpdump.in b/utilities/ovs-tcpdump.in -index 82d1bedfa6..7fd26e4055 100755 +index 82d1bedfa6..e12bab8895 100755 --- a/utilities/ovs-tcpdump.in +++ b/utilities/ovs-tcpdump.in @@ -165,6 +165,9 @@ class OVSDB(object): @@ -65278,7 +65569,21 @@ index 82d1bedfa6..7fd26e4055 100755 def _get_schema(self): error, strm = Stream.open_block(Stream.open(self._db_sock)) if error: -@@ -403,7 +406,8 @@ def py_which(executable): +@@ -222,6 +225,13 @@ class OVSDB(object): + def interface_mtu(self, intf_name): + try: + intf = self._find_row_by_name('Interface', intf_name) ++ if intf is None: ++ mtu = 1500 ++ port = self._find_row_by_name('Port', intf_name) ++ for intf in port.interfaces: ++ if mtu < intf.mtu[0]: ++ mtu = intf.mtu[0] ++ return mtu + return intf.mtu[0] + except Exception: + return None +@@ -403,7 +413,8 @@ def py_which(executable): def main(): @@ -65288,7 +65593,7 @@ index 82d1bedfa6..7fd26e4055 100755 interface = None tcpdargs = [] -@@ -500,6 +504,8 @@ def main(): +@@ -500,6 +511,8 @@ def main(): pass sys.exit(1) @@ -65297,7 +65602,7 @@ index 82d1bedfa6..7fd26e4055 100755 pipes = _doexec(*([dump_cmd, '-i', mirror_interface] + tcpdargs)) try: while pipes.poll() is None: -@@ -512,6 +518,7 @@ def main(): +@@ -512,6 +525,7 @@ def main(): if pipes.poll() is None: pipes.terminate() diff --git a/SPECS/openvswitch2.17.spec b/SPECS/openvswitch2.17.spec index a042a76..c052166 100644 --- a/SPECS/openvswitch2.17.spec +++ b/SPECS/openvswitch2.17.spec @@ -57,7 +57,7 @@ Summary: Open vSwitch Group: System Environment/Daemons daemon/database/utilities URL: http://www.openvswitch.org/ Version: 2.17.0 -Release: 58%{?dist} +Release: 59%{?dist} # Nearly all of openvswitch is ASL 2.0. The bugtool is LGPLv2+, and the # lib/sflow*.[ch] files are SISSL @@ -743,6 +743,14 @@ exit 0 %endif %changelog +* Thu Oct 13 2022 Open vSwitch CI - 2.17.0-59 +- Merging upstream branch-2.17 [RH git: ff2d81a848] + Commit list: + 5e26f88b4f github: Update versions of action dependencies. + afce3662f7 ovs-tcpdump: Fix bond port unable to capture jumbo frames. + 602a41bb3b json: Fix deep copy of objects and arrays. + + * Sat Oct 08 2022 Open vSwitch CI - 2.17.0-58 - Merging upstream branch-2.17 [RH git: 52fc530642] Commit list: