diff --git a/SOURCES/openvswitch-2.16.0.patch b/SOURCES/openvswitch-2.16.0.patch index 68b9404..a79a205 100644 --- a/SOURCES/openvswitch-2.16.0.patch +++ b/SOURCES/openvswitch-2.16.0.patch @@ -1093,7 +1093,7 @@ index 95e52e3587..045dce8f5f 100644 bool mf_is_set(const struct mf_field *, const struct flow *); void mf_mask_field(const struct mf_field *, struct flow_wildcards *); diff --git a/include/openvswitch/util.h b/include/openvswitch/util.h -index 228b185c3a..96f600160b 100644 +index 228b185c3a..8e6c46a85f 100644 --- a/include/openvswitch/util.h +++ b/include/openvswitch/util.h @@ -145,6 +145,150 @@ OVS_NO_RETURN void ovs_assert_failure(const char *, const char *, const char *); @@ -1247,6 +1247,16 @@ index 228b185c3a..96f600160b 100644 /* Returns the number of elements in ARRAY. */ #define ARRAY_SIZE(ARRAY) __ARRAY_SIZE(ARRAY) +@@ -285,6 +429,9 @@ is_pow2(uintmax_t x) + * segfault, so it is important to be aware of correct alignment. */ + #define ALIGNED_CAST(TYPE, ATTR) ((TYPE) (void *) (ATTR)) + ++#define IS_PTR_ALIGNED(OBJ) \ ++ (!(OBJ) || (uintptr_t) (OBJ) % __alignof__(OVS_TYPEOF(OBJ)) == 0) ++ + #ifdef __cplusplus + } + #endif diff --git a/ipsec/ovs-monitor-ipsec.in b/ipsec/ovs-monitor-ipsec.in index 89a36fe17b..a8b0705d9f 100755 --- a/ipsec/ovs-monitor-ipsec.in @@ -2707,7 +2717,7 @@ index 45a96b9be2..738fb44b3c 100644 return; } diff --git a/lib/netdev-linux.c b/lib/netdev-linux.c -index 60dd138914..97bd21be4a 100644 +index 60dd138914..94c9737110 100644 --- a/lib/netdev-linux.c +++ b/lib/netdev-linux.c @@ -627,6 +627,7 @@ netdev_linux_notify_sock(void) @@ -2726,6 +2736,22 @@ index 60dd138914..97bd21be4a 100644 ovsthread_once_done(&once); } +@@ -6285,7 +6285,14 @@ get_stats_via_netlink(const struct netdev *netdev_, struct netdev_stats *stats) + if (ofpbuf_try_pull(reply, NLMSG_HDRLEN + sizeof(struct ifinfomsg))) { + const struct nlattr *a = nl_attr_find(reply, 0, IFLA_STATS64); + if (a && nl_attr_get_size(a) >= sizeof(struct rtnl_link_stats64)) { +- netdev_stats_from_rtnl_link_stats64(stats, nl_attr_get(a)); ++ const struct rtnl_link_stats64 *lstats = nl_attr_get(a); ++ struct rtnl_link_stats64 aligned_lstats; ++ ++ if (!IS_PTR_ALIGNED(lstats)) { ++ memcpy(&aligned_lstats, lstats, sizeof aligned_lstats); ++ lstats = &aligned_lstats; ++ } ++ netdev_stats_from_rtnl_link_stats64(stats, lstats); + error = 0; + } else { + a = nl_attr_find(reply, 0, IFLA_STATS); diff --git a/lib/netdev-offload-tc.c b/lib/netdev-offload-tc.c index 9845e8d3fe..e1568e38a0 100644 --- a/lib/netdev-offload-tc.c @@ -8771,6 +8797,34 @@ index 604f15c2d1..c93cb9f16c 100644 + +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/ovsdb-client.at b/tests/ovsdb-client.at +index 06b671df8c..2d14f1ac26 100644 +--- a/tests/ovsdb-client.at ++++ b/tests/ovsdb-client.at +@@ -3,6 +3,7 @@ AT_BANNER([OVSDB -- ovsdb-client commands]) + AT_SETUP([ovsdb-client get-schema-version and get-schema-cksum]) + AT_KEYWORDS([ovsdb client positive]) + ordinal_schema > schema ++on_exit 'kill `cat *.pid`' + AT_CHECK([ovsdb-tool create db schema], [0], [ignore], [ignore]) + AT_CHECK([ovsdb-server --detach --no-chdir --pidfile --remote=punix:socket db], [0], [ignore], [ignore]) + AT_CHECK([ovsdb-client get-schema-version unix:socket ordinals], [0], [5.1.3 +@@ -14,6 +15,7 @@ AT_CLEANUP + + AT_SETUP([ovsdb-client needs-conversion (no conversion needed)]) + AT_KEYWORDS([ovsdb client file positive]) ++on_exit 'kill `cat *.pid`' + ordinal_schema > schema + touch .db.~lock~ + AT_CHECK([ovsdb-tool create db schema], [0], [], [ignore]) +@@ -27,6 +29,7 @@ AT_SETUP([ovsdb-client needs-conversion (conversion needed)]) + AT_KEYWORDS([ovsdb client file positive]) + ordinal_schema > schema + touch .db.~lock~ ++on_exit 'kill `cat *.pid`' + AT_CHECK([ovsdb-tool create db schema], [0], [], [ignore]) + AT_CHECK([ovsdb-server --detach --no-chdir --pidfile --remote=punix:socket db], [0], [ignore], [ignore]) + sed 's/5\.1\.3/5.1.4/' < schema > schema2 diff --git a/tests/ovsdb-cluster.at b/tests/ovsdb-cluster.at index fc6253cfe9..ee9c7b9379 100644 --- a/tests/ovsdb-cluster.at @@ -8963,10 +9017,100 @@ index 1386f13770..91d34d0de6 100644 008: table simple: i=1 r=2 b=true s= u=<0> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<2> 009: done diff --git a/tests/ovsdb-server.at b/tests/ovsdb-server.at -index ac243d6a79..876cb836cd 100644 +index ac243d6a79..e672c13b27 100644 --- a/tests/ovsdb-server.at +++ b/tests/ovsdb-server.at -@@ -1228,6 +1228,71 @@ AT_CHECK([test $logged_updates -lt $logged_nonblock_updates]) +@@ -4,7 +4,7 @@ m4_define([OVSDB_SERVER_SHUTDOWN], + [OVS_APP_EXIT_AND_WAIT_BY_TARGET([ovsdb-server], [ovsdb-server.pid])]) + + m4_define([OVSDB_SERVER_SHUTDOWN_N], +- [cp pid$1 savepid$1 ++ [cp $1.pid savepid$1 + AT_CHECK([ovs-appctl -t "`pwd`"/unixctl$1 -e exit], [0], [ignore], [ignore]) + OVS_WAIT_WHILE([kill -0 `cat savepid$1`], [kill `cat savepid$1`])]) + +@@ -30,14 +30,13 @@ m4_define([OVSDB_CHECK_EXECUTION], + AT_KEYWORDS([ovsdb server positive unix $5]) + $2 > schema + AT_CHECK([ovsdb-tool create db schema], [0], [stdout], [ignore]) ++ on_exit 'kill `cat *.pid`' + AT_CHECK([ovsdb-server --detach --no-chdir --pidfile --remote=punix:socket db], [0], [ignore], [ignore]) + m4_foreach([txn], [$3], +- [AT_CHECK([ovsdb-client transact unix:socket 'txn'], [0], [stdout], [ignore], +- [test ! -e pid || kill `cat pid`]) ++ [AT_CHECK([ovsdb-client transact unix:socket 'txn'], [0], [stdout], [ignore]) + cat stdout >> output + ]) +- AT_CHECK([uuidfilt output], [0], [$4], [ignore], +- [test ! -e pid || kill `cat pid`]) ++ AT_CHECK([uuidfilt output], [0], [$4], [ignore]) + OVSDB_SERVER_SHUTDOWN + AT_CLEANUP]) + +@@ -88,8 +87,7 @@ AT_CHECK([uuidfilt output], [0], + [[[{"uuid":["uuid","<0>"]}] + [{"uuid":["uuid","<1>"]}] + [{"rows":[{"_uuid":["uuid","<0>"],"_version":["uuid","<2>"],"name":"zero","number":0},{"_uuid":["uuid","<1>"],"_version":["uuid","<3>"],"name":"one","number":1}]}] +-]], [], +- [test ! -e pid || kill `cat pid`]) ++]], []) + AT_CLEANUP + + AT_SETUP([truncating database log with bad transaction]) +@@ -136,8 +134,7 @@ AT_CHECK([uuidfilt output], [0], + [[[{"uuid":["uuid","<0>"]}] + [{"uuid":["uuid","<1>"]}] + [{"rows":[{"_uuid":["uuid","<0>"],"_version":["uuid","<2>"],"name":"zero","number":0},{"_uuid":["uuid","<1>"],"_version":["uuid","<3>"],"name":"one","number":1}]}] +-]], [], +- [test ! -e pid || kill `cat pid`]) ++]], []) + AT_CLEANUP + + dnl CHECK_DBS([databases]) +@@ -159,6 +156,7 @@ ordinal_schema > schema1 + constraint_schema > schema2 + AT_CHECK([ovsdb-tool create db1 schema1], [0], [ignore], [ignore]) + AT_CHECK([ovsdb-tool create db2 schema2], [0], [ignore], [ignore]) ++on_exit 'kill `cat *.pid`' + AT_CHECK([ovsdb-server --detach --no-chdir --pidfile --remote=punix:db.sock db1 db2], [0], [ignore], [ignore]) + CHECK_DBS([constraints + ordinals +@@ -166,7 +164,7 @@ ordinals + AT_CHECK( + [[ovstest test-jsonrpc request unix:db.sock get_schema [\"nonexistent\"]]], [0], + [[{"error":{"details":"get_schema request specifies unknown database nonexistent","error":"unknown database","syntax":"[\"nonexistent\"]"},"id":0,"result":null} +-]], [], [test ! -e pid || kill `cat pid`]) ++]], []) + OVSDB_SERVER_SHUTDOWN + AT_CLEANUP + +@@ -393,7 +391,7 @@ AT_CHECK( + "table": "Manager", + "uuid-name": "x", + "row": {"target": "punix:socket2"}}]']], [0], [ignore], [ignore]) +-on_exit 'kill `cat ovsdb-server.pid`' ++on_exit 'kill `cat *.pid`' + AT_CHECK([ovsdb-server --detach --no-chdir --pidfile --remote=db:mydb,Root,managers --remote=db:mydb,Root,manager_options --log-file db], [0], [ignore], [ignore]) + ovs-appctl -t ovsdb-server time/warp 6000 1000 + AT_CHECK( +@@ -686,6 +684,7 @@ ovsdb_check_online_compaction() { + ovsdb-tool create-cluster db schema unix:s1.raft + fi]) + dnl Start ovsdb-server. ++ on_exit 'kill `cat *.pid`' + AT_CHECK([ovsdb-server -vvlog:off -vconsole:off --detach --no-chdir --pidfile --remote=punix:socket --log-file db], [0]) + AT_CHECK([ovsdb_client_wait unix:socket ordinals connected]) + AT_CAPTURE_FILE([ovsdb-server.log]) +@@ -832,7 +831,7 @@ _uuid name number + <0> five 5 + <1> four 4 + <2> three 3 +-], [], [test ! -e pid || kill `cat pid`]) ++], []) + OVSDB_SERVER_SHUTDOWN + } + OVS_END_SHELL_HELPERS +@@ -1228,6 +1227,71 @@ AT_CHECK([test $logged_updates -lt $logged_nonblock_updates]) AT_CHECK_UNQUOTED([ovs-vsctl get open_vswitch . system_version], [0], [xyzzy$counter ]) @@ -9038,6 +9182,271 @@ index ac243d6a79..876cb836cd 100644 OVS_APP_EXIT_AND_WAIT([ovsdb-server]) AT_CLEANUP +@@ -1254,15 +1318,14 @@ m4_define([OVSDB_CHECK_EXECUTION], + $2 > schema + PKIDIR=$abs_top_builddir/tests + AT_CHECK([ovsdb-tool create db schema], [0], [stdout], [ignore]) ++ on_exit 'kill `cat *.pid`' + AT_CHECK([ovsdb-server --log-file --detach --no-chdir --pidfile --private-key=$PKIDIR/testpki-privkey2.pem --certificate=$PKIDIR/testpki-cert2.pem --ca-cert=$PKIDIR/testpki-cacert.pem --remote=pssl:0:127.0.0.1 db], [0], [ignore], [ignore]) + PARSE_LISTENING_PORT([ovsdb-server.log], [SSL_PORT]) + m4_foreach([txn], [$3], +- [AT_CHECK([ovsdb-client --private-key=$PKIDIR/testpki-privkey.pem --certificate=$PKIDIR/testpki-cert.pem --ca-cert=$PKIDIR/testpki-cacert.pem transact ssl:127.0.0.1:$SSL_PORT 'txn'], [0], [stdout], [ignore], +- [test ! -e pid || kill `cat pid`]) ++ [AT_CHECK([ovsdb-client --private-key=$PKIDIR/testpki-privkey.pem --certificate=$PKIDIR/testpki-cert.pem --ca-cert=$PKIDIR/testpki-cacert.pem transact ssl:127.0.0.1:$SSL_PORT 'txn'], [0], [stdout], [ignore]) + cat stdout >> output + ]) +- AT_CHECK([uuidfilt output], [0], [$4], [ignore], +- [test ! -e pid || kill `cat pid`]) ++ AT_CHECK([uuidfilt output], [0], [$4], [ignore]) + OVSDB_SERVER_SHUTDOWN + AT_CLEANUP]) + +@@ -1291,16 +1354,15 @@ m4_define([OVSDB_CHECK_EXECUTION], + AT_SKIP_IF([test $HAVE_IPV6 = no]) + $2 > schema + PKIDIR=$abs_top_builddir/tests ++ on_exit 'kill `cat *.pid`' + AT_CHECK([ovsdb-tool create db schema], [0], [stdout], [ignore]) + AT_CHECK([ovsdb-server --log-file --detach --no-chdir --pidfile --private-key=$PKIDIR/testpki-privkey2.pem --certificate=$PKIDIR/testpki-cert2.pem --ca-cert=$PKIDIR/testpki-cacert.pem --remote=pssl:0:[[::1]] db], [0], [ignore], [ignore]) + PARSE_LISTENING_PORT([ovsdb-server.log], [SSL_PORT]) + m4_foreach([txn], [$3], +- [AT_CHECK([ovsdb-client --private-key=$PKIDIR/testpki-privkey.pem --certificate=$PKIDIR/testpki-cert.pem --ca-cert=$PKIDIR/testpki-cacert.pem transact ssl:[[::1]]:$SSL_PORT 'txn'], [0], [stdout], [ignore], +- [test ! -e pid || kill `cat pid`]) ++ [AT_CHECK([ovsdb-client --private-key=$PKIDIR/testpki-privkey.pem --certificate=$PKIDIR/testpki-cert.pem --ca-cert=$PKIDIR/testpki-cacert.pem transact ssl:[[::1]]:$SSL_PORT 'txn'], [0], [stdout], [ignore]) + cat stdout >> output + ]) +- AT_CHECK([uuidfilt output], [0], [$4], [ignore], +- [test ! -e pid || kill `cat pid`]) ++ AT_CHECK([uuidfilt output], [0], [$4], [ignore]) + OVSDB_SERVER_SHUTDOWN + AT_CLEANUP]) + +@@ -1327,16 +1389,15 @@ m4_define([OVSDB_CHECK_EXECUTION], + AT_KEYWORDS([ovsdb server positive tcp $5]) + $2 > schema + PKIDIR=$abs_top_builddir/tests ++ on_exit 'kill `cat *.pid`' + AT_CHECK([ovsdb-tool create db schema], [0], [stdout], [ignore]) + AT_CHECK([ovsdb-server --log-file --detach --no-chdir --pidfile --remote=ptcp:0:127.0.0.1 db], [0], [ignore], [ignore]) + PARSE_LISTENING_PORT([ovsdb-server.log], [TCP_PORT]) + m4_foreach([txn], [$3], +- [AT_CHECK([ovsdb-client transact tcp:127.0.0.1:$TCP_PORT 'txn'], [0], [stdout], [ignore], +- [test ! -e pid || kill `cat pid`]) ++ [AT_CHECK([ovsdb-client transact tcp:127.0.0.1:$TCP_PORT 'txn'], [0], [stdout], [ignore]) + cat stdout >> output + ]) +- AT_CHECK([uuidfilt output], [0], [$4], [ignore], +- [test ! -e pid || kill `cat pid`]) ++ AT_CHECK([uuidfilt output], [0], [$4], [ignore]) + OVSDB_SERVER_SHUTDOWN + AT_CLEANUP]) + +@@ -1364,16 +1425,15 @@ m4_define([OVSDB_CHECK_EXECUTION], + AT_SKIP_IF([test $HAVE_IPV6 = no]) + $2 > schema + PKIDIR=$abs_top_builddir/tests ++ on_exit 'kill `cat *.pid`' + AT_CHECK([ovsdb-tool create db schema], [0], [stdout], [ignore]) + AT_CHECK([ovsdb-server --log-file --detach --no-chdir --pidfile --remote=ptcp:0:[[::1]] db], [0], [ignore], [ignore]) + PARSE_LISTENING_PORT([ovsdb-server.log], [TCP_PORT]) + m4_foreach([txn], [$3], +- [AT_CHECK([ovsdb-client transact tcp:[[::1]]:$TCP_PORT 'txn'], [0], [stdout], [ignore], +- [test ! -e pid || kill `cat pid`]) ++ [AT_CHECK([ovsdb-client transact tcp:[[::1]]:$TCP_PORT 'txn'], [0], [stdout], [ignore]) + cat stdout >> output + ]) +- AT_CHECK([uuidfilt output], [0], [$4], [ignore], +- [test ! -e pid || kill `cat pid`]) ++ AT_CHECK([uuidfilt output], [0], [$4], [ignore]) + OVSDB_SERVER_SHUTDOWN + AT_CLEANUP]) + +@@ -1453,9 +1513,9 @@ m4_define([OVSDB_CHECK_EXECUTION], + target=4 + $2 > schema + schema_name=`ovsdb-tool schema-name schema` ++ on_exit 'kill `cat *.pid`' + AT_CHECK([ovsdb-tool create db1 schema], [0], [stdout], [ignore]) + +- on_exit 'kill `cat *.pid`' + AT_CHECK([ovsdb-server --detach --no-chdir --log-file=ovsdb-server1.log dnl + --pidfile --remote=punix:db1.sock db1 + ], [0], [ignore], [ignore]) +@@ -1511,12 +1571,11 @@ m4_define([OVSDB_CHECK_EXECUTION], + AT_CHECK([ovsdb-tool create db1 schema], [0], [stdout], [ignore]) + AT_CHECK([ovsdb-tool create db2 schema], [0], [stdout], [ignore]) + ++ on_exit 'kill `cat *.pid`' + AT_CHECK([ovsdb-server --detach --no-chdir --log-file=ovsdb-server1.log --pidfile --remote=punix:db.sock db1], [0], [ignore], [ignore]) + i +- on_exit 'test ! -e pid || kill `cat pid`' + +- AT_CHECK([ovsdb-server --detach --no-chdir --log-file=ovsdb-server2.log --pidfile=pid2 --remote=punix:db2.sock --unixctl=unixctl2 --sync-from=unix:db.sock db2], [0], [ignore], [ignore]) +- on_exit 'test ! -e pid2 || kill `cat pid2`' ++ AT_CHECK([ovsdb-server --detach --no-chdir --log-file=ovsdb-server2.log --pidfile=2.pid --remote=punix:db2.sock --unixctl=unixctl2 --sync-from=unix:db.sock db2], [0], [ignore], [ignore]) + + m4_foreach([txn], [$3], + [AT_CHECK([ovsdb-client transact 'txn'], [0], [stdout], [ignore]) +@@ -1557,11 +1616,10 @@ m4_define([OVSDB_CHECK_REPLICATION], + AT_CHECK([ovsdb-tool create db1 schema], [0], [stdout], [ignore]) + AT_CHECK([ovsdb-tool create db2 schema], [0], [stdout], [ignore]) + ++ on_exit 'kill `cat *.pid`' + AT_CHECK([ovsdb-server --detach --no-chdir --log-file=ovsdb-server1.log --pidfile --remote=punix:db.sock db1], [0], [ignore], [ignore]) +- on_exit 'test ! -e pid || kill `cat pid`' + +- AT_CHECK([ovsdb-server --detach --no-chdir --log-file=ovsdb-server2.log --pidfile=pid2 --remote=punix:db2.sock --unixctl=unixctl2 --sync-from=unix:db.sock --sync-exclude-tables=mydb:b db2], [0], [ignore], [ignore]) +- on_exit 'test ! -e pid2 || kill `cat pid2`' ++ AT_CHECK([ovsdb-server --detach --no-chdir --log-file=ovsdb-server2.log --pidfile=2.pid --remote=punix:db2.sock --unixctl=unixctl2 --sync-from=unix:db.sock --sync-exclude-tables=mydb:b db2], [0], [ignore], [ignore]) + + m4_foreach([txn], [$3], + [AT_CHECK([ ovsdb-client transact 'txn' ], [0], [stdout], [ignore]) +@@ -1629,6 +1687,7 @@ AT_CLEANUP + + #ovsdb-server/set-sync-exclude-tables command + AT_SETUP([ovsdb-server/set-sync-exclude-tables]) ++on_exit 'kill `cat *.pid`' + AT_KEYWORDS([ovsdb server replication set-exclude-tables]) + AT_SKIP_IF([test $DIFF_SUPPORTS_NORMAL_FORMAT = no]) + +@@ -1637,12 +1696,10 @@ AT_CHECK([ovsdb-tool create db1 schema], [0], [stdout], [ignore]) + AT_CHECK([ovsdb-tool create db2 schema], [0], [stdout], [ignore]) + + AT_CHECK([ovsdb-server --detach --no-chdir --log-file=ovsdb-server1.log --pidfile --remote=punix:db.sock db1], [0], [ignore], [ignore]) +-on_exit 'test ! -e pid || kill `cat pid`' + +-AT_CHECK([ovsdb-server --detach --no-chdir --log-file=ovsdb-server2.log --pidfile=pid2 --remote=punix:db2.sock --unixctl=unixctl2 --sync-from=unix:db.sock db2], [0], [ignore], [ignore]) +-on_exit 'test ! -e pid2 || kill `cat pid2`' ++AT_CHECK([ovsdb-server --detach --no-chdir --log-file=ovsdb-server2.log --pidfile=2.pid --remote=punix:db2.sock --unixctl=unixctl2 --sync-from=unix:db.sock db2], [0], [ignore], [ignore]) + +-AT_CHECK([ovs-appctl -t "`pwd`"/unixctl2 ovsdb-server/set-sync-exclude-tables mydb:b], [0], [ignore], [ignore], [test ! -e pid || kill `cat pid`; test ! -e pid2 || kill `cat pid2`]) ++AT_CHECK([ovs-appctl -t "`pwd`"/unixctl2 ovsdb-server/set-sync-exclude-tables mydb:b], [0], [ignore], [ignore]) + + AT_CHECK([ovsdb-client transact unix:db.sock \ + '[["mydb", +@@ -1651,11 +1708,9 @@ AT_CHECK([ovsdb-client transact unix:db.sock \ + "row": {"number": 0, "name": "zero"}}, + {"op": "insert", + "table": "b", +- "row": {"number": 1, "name": "one"}}]]'], [0], [stdout], [ignore], +- [test ! -e pid || kill `cat pid`; test ! -e pid2 || kill `cat pid2`]) ++ "row": {"number": 1, "name": "one"}}]]'], [0], [stdout], [ignore]) + +-AT_CHECK([ovsdb-client dump unix:db.sock], [0], [stdout], [ignore], +- [test ! -e pid || kill `cat pid`; test ! -e pid2 || kill `cat pid2`]) ++AT_CHECK([ovsdb-client dump unix:db.sock], [0], [stdout], [ignore]) + cat stdout > dump1 + OVS_WAIT_UNTIL([ ovsdb-client dump unix:db2.sock | grep zero ]) + AT_CHECK([ovsdb-client dump unix:db2.sock], [0], [stdout], [ignore]) +@@ -1679,16 +1734,15 @@ AT_CLEANUP + + #ovsdb-server/connect-active-ovsdb-server + AT_SETUP([ovsdb-server/connect-active-server]) ++on_exit 'kill `cat *.pid`' + AT_KEYWORDS([ovsdb server replication connect-active-server]) + replication_schema > schema + AT_CHECK([ovsdb-tool create db1 schema], [0], [stdout], [ignore]) + AT_CHECK([ovsdb-tool create db2 schema], [0], [stdout], [ignore]) + + AT_CHECK([ovsdb-server --detach --no-chdir --log-file=ovsdb-server1.log --pidfile --remote=punix:db.sock db1], [0], [ignore], [ignore]) +-on_exit 'test ! -e pid || kill `cat pid`' + +-AT_CHECK([ovsdb-server --detach --no-chdir --log-file=ovsdb-server2.log --pidfile=pid2 --remote=punix:db2.sock --unixctl=unixctl2 db2], [0], [ignore], [ignore]) +-on_exit 'test ! -e pid2 || kill `cat pid2`' ++AT_CHECK([ovsdb-server --detach --no-chdir --log-file=ovsdb-server2.log --pidfile=2.pid --remote=punix:db2.sock --unixctl=unixctl2 db2], [0], [ignore], [ignore]) + + dnl Try to connect without specifying the active server. + AT_CHECK([ovs-appctl -t "`pwd`"/unixctl2 ovsdb-server/connect-active-ovsdb-server], [0], +@@ -1718,6 +1772,7 @@ AT_CLEANUP + + #ovsdb-server/disconnect-active-server command + AT_SETUP([ovsdb-server/disconnect-active-server]) ++on_exit 'kill `cat *.pid`' + AT_KEYWORDS([ovsdb server replication disconnect-active-server]) + AT_SKIP_IF([test $DIFF_SUPPORTS_NORMAL_FORMAT = no]) + +@@ -1726,10 +1781,8 @@ AT_CHECK([ovsdb-tool create db1 schema], [0], [stdout], [ignore]) + AT_CHECK([ovsdb-tool create db2 schema], [0], [stdout], [ignore]) + + AT_CHECK([ovsdb-server --detach --no-chdir --log-file=ovsdb-server1.log --pidfile --remote=punix:db.sock db1], [0], [ignore], [ignore]) +-on_exit 'test ! -e pid || kill `cat pid`' + +-AT_CHECK([ovsdb-server --detach --no-chdir --log-file=ovsdb-server2.log --pidfile=pid2 --remote=punix:db2.sock --unixctl=unixctl2 --sync-from=unix:db.sock db2], [0], [ignore], [ignore]) +-on_exit 'test ! -e pid2 || kill `cat pid2`' ++AT_CHECK([ovsdb-server --detach --no-chdir --log-file=ovsdb-server2.log --pidfile=2.pid --remote=punix:db2.sock --unixctl=unixctl2 --sync-from=unix:db.sock db2], [0], [ignore], [ignore]) + + AT_CHECK([ovsdb-client transact unix:db.sock \ + '[["mydb", +@@ -1775,7 +1828,7 @@ AT_CHECK([uuidfilt output], [0], [7,9c7,8 + --- + > _uuid name number + > ----- ---- ------ +-], [ignore], [test ! -e pid || kill `cat pid`; test ! -e pid2 || kill `cat pid2`]) ++], [ignore]) + + dnl The backup server now become active, and can accept write transactions. + AT_CHECK([ovsdb-client transact unix:db2.sock \ +@@ -1826,13 +1879,12 @@ dnl Start both 'db1' and 'db2' in backup mode. Let them backup from each + dnl other. This is not an supported operation state, but to simulate a start + dnl up condition where an HA manger can select which one to be an active + dnl server soon after. +-AT_CHECK([ovsdb-server --detach --no-chdir --log-file=ovsdb-server1.log --pidfile="`pwd`"/pid --remote=punix:db.sock --unixctl="`pwd`"/unixctl db1 --sync-from=unix:db2.sock --active ], [0], [ignore], [ignore]) +-on_exit 'test ! -e pid || kill `cat pid`' ++on_exit 'kill `cat *.pid`' ++AT_CHECK([ovsdb-server --detach --no-chdir --log-file=ovsdb-server1.log --pidfile --remote=punix:db.sock --unixctl="`pwd`"/unixctl db1 --sync-from=unix:db2.sock --active ], [0], [ignore], [ignore]) + + AT_CHECK([ovs-appctl -t "`pwd`"/unixctl ovsdb-server/connect-active-ovsdb-server]) + +-AT_CHECK([ovsdb-server --detach --no-chdir --log-file=ovsdb-server2.log --pidfile="`pwd`"/pid2 --remote=punix:db2.sock --unixctl="`pwd`"/unixctl2 --sync-from=unix:db.sock db2], [0], [ignore], [ignore]) +-on_exit 'test ! -e pid2 || kill `cat pid2`' ++AT_CHECK([ovsdb-server --detach --no-chdir --log-file=ovsdb-server2.log --pidfile=2.pid --remote=punix:db2.sock --unixctl="`pwd`"/unixctl2 --sync-from=unix:db.sock db2], [0], [ignore], [ignore]) + + dnl + dnl make sure both servers reached the replication state +@@ -1900,8 +1952,8 @@ AT_CHECK([ovsdb-tool transact db \ + "row": {"number": 9, "name": "nine"}}]]'], [0], [ignore], [ignore]) + + dnl Start 'db', then try to be a back up server of itself. +-AT_CHECK([ovsdb-server --detach --no-chdir --log-file=ovsdb-server.log --pidfile="`pwd`"/pid --remote=punix:db.sock --unixctl="`pwd`"/unixctl db --sync-from=unix:db.sock --active ], [0], [ignore], [ignore]) +-on_exit 'test ! -e pid || kill `cat pid`' ++on_exit 'kill `cat *.pid`' ++AT_CHECK([ovsdb-server --detach --no-chdir --log-file=ovsdb-server.log --pidfile --remote=punix:db.sock --unixctl="`pwd`"/unixctl db --sync-from=unix:db.sock --active ], [0], [ignore], [ignore]) + + dnl Save the current content + AT_CHECK([ovsdb-client dump unix:db.sock], [0], [stdout]) +@@ -1919,6 +1971,7 @@ AT_CHECK([diff dump1 dump2]) + AT_CLEANUP + + AT_SETUP([ovsdb-server/read-only db:ptcp connection]) ++on_exit 'kill `cat *.pid`' + AT_KEYWORDS([ovsdb server read-only]) + AT_DATA([schema], + [[{"name": "mydb", +@@ -2007,12 +2060,10 @@ AT_CHECK([ovsdb-tool transact db2 \ + "row": {"number": 10, "name": "ten"}}]]'], [0], [ignore], [ignore]) + + dnl Start both 'db1' and 'db2'. +-AT_CHECK([ovsdb-server --detach --no-chdir --log-file=ovsdb-server1.log --pidfile="`pwd`"/pid --remote=punix:db.sock --unixctl="`pwd`"/unixctl db1 --active ], [0], [ignore], [ignore]) +-on_exit 'test ! -e pid || kill `cat pid`' +- ++on_exit 'kill `cat *.pid`' ++AT_CHECK([ovsdb-server --detach --no-chdir --log-file=ovsdb-server1.log --pidfile --remote=punix:db.sock --unixctl="`pwd`"/unixctl db1 --active ], [0], [ignore], [ignore]) + +-AT_CHECK([ovsdb-server --detach --no-chdir --log-file=ovsdb-server2.log --pidfile="`pwd`"/pid2 --remote=punix:db2.sock --unixctl="`pwd`"/unixctl2 db2], [0], [ignore], [ignore]) +-on_exit 'test ! -e pid2 || kill `cat pid2`' ++AT_CHECK([ovsdb-server --detach --no-chdir --log-file=ovsdb-server2.log --pidfile=2.pid --remote=punix:db2.sock --unixctl="`pwd`"/unixctl2 db2], [0], [ignore], [ignore]) + + OVS_WAIT_UNTIL([ovs-appctl -t "`pwd`"/unixctl ovsdb-server/sync-status |grep active]) + OVS_WAIT_UNTIL([ovs-appctl -t "`pwd`"/unixctl2 ovsdb-server/sync-status |grep active]) +@@ -2112,7 +2163,7 @@ dnl Starting a dummy server only to reserve some tcp port. + AT_CHECK([cp db db.tmp]) + AT_CHECK([ovsdb-server -vfile -vvlog:off --log-file=listener.log dnl + --detach --no-chdir dnl +- --pidfile=pid2 --unixctl=unixctl2 dnl ++ --pidfile=2.pid --unixctl=unixctl2 dnl + --remote=ptcp:0:127.0.0.1 dnl + db.tmp], [0], [stdout], [stderr]) + PARSE_LISTENING_PORT([listener.log], [BAD_TCP_PORT]) diff --git a/tests/pmd.at b/tests/pmd.at index 225d4ee3a4..a7cbf9a81b 100644 --- a/tests/pmd.at @@ -10745,9 +11154,18 @@ index 3eda01d3c1..13477a6a9e 100644 } diff --git a/utilities/ovs-save b/utilities/ovs-save -index 27ce3a9aad..fb2025b765 100755 +index 27ce3a9aad..a190902f4d 100755 --- a/utilities/ovs-save +++ b/utilities/ovs-save +@@ -102,7 +102,7 @@ save_interfaces () { + get_highest_ofp_version() { + ovs-vsctl get bridge "$1" protocols | \ + sed 's/[][]//g' | sed 's/\ //g' | \ +- awk -F ',' '{ print (NF>1)? $(NF) : "OpenFlow14" }' ++ awk -F ',' '{ print (NF>0)? $(NF) : "OpenFlow14" }' + } + + save_flows () { @@ -150,7 +150,10 @@ save_flows () { ovs-ofctl -O $ofp_version dump-flows --no-names --no-stats "$bridge" | \ sed -e '/NXST_FLOW/d' \ diff --git a/SPECS/openvswitch2.16.spec b/SPECS/openvswitch2.16.spec index 0de1124..2284162 100644 --- a/SPECS/openvswitch2.16.spec +++ b/SPECS/openvswitch2.16.spec @@ -57,7 +57,7 @@ Summary: Open vSwitch Group: System Environment/Daemons daemon/database/utilities URL: http://www.openvswitch.org/ Version: 2.16.0 -Release: 75%{?dist} +Release: 76%{?dist} # Nearly all of openvswitch is ASL 2.0. The bugtool is LGPLv2+, and the # lib/sflow*.[ch] files are SISSL @@ -699,6 +699,14 @@ exit 0 %endif %changelog +* Wed May 18 2022 Open vSwitch CI - 2.16.0-76 +- Merging upstream branch-2.16 [RH git: 72426100fe] + Commit list: + 6a304c7866 tests: Properly kill ovsdb test processes. + 44dfae2991 ovs-save: Get highest ofp version error. + 63754ac391 netdev-linux: Properly access 32-bit aligned rtnl_link_stats64 structs. + + * Wed May 04 2022 Open vSwitch CI - 2.16.0-75 - Merging upstream branch-2.16 [RH git: 0c22edcd05] Commit list: