diff --git a/SOURCES/openvswitch-3.4.0.patch b/SOURCES/openvswitch-3.4.0.patch new file mode 100644 index 0000000..68f4117 --- /dev/null +++ b/SOURCES/openvswitch-3.4.0.patch @@ -0,0 +1,80 @@ +diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c +index 02cef6e451..7cced0f226 100644 +--- a/lib/netdev-dpdk.c ++++ b/lib/netdev-dpdk.c +@@ -4637,10 +4637,11 @@ netdev_dpdk_get_mempool_info(struct unixctl_conn *conn, + int argc, const char *argv[], + void *aux OVS_UNUSED) + { +- size_t size; +- FILE *stream; +- char *response = NULL; + struct netdev *netdev = NULL; ++ const char *error = NULL; ++ char *response = NULL; ++ FILE *stream; ++ size_t size; + + if (argc == 2) { + netdev = netdev_from_name(argv[1]); +@@ -4664,10 +4665,14 @@ netdev_dpdk_get_mempool_info(struct unixctl_conn *conn, + ovs_mutex_lock(&dev->mutex); + ovs_mutex_lock(&dpdk_mp_mutex); + +- rte_mempool_dump(stream, dev->dpdk_mp->mp); +- fprintf(stream, " count: avail (%u), in use (%u)\n", +- rte_mempool_avail_count(dev->dpdk_mp->mp), +- rte_mempool_in_use_count(dev->dpdk_mp->mp)); ++ if (dev->dpdk_mp) { ++ rte_mempool_dump(stream, dev->dpdk_mp->mp); ++ fprintf(stream, " count: avail (%u), in use (%u)\n", ++ rte_mempool_avail_count(dev->dpdk_mp->mp), ++ rte_mempool_in_use_count(dev->dpdk_mp->mp)); ++ } else { ++ error = "Not allocated"; ++ } + + ovs_mutex_unlock(&dpdk_mp_mutex); + ovs_mutex_unlock(&dev->mutex); +@@ -4679,7 +4684,11 @@ netdev_dpdk_get_mempool_info(struct unixctl_conn *conn, + + fclose(stream); + +- unixctl_command_reply(conn, response); ++ if (error) { ++ unixctl_command_reply_error(conn, error); ++ } else { ++ unixctl_command_reply(conn, response); ++ } + out: + free(response); + netdev_close(netdev); +diff --git a/ovsdb/transaction.c b/ovsdb/transaction.c +index 65eca64783..98fff1a744 100644 +--- a/ovsdb/transaction.c ++++ b/ovsdb/transaction.c +@@ -1090,7 +1090,6 @@ ovsdb_txn_precommit(struct ovsdb_txn *txn) + * was really a no-op. */ + error = for_each_txn_row(txn, determine_changes); + if (error) { +- ovsdb_txn_abort(txn); + return OVSDB_WRAP_BUG("can't happen", error); + } + if (ovs_list_is_empty(&txn->txn_tables)) { +diff --git a/tests/system-dpdk.at b/tests/system-dpdk.at +index 1c97bf7772..e79c755657 100644 +--- a/tests/system-dpdk.at ++++ b/tests/system-dpdk.at +@@ -88,6 +88,12 @@ ADD_VHOST_USER_CLIENT_PORT([br10], [dpdkvhostuserclient0], [$OVS_RUNDIR/dpdkvhos + AT_CHECK([ovs-vsctl show], [], [stdout]) + sleep 2 + ++dnl Check that no mempool was allocated. ++AT_CHECK([ovs-appctl netdev-dpdk/get-mempool-info dpdkvhostuserclient0], [2], [], [dnl ++Not allocated ++ovs-appctl: ovs-vswitchd: server returned an error ++]) ++ + dnl Clean up + AT_CHECK([ovs-vsctl del-port br10 dpdkvhostuserclient0], [], [stdout], [stderr]) + OVS_DPDK_STOP_VSWITCHD(["dnl diff --git a/SPECS/openvswitch3.4.spec b/SPECS/openvswitch3.4.spec index dd581a5..9dec2a3 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: 0.2%{?dist} +Release: 0.3%{?dist} # Nearly all of openvswitch is ASL 2.0. The bugtool is LGPLv2+, and the # lib/sflow*.[ch] files are SISSL @@ -770,6 +770,13 @@ exit 0 %endif %changelog +* Fri Aug 09 2024 Open vSwitch CI - 3.4.0-3 +- Merging upstream branch-3.4 [RH git: e6170caeec] + Commit list: + 1532c15a51 netdev-dpdk: Fix race condition in mempool information dump. + 6743a83e16 ovsdb: transaction: Remove incorrect transaction abort in pre-commit. + + * Thu Aug 08 2024 Michael Santana - 3.4.0-2 - Empty commit to allow CI to proceed [RH git: 055d8b6cc5] Signed-off-by: Michael Santana