From dc765b24bb97546c04dc1abcb334cc269ec9d5dc Mon Sep 17 00:00:00 2001 From: Open vSwitch CI Date: Aug 09 2024 03:08:18 +0000 Subject: Import openvswitch3.3-3.3.0-41 from Fast DataPath --- diff --git a/SOURCES/openvswitch-3.3.0.patch b/SOURCES/openvswitch-3.3.0.patch index d8bb662..ec326e5 100644 --- a/SOURCES/openvswitch-3.3.0.patch +++ b/SOURCES/openvswitch-3.3.0.patch @@ -1231,7 +1231,7 @@ index 0b9dc4278c..9b7e06e0c7 100644 if (!wc->masks.vlans[i].tci) { break; diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c -index 45f61930d4..66396d7969 100644 +index 45f61930d4..d0b14389f2 100644 --- a/lib/netdev-dpdk.c +++ b/lib/netdev-dpdk.c @@ -464,9 +464,8 @@ struct netdev_dpdk { @@ -1450,14 +1450,14 @@ index 45f61930d4..66396d7969 100644 - return false; - } + ovs_assert(l4); -+ -+ mbuf->l2_len = (char *) l3 - (char *) l2; -+ mbuf->l3_len = (char *) l4 - (char *) l3; - if (mbuf->ol_flags & (RTE_MBUF_F_TX_TUNNEL_GENEVE | - RTE_MBUF_F_TX_TUNNEL_VXLAN)) { - mbuf->tso_segsz = dev->mtu - mbuf->l2_len - mbuf->l3_len - - mbuf->l4_len - mbuf->outer_l3_len; ++ mbuf->l2_len = (char *) l3 - (char *) l2; ++ mbuf->l3_len = (char *) l4 - (char *) l3; ++ + if (mbuf->ol_flags & RTE_MBUF_F_TX_TCP_SEG) { + struct tcp_header *th = l4; + uint16_t link_tso_segsz; @@ -1553,7 +1553,54 @@ index 45f61930d4..66396d7969 100644 } while (nb_tx != nb_tx_prep) { -@@ -5965,6 +6068,7 @@ static int +@@ -4523,10 +4626,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]); +@@ -4550,10 +4654,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); +@@ -4565,7 +4673,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); +@@ -5965,6 +6077,7 @@ static int netdev_dpdk_reconfigure(struct netdev *netdev) { struct netdev_dpdk *dev = netdev_dpdk_cast(netdev); @@ -1561,7 +1608,7 @@ index 45f61930d4..66396d7969 100644 bool try_rx_steer; int err = 0; -@@ -5976,6 +6080,9 @@ netdev_dpdk_reconfigure(struct netdev *netdev) +@@ -5976,6 +6089,9 @@ netdev_dpdk_reconfigure(struct netdev *netdev) dev->requested_n_rxq += 1; } @@ -1571,7 +1618,7 @@ index 45f61930d4..66396d7969 100644 if (netdev->n_txq == dev->requested_n_txq && netdev->n_rxq == dev->requested_n_rxq && dev->rx_steer_flags == dev->requested_rx_steer_flags -@@ -5985,7 +6092,7 @@ netdev_dpdk_reconfigure(struct netdev *netdev) +@@ -5985,7 +6101,7 @@ netdev_dpdk_reconfigure(struct netdev *netdev) && dev->txq_size == dev->requested_txq_size && eth_addr_equals(dev->hwaddr, dev->requested_hwaddr) && dev->socket_id == dev->requested_socket_id @@ -1580,7 +1627,7 @@ index 45f61930d4..66396d7969 100644 /* Reconfiguration is unnecessary */ goto out; -@@ -5994,10 +6101,14 @@ netdev_dpdk_reconfigure(struct netdev *netdev) +@@ -5994,10 +6110,14 @@ netdev_dpdk_reconfigure(struct netdev *netdev) retry: dpdk_rx_steer_unconfigure(dev); @@ -3449,6 +3496,18 @@ index f463afcb3d..ac3d37ac40 100644 } else if (!strcmp(test, "transfer-leadership")) { failure_test = FT_TRANSFER_LEADERSHIP; } else if (!strcmp(test, "clear")) { +diff --git a/ovsdb/transaction.c b/ovsdb/transaction.c +index 484a88e1cc..3f374341f2 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/python/.gitignore b/python/.gitignore index 60ace6f05b..ad5486af83 100644 --- a/python/.gitignore @@ -4681,6 +4740,23 @@ index 7cf9bac170..f8ba766739 100644 options="$1" test "$options" != "${options%% -- *}" || options="$options -- " eal_options="$eal_options ${options%% -- *}" +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/tests/system-ipsec.at b/tests/system-ipsec.at index d3d27133b9..1e155fecea 100644 --- a/tests/system-ipsec.at diff --git a/SPECS/openvswitch3.3.spec b/SPECS/openvswitch3.3.spec index 32343e7..54a9339 100644 --- a/SPECS/openvswitch3.3.spec +++ b/SPECS/openvswitch3.3.spec @@ -57,7 +57,7 @@ Summary: Open vSwitch Group: System Environment/Daemons daemon/database/utilities URL: http://www.openvswitch.org/ Version: 3.3.0 -Release: 40%{?dist} +Release: 41%{?dist} # Nearly all of openvswitch is ASL 2.0. The bugtool is LGPLv2+, and the # lib/sflow*.[ch] files are SISSL @@ -769,6 +769,13 @@ exit 0 %endif %changelog +* Thu Aug 08 2024 Open vSwitch CI - 3.3.0-41 +- Merging upstream branch-3.3 [RH git: 65b2f8cd44] + Commit list: + 7428125173 netdev-dpdk: Fix race condition in mempool information dump. + e0c0302d71 ovsdb: transaction: Remove incorrect transaction abort in pre-commit. + + * Mon Jul 22 2024 Open vSwitch CI - 3.3.0-40 - Merging upstream branch-3.3 [RH git: 62b757012a] Commit list: