From 62462e23fafaf60b8d5f28f69a3e4b9cfb031321 Mon Sep 17 00:00:00 2001 From: Open vSwitch CI Date: Aug 09 2024 01:56:32 +0000 Subject: Import openvswitch3.1-3.1.0-128 from Fast DataPath --- diff --git a/SOURCES/openvswitch-3.1.0.patch b/SOURCES/openvswitch-3.1.0.patch index a44346d..eb8a3d5 100644 --- a/SOURCES/openvswitch-3.1.0.patch +++ b/SOURCES/openvswitch-3.1.0.patch @@ -4107,7 +4107,7 @@ index a1a20366d4..ac72a44bce 100644 diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c -index ab5b8223ef..da6829553c 100644 +index ab5b8223ef..0ed92afca1 100644 --- a/lib/netdev-dpdk.c +++ b/lib/netdev-dpdk.c @@ -489,6 +489,9 @@ struct netdev_dpdk { @@ -4229,6 +4229,53 @@ index ab5b8223ef..da6829553c 100644 } else if (!eth_addr_equals(dev->requested_hwaddr, mac)) { dev->requested_hwaddr = mac; netdev_request_reconfigure(netdev); +@@ -4014,10 +4069,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]); +@@ -4041,10 +4097,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); +@@ -4056,7 +4116,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/lib/netdev-dummy.c b/lib/netdev-dummy.c index 72cb954711..1c61535068 100644 --- a/lib/netdev-dummy.c @@ -10267,7 +10314,7 @@ index 66071ce2f8..0792e1580e 100644 if (!error && (xor || !ovsdb_row_equal_columns(row, update, &columns))) { error = ovsdb_row_update_columns(ovsdb_txn_row_modify(txn, row), diff --git a/ovsdb/transaction.c b/ovsdb/transaction.c -index 03541af85d..15ef47de30 100644 +index 03541af85d..005d376ac3 100644 --- a/ovsdb/transaction.c +++ b/ovsdb/transaction.c @@ -34,6 +34,7 @@ @@ -10341,7 +10388,15 @@ index 03541af85d..15ef47de30 100644 } /* Checking added data and creating new references. */ -@@ -1251,7 +1264,7 @@ ovsdb_txn_precheck_prereq(const struct ovsdb *db) +@@ -1056,7 +1069,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)) { +@@ -1251,7 +1263,7 @@ ovsdb_txn_precheck_prereq(const struct ovsdb *db) struct ovsdb_txn_progress * ovsdb_txn_propose_schema_change(struct ovsdb *db, @@ -14018,7 +14073,7 @@ index 53fbc13206..3920f08a5e 100644 dnl Start ovs-vswitchd. AT_CHECK([ovs-vswitchd --detach --no-chdir --pidfile --log-file -vvconn -vofproto_dpif -vunixctl], [0], [stdout], [stderr]) diff --git a/tests/system-dpdk.at b/tests/system-dpdk.at -index cb6c6d5907..5ed1c7e676 100644 +index cb6c6d5907..ebc6964a6b 100644 --- a/tests/system-dpdk.at +++ b/tests/system-dpdk.at @@ -32,7 +32,7 @@ dnl Check if EAL init is successful @@ -14039,7 +14094,20 @@ index cb6c6d5907..5ed1c7e676 100644 dnl Add userspace bridge and attach it to OVS AT_CHECK([ovs-vsctl add-br br10 -- set bridge br10 datapath_type=netdev]) -@@ -98,7 +98,7 @@ AT_SETUP([OVS-DPDK - ping vhost-user ports]) +@@ -82,6 +82,12 @@ AT_CHECK([grep "VHOST_CONFIG: ($OVS_RUNDIR/dpdkvhostclient0) vhost-user client: + 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], [ +@@ -98,7 +104,7 @@ AT_SETUP([OVS-DPDK - ping vhost-user ports]) AT_KEYWORDS([dpdk]) OVS_DPDK_PRE_CHECK() AT_SKIP_IF([! which dpdk-testpmd >/dev/null 2>/dev/null]) @@ -14048,7 +14116,7 @@ index cb6c6d5907..5ed1c7e676 100644 dnl Find number of sockets AT_CHECK([lscpu], [], [stdout]) -@@ -174,7 +174,7 @@ AT_SETUP([OVS-DPDK - ping vhost-user-client ports]) +@@ -174,7 +180,7 @@ AT_SETUP([OVS-DPDK - ping vhost-user-client ports]) AT_KEYWORDS([dpdk]) OVS_DPDK_PRE_CHECK() AT_SKIP_IF([! which dpdk-testpmd >/dev/null 2>/dev/null]) @@ -14057,7 +14125,7 @@ index cb6c6d5907..5ed1c7e676 100644 dnl Find number of sockets AT_CHECK([lscpu], [], [stdout]) -@@ -309,7 +309,7 @@ AT_SETUP([OVS-DPDK - Ingress policing create delete vport port]) +@@ -309,7 +315,7 @@ AT_SETUP([OVS-DPDK - Ingress policing create delete vport port]) AT_KEYWORDS([dpdk]) OVS_DPDK_PRE_CHECK() @@ -14066,7 +14134,7 @@ index cb6c6d5907..5ed1c7e676 100644 dnl Add userspace bridge and attach it to OVS and add ingress policer AT_CHECK([ovs-vsctl add-br br10 -- set bridge br10 datapath_type=netdev]) -@@ -352,7 +352,7 @@ AT_SETUP([OVS-DPDK - Ingress policing no policing rate]) +@@ -352,7 +358,7 @@ AT_SETUP([OVS-DPDK - Ingress policing no policing rate]) AT_KEYWORDS([dpdk]) OVS_DPDK_PRE_CHECK() @@ -14075,7 +14143,7 @@ index cb6c6d5907..5ed1c7e676 100644 dnl Add userspace bridge and attach it to OVS and add ingress policer AT_CHECK([ovs-vsctl add-br br10 -- set bridge br10 datapath_type=netdev]) -@@ -393,7 +393,7 @@ AT_SETUP([OVS-DPDK - Ingress policing no policing burst]) +@@ -393,7 +399,7 @@ AT_SETUP([OVS-DPDK - Ingress policing no policing burst]) AT_KEYWORDS([dpdk]) OVS_DPDK_PRE_CHECK() @@ -14084,7 +14152,7 @@ index cb6c6d5907..5ed1c7e676 100644 dnl Add userspace bridge and attach it to OVS and add ingress policer AT_CHECK([ovs-vsctl add-br br10 -- set bridge br10 datapath_type=netdev]) -@@ -465,7 +465,7 @@ AT_SETUP([OVS-DPDK - QoS create delete vport port]) +@@ -465,7 +471,7 @@ AT_SETUP([OVS-DPDK - QoS create delete vport port]) AT_KEYWORDS([dpdk]) OVS_DPDK_PRE_CHECK() @@ -14093,7 +14161,7 @@ index cb6c6d5907..5ed1c7e676 100644 dnl Add userspace bridge and attach it to OVS and add egress policer AT_CHECK([ovs-vsctl add-br br10 -- set bridge br10 datapath_type=netdev]) -@@ -506,7 +506,7 @@ AT_SETUP([OVS-DPDK - QoS no cir]) +@@ -506,7 +512,7 @@ AT_SETUP([OVS-DPDK - QoS no cir]) AT_KEYWORDS([dpdk]) OVS_DPDK_PRE_CHECK() @@ -14102,7 +14170,7 @@ index cb6c6d5907..5ed1c7e676 100644 dnl Add userspace bridge and attach it to OVS and add egress policer AT_CHECK([ovs-vsctl add-br br10 -- set bridge br10 datapath_type=netdev]) -@@ -541,7 +541,7 @@ AT_SETUP([OVS-DPDK - QoS no cbs]) +@@ -541,7 +547,7 @@ AT_SETUP([OVS-DPDK - QoS no cbs]) AT_KEYWORDS([dpdk]) OVS_DPDK_PRE_CHECK() @@ -14111,7 +14179,7 @@ index cb6c6d5907..5ed1c7e676 100644 dnl Add userspace bridge and attach it to OVS and add egress policer AT_CHECK([ovs-vsctl add-br br10 -- set bridge br10 datapath_type=netdev]) -@@ -585,14 +585,13 @@ dnl Add userspace bridge and attach it to OVS with default MTU value +@@ -585,14 +591,13 @@ dnl Add userspace bridge and attach it to OVS with default MTU value AT_CHECK([ovs-vsctl add-br br10 -- set bridge br10 datapath_type=netdev]) AT_CHECK([ovs-vsctl add-port br10 phy0 -- set Interface phy0 type=dpdk options:dpdk-devargs=$(cat PCI_ADDR)], [], [stdout], [stderr]) AT_CHECK([ovs-vsctl show], [], [stdout]) @@ -14128,7 +14196,7 @@ index cb6c6d5907..5ed1c7e676 100644 dnl Fail if MTU is not supported AT_FAIL_IF([grep "Interface phy0 does not support MTU configuration" ovs-vswitchd.log], [], [stdout]) -@@ -600,10 +599,6 @@ AT_FAIL_IF([grep "Interface phy0 does not support MTU configuration" ovs-vswitch +@@ -600,10 +605,6 @@ AT_FAIL_IF([grep "Interface phy0 does not support MTU configuration" ovs-vswitch dnl Fail if error is encountered during MTU setup AT_FAIL_IF([grep "Interface phy0 MTU (9000) setup error" ovs-vswitchd.log], [], [stdout]) @@ -14139,7 +14207,7 @@ index cb6c6d5907..5ed1c7e676 100644 dnl Clean up AT_CHECK([ovs-vsctl del-port br10 phy0], [], [stdout], [stderr]) OVS_VSWITCHD_STOP("[SYSTEM_DPDK_ALLOWED_LOGS]") -@@ -627,7 +622,9 @@ AT_CHECK([ovs-vsctl add-br br10 -- set bridge br10 datapath_type=netdev]) +@@ -627,7 +628,9 @@ AT_CHECK([ovs-vsctl add-br br10 -- set bridge br10 datapath_type=netdev]) AT_CHECK([ovs-vsctl add-port br10 phy0 -- set Interface phy0 type=dpdk options:dpdk-devargs=$(cat PCI_ADDR)], [], [stdout], [stderr]) AT_CHECK([ovs-vsctl set Interface phy0 mtu_request=9000]) AT_CHECK([ovs-vsctl show], [], [stdout]) @@ -14150,7 +14218,7 @@ index cb6c6d5907..5ed1c7e676 100644 dnl Fail if MTU is not supported AT_FAIL_IF([grep "Interface phy0 does not support MTU configuration" ovs-vswitchd.log], [], [stdout]) -@@ -635,15 +632,9 @@ AT_FAIL_IF([grep "Interface phy0 does not support MTU configuration" ovs-vswitch +@@ -635,15 +638,9 @@ AT_FAIL_IF([grep "Interface phy0 does not support MTU configuration" ovs-vswitch dnl Fail if error is encountered during MTU setup AT_FAIL_IF([grep "Interface phy0 MTU (9000) setup error" ovs-vswitchd.log], [], [stdout]) @@ -14167,7 +14235,7 @@ index cb6c6d5907..5ed1c7e676 100644 dnl Clean up -@@ -661,7 +652,7 @@ AT_KEYWORDS([dpdk]) +@@ -661,7 +658,7 @@ AT_KEYWORDS([dpdk]) AT_SKIP_IF([! which dpdk-testpmd >/dev/null 2>/dev/null]) OVS_DPDK_PRE_CHECK() @@ -14176,7 +14244,7 @@ index cb6c6d5907..5ed1c7e676 100644 dnl Find number of sockets AT_CHECK([lscpu], [], [stdout]) -@@ -717,7 +708,7 @@ AT_KEYWORDS([dpdk]) +@@ -717,7 +714,7 @@ AT_KEYWORDS([dpdk]) AT_SKIP_IF([! which dpdk-testpmd >/dev/null 2>/dev/null]) OVS_DPDK_PRE_CHECK() @@ -14185,7 +14253,7 @@ index cb6c6d5907..5ed1c7e676 100644 dnl Find number of sockets AT_CHECK([lscpu], [], [stdout]) -@@ -856,7 +847,7 @@ AT_KEYWORDS([dpdk]) +@@ -856,7 +853,7 @@ AT_KEYWORDS([dpdk]) AT_SKIP_IF([! which dpdk-testpmd >/dev/null 2>/dev/null]) OVS_DPDK_PRE_CHECK() @@ -14194,7 +14262,7 @@ index cb6c6d5907..5ed1c7e676 100644 dnl Find number of sockets AT_CHECK([lscpu], [], [stdout]) -@@ -908,7 +899,7 @@ AT_KEYWORDS([dpdk]) +@@ -908,7 +905,7 @@ AT_KEYWORDS([dpdk]) AT_SKIP_IF([! which dpdk-testpmd >/dev/null 2>/dev/null]) OVS_DPDK_PRE_CHECK() @@ -14203,7 +14271,7 @@ index cb6c6d5907..5ed1c7e676 100644 dnl Find number of sockets AT_CHECK([lscpu], [], [stdout]) -@@ -963,7 +954,7 @@ dnl MFEX Autovalidator +@@ -963,7 +960,7 @@ dnl MFEX Autovalidator AT_SETUP([OVS-DPDK - MFEX Autovalidator]) AT_KEYWORDS([dpdk]) OVS_DPDK_PRE_CHECK() @@ -14212,7 +14280,7 @@ index cb6c6d5907..5ed1c7e676 100644 AT_CHECK([ovs-vsctl add-br br0 -- set bridge br0 datapath_type=netdev]) AT_SKIP_IF([! ovs-appctl dpif-netdev/miniflow-parser-get | sed 1,4d | grep "True"], [], [dnl ]) -@@ -996,7 +987,7 @@ dnl MFEX Autovalidator Fuzzy +@@ -996,7 +993,7 @@ dnl MFEX Autovalidator Fuzzy AT_SETUP([OVS-DPDK - MFEX Autovalidator Fuzzy]) AT_KEYWORDS([dpdk]) OVS_DPDK_PRE_CHECK() @@ -14221,7 +14289,7 @@ index cb6c6d5907..5ed1c7e676 100644 AT_CHECK([ovs-vsctl add-br br0 -- set bridge br0 datapath_type=netdev]) AT_SKIP_IF([! ovs-appctl dpif-netdev/miniflow-parser-get | sed 1,4d | grep "True"], [], [dnl ]) -@@ -1032,7 +1023,7 @@ AT_KEYWORDS([dpdk]) +@@ -1032,7 +1029,7 @@ AT_KEYWORDS([dpdk]) OVS_DPDK_PRE_CHECK() AT_SKIP_IF([! $PYTHON3 -c "import scapy"], [], []) AT_CHECK([$PYTHON3 $srcdir/mfex_fuzzy.py test_traffic.pcap 1], [], [stdout]) @@ -14230,7 +14298,7 @@ index cb6c6d5907..5ed1c7e676 100644 AT_CHECK([ovs-vsctl --no-wait set Open_vSwitch . other_config:pmd-cpu-mask=0x1]) dnl Add userspace bridge and attach it to OVS AT_CHECK([ovs-vsctl add-br br0 -- set bridge br0 datapath_type=netdev]) -@@ -1153,7 +1144,7 @@ AT_SETUP([OVS-DPDK - user configured mempool]) +@@ -1153,7 +1150,7 @@ AT_SETUP([OVS-DPDK - user configured mempool]) AT_KEYWORDS([dpdk]) OVS_DPDK_PRE_CHECK() OVS_DPDK_START_OVSDB() diff --git a/SPECS/openvswitch3.1.spec b/SPECS/openvswitch3.1.spec index 85eecdf..ffb8bb6 100644 --- a/SPECS/openvswitch3.1.spec +++ b/SPECS/openvswitch3.1.spec @@ -57,7 +57,7 @@ Summary: Open vSwitch Group: System Environment/Daemons daemon/database/utilities URL: http://www.openvswitch.org/ Version: 3.1.0 -Release: 127%{?dist} +Release: 128%{?dist} # Nearly all of openvswitch is ASL 2.0. The bugtool is LGPLv2+, and the # lib/sflow*.[ch] files are SISSL @@ -756,6 +756,13 @@ exit 0 %endif %changelog +* Thu Aug 08 2024 Open vSwitch CI - 3.1.0-128 +- Merging upstream branch-3.1 [RH git: 7b8b03b283] + Commit list: + e6baa67d88 netdev-dpdk: Fix race condition in mempool information dump. + 4cb73c60cd ovsdb: transaction: Remove incorrect transaction abort in pre-commit. + + * Fri Jul 26 2024 Timothy Redaelli - 3.1.0-127 - Use --with-version-suffix [RH git: 9e8d2ddcd8]