From 9983dd5edb49400f7039ed8a27b38f3721b49e64 Mon Sep 17 00:00:00 2001 From: Open vSwitch CI Date: Aug 09 2024 06:36:26 +0000 Subject: Import openvswitch2.17-2.17.0-164 from Fast DataPath --- diff --git a/SOURCES/openvswitch-2.17.0.patch b/SOURCES/openvswitch-2.17.0.patch index 878b3a5..3e91254 100644 --- a/SOURCES/openvswitch-2.17.0.patch +++ b/SOURCES/openvswitch-2.17.0.patch @@ -100242,7 +100242,7 @@ index 482400d8d1..4d57efa5ce 100644 } /* Release the RX queue. */ diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c -index b6b29c75e3..4e9aa6fd1c 100644 +index b6b29c75e3..41ab31c155 100644 --- a/lib/netdev-dpdk.c +++ b/lib/netdev-dpdk.c @@ -622,9 +622,9 @@ dpdk_mp_full(const struct rte_mempool *mp) OVS_REQUIRES(dpdk_mp_mutex) @@ -100541,12 +100541,12 @@ index b6b29c75e3..4e9aa6fd1c 100644 - __netdev_dpdk_vhost_send(netdev, qid, batch->packets, - dp_packet_batch_size(batch)); + return 0; - } ++ } + + if (OVS_UNLIKELY(!rte_spinlock_trylock(&dev->tx_q[qid].tx_lock))) { + COVERAGE_INC(vhost_tx_contention); + rte_spinlock_lock(&dev->tx_q[qid].tx_lock); -+ } + } + + cnt = netdev_dpdk_common_send(netdev, batch, &stats); + @@ -100676,18 +100676,59 @@ index b6b29c75e3..4e9aa6fd1c 100644 rte_spinlock_unlock(&dev->tx_q[qid].tx_lock); } -} -- + -static int -netdev_dpdk_eth_send(struct netdev *netdev, int qid, - struct dp_packet_batch *batch, bool concurrent_txq) -{ - struct netdev_dpdk *dev = netdev_dpdk_cast(netdev); - +- - netdev_dpdk_send__(dev, qid, batch, concurrent_txq); return 0; } -@@ -4686,11 +4632,11 @@ trtcm_policer_qos_construct(const struct smap *details, +@@ -3836,10 +3782,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]); +@@ -3863,7 +3810,11 @@ 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); ++ if (dev->dpdk_mp) { ++ rte_mempool_dump(stream, dev->dpdk_mp->mp); ++ } else { ++ error = "Not allocated"; ++ } + + ovs_mutex_unlock(&dpdk_mp_mutex); + ovs_mutex_unlock(&dev->mutex); +@@ -3875,7 +3826,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); +@@ -4686,11 +4641,11 @@ trtcm_policer_qos_construct(const struct smap *details, static void trtcm_policer_qos_destruct(struct qos_conf *conf) { @@ -112835,7 +112876,7 @@ index d15f2f1d6d..963e937957 100644 } } diff --git a/ovsdb/transaction.c b/ovsdb/transaction.c -index db86d847c3..fe33ff4835 100644 +index db86d847c3..3b4927f46d 100644 --- a/ovsdb/transaction.c +++ b/ovsdb/transaction.c @@ -159,15 +159,15 @@ ovsdb_txn_row_abort(struct ovsdb_txn *txn OVS_UNUSED, @@ -113090,7 +113131,15 @@ index db86d847c3..fe33ff4835 100644 ovsdb_datum_destroy(&removed, &column->type); if (datum->n != orig_n) { -@@ -1094,10 +1105,10 @@ static void +@@ -1003,7 +1014,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)) { +@@ -1094,10 +1104,10 @@ static void ovsdb_txn_destroy_cloned(struct ovsdb_txn *txn) { ovs_assert(!txn->db); @@ -113105,7 +113154,7 @@ index db86d847c3..fe33ff4835 100644 if (r->old) { ovsdb_row_destroy(r->old); } -@@ -1189,7 +1200,7 @@ ovsdb_txn_precheck_prereq(const struct ovsdb *db) +@@ -1189,7 +1199,7 @@ ovsdb_txn_precheck_prereq(const struct ovsdb *db) struct ovsdb_txn_progress * ovsdb_txn_propose_schema_change(struct ovsdb *db, @@ -113114,7 +113163,7 @@ index db86d847c3..fe33ff4835 100644 const struct json *data) { struct ovsdb_txn_progress *progress = xzalloc(sizeof *progress); -@@ -1549,19 +1560,19 @@ for_each_txn_row(struct ovsdb_txn *txn, +@@ -1549,19 +1559,19 @@ for_each_txn_row(struct ovsdb_txn *txn, serial++; do { @@ -113138,7 +113187,7 @@ index db86d847c3..fe33ff4835 100644 if (r->serial != serial) { struct ovsdb_error *error; -@@ -1629,8 +1640,8 @@ ovsdb_txn_history_destroy(struct ovsdb *db) +@@ -1629,8 +1639,8 @@ ovsdb_txn_history_destroy(struct ovsdb *db) return; } @@ -120773,10 +120822,23 @@ index ef0e84e939..2579098a04 100644 AT_CHECK([grep 'hugetlbfs' stdout], [], [stdout], []) diff --git a/tests/system-dpdk.at b/tests/system-dpdk.at -index c3ee6990ca..7d2715c4a7 100644 +index c3ee6990ca..d59e364fa0 100644 --- a/tests/system-dpdk.at +++ b/tests/system-dpdk.at -@@ -237,6 +237,10 @@ AT_CHECK([ovs-vsctl show], [], [stdout]) +@@ -67,6 +67,12 @@ AT_CHECK([grep "VHOST_CONFIG: vhost-user client: socket created" ovs-vswitchd.lo + AT_CHECK([grep "vHost User device 'dpdkvhostuserclient0' created in 'client' mode, using client socket" ovs-vswitchd.log], [], [stdout]) + AT_CHECK([grep "VHOST_CONFIG: $OVS_RUNDIR/dpdkvhostclient0: reconnecting..." ovs-vswitchd.log], [], [stdout]) + ++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_VSWITCHD_STOP("m4_join([], [SYSTEM_DPDK_ALLOWED_LOGS], [ +@@ -237,6 +243,10 @@ AT_CHECK([ovs-vsctl show], [], [stdout]) AT_SKIP_IF([! ovs-appctl dpif-netdev/miniflow-parser-get | sed 1,4d | grep "True"], [], [dnl ]) @@ -120787,7 +120849,7 @@ index c3ee6990ca..7d2715c4a7 100644 AT_CHECK([ovs-appctl dpif-netdev/miniflow-parser-set autovalidator], [0], [dnl Miniflow extract implementation set to autovalidator. ]) -@@ -265,6 +269,10 @@ AT_CHECK([ovs-vsctl show], [], [stdout]) +@@ -265,6 +275,10 @@ AT_CHECK([ovs-vsctl show], [], [stdout]) AT_SKIP_IF([! ovs-appctl dpif-netdev/miniflow-parser-get | sed 1,4d | grep "True"], [], [dnl ]) diff --git a/SPECS/openvswitch2.17.spec b/SPECS/openvswitch2.17.spec index 9c963bd..c39a341 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: 163%{?dist} +Release: 164%{?dist} # Nearly all of openvswitch is ASL 2.0. The bugtool is LGPLv2+, and the # lib/sflow*.[ch] files are SISSL @@ -751,6 +751,13 @@ exit 0 %endif %changelog +* Thu Aug 08 2024 Open vSwitch CI - 2.17.0-164 +- Merging upstream branch-2.17 [RH git: 5ee5dc9357] + Commit list: + 5fb3bbd361 netdev-dpdk: Fix race condition in mempool information dump. + 46a0eaad43 ovsdb: transaction: Remove incorrect transaction abort in pre-commit. + + * Fri Jul 19 2024 Open vSwitch CI - 2.17.0-163 - Merging upstream branch-2.17 [RH git: 3f4a02107e] Commit list: