From 7099e2629d279ce6a0cf6569a9452747e1a5d316 Mon Sep 17 00:00:00 2001 From: Open vSwitch CI Date: Oct 31 2023 17:01:50 +0000 Subject: Import openvswitch3.2-3.2.0-31 from Fast DataPath --- diff --git a/SOURCES/openvswitch-3.2.0.patch b/SOURCES/openvswitch-3.2.0.patch index 82eaea8..483fc8c 100644 --- a/SOURCES/openvswitch-3.2.0.patch +++ b/SOURCES/openvswitch-3.2.0.patch @@ -409,7 +409,7 @@ index 5d2635946..3a8068b12 100644 } diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c -index 9730e0eec..157694bcf 100644 +index 9730e0eec..b8f065d1d 100644 --- a/lib/dpif-netdev.c +++ b/lib/dpif-netdev.c @@ -3380,14 +3380,13 @@ static inline void @@ -428,6 +428,17 @@ index 9730e0eec..157694bcf 100644 FLOW_FOR_EACH_IN_MAPS (value, flow, key->mf.map) { hash = hash_add64(hash, value); +@@ -4749,6 +4748,10 @@ dpif_netdev_offload_stats_get(struct dpif *dpif, + } + + nb_thread = netdev_offload_thread_nb(); ++ if (!nb_thread) { ++ return EINVAL; ++ } ++ + /* nb_thread counters for the overall total as well. */ + stats->size = ARRAY_SIZE(hwol_stats) * (nb_thread + 1); + stats->counters = xcalloc(stats->size, sizeof *stats->counters); diff --git a/lib/fatal-signal.c b/lib/fatal-signal.c index 77f0c87dd..953150074 100644 --- a/lib/fatal-signal.c @@ -572,6 +583,20 @@ index 14bc87771..992627fa2 100644 return 0; } +diff --git a/lib/netdev-offload.c b/lib/netdev-offload.c +index a5fa62487..931d634e1 100644 +--- a/lib/netdev-offload.c ++++ b/lib/netdev-offload.c +@@ -872,7 +872,8 @@ netdev_set_flow_api_enabled(const struct smap *ovs_other_config) + offload_thread_nb = smap_get_ullong(ovs_other_config, + "n-offload-threads", + DEFAULT_OFFLOAD_THREAD_NB); +- if (offload_thread_nb > MAX_OFFLOAD_THREAD_NB) { ++ if (offload_thread_nb == 0 || ++ offload_thread_nb > MAX_OFFLOAD_THREAD_NB) { + VLOG_WARN("netdev: Invalid number of threads requested: %u", + offload_thread_nb); + offload_thread_nb = DEFAULT_OFFLOAD_THREAD_NB; diff --git a/lib/netlink-conntrack.c b/lib/netlink-conntrack.c index 4fcde9ba1..492bfcffb 100644 --- a/lib/netlink-conntrack.c @@ -586,6 +611,19 @@ index 4fcde9ba1..492bfcffb 100644 nl_msg_put_be16(buf, CTA_PROTO_SRC_PORT, tuple->src_port); nl_msg_put_be16(buf, CTA_PROTO_DST_PORT, tuple->dst_port); } else { +diff --git a/lib/ofp-table.c b/lib/ofp-table.c +index a956754f2..f9bd3b7f9 100644 +--- a/lib/ofp-table.c ++++ b/lib/ofp-table.c +@@ -1416,7 +1416,7 @@ count_common_prefix_run(const char *ids[], size_t n, + if (!next) { + break; + } else if (next < extra_prefix_len) { +- next = extra_prefix_len; ++ extra_prefix_len = next; + } + i++; + } diff --git a/lib/tc.c b/lib/tc.c index f49048cda..6b38925c3 100644 --- a/lib/tc.c @@ -2792,7 +2830,7 @@ index 3bc5291cc..fb0ab0e69 100644 #include "util.h" diff --git a/tests/test-id-fpool.c b/tests/test-id-fpool.c -index 25275d9ae..27800aa9b 100644 +index 25275d9ae..7bdb8154d 100644 --- a/tests/test-id-fpool.c +++ b/tests/test-id-fpool.c @@ -14,12 +14,12 @@ @@ -2810,8 +2848,17 @@ index 25275d9ae..27800aa9b 100644 #include "command-line.h" #include "id-fpool.h" +@@ -237,7 +237,7 @@ print_result(const char *prefix) + for (i = 0; i < n_threads; i++) { + avg += thread_working_ms[i]; + } +- avg /= n_threads; ++ avg /= n_threads ? n_threads : 1; + printf("%s: ", prefix); + for (i = 0; i < n_threads; i++) { + if (thread_working_ms[i] >= TIMEOUT_MS) { diff --git a/tests/test-mpsc-queue.c b/tests/test-mpsc-queue.c -index a38bf9e6d..16aa804a0 100644 +index a38bf9e6d..86a223caf 100644 --- a/tests/test-mpsc-queue.c +++ b/tests/test-mpsc-queue.c @@ -14,12 +14,12 @@ @@ -2829,11 +2876,20 @@ index a38bf9e6d..16aa804a0 100644 #include "command-line.h" #include "guarded-list.h" +@@ -315,7 +315,7 @@ print_result(const char *prefix, int reader_elapsed) + for (i = 0; i < n_threads; i++) { + avg += thread_working_ms[i]; + } +- avg /= n_threads; ++ avg /= n_threads ? n_threads : 1; + printf("%s: %6d", prefix, reader_elapsed); + for (i = 0; i < n_threads; i++) { + printf(" %6" PRIu64, thread_working_ms[i]); diff --git a/vswitchd/vswitch.xml b/vswitchd/vswitch.xml -index cfcde34ff..1e2a1267d 100644 +index cfcde34ff..e400043ce 100644 --- a/vswitchd/vswitch.xml +++ b/vswitchd/vswitch.xml -@@ -3797,14 +3797,29 @@ ovs-vsctl add-port br0 p0 -- set Interface p0 type=patch options:peer=p1 \ +@@ -3797,14 +3797,62 @@ ovs-vsctl add-port br0 p0 -- set Interface p0 type=patch options:peer=p1 \ Interface description string. @@ -2864,6 +2920,39 @@ index cfcde34ff..1e2a1267d 100644 + IDs of rss queues. Only reported if rx-steering is + supported by hardware. + ++ ++ ++ ++

++ dpdkvhostuser and dpdkvhostuserclient ++ netdev specific interface status information. ++

++ ++ client (connecting) or server (listening) in the socket ++ communication. ++ ++ ++ virtio features bitmap as per virtio specification. ++ ++ ++ The number of available virtqueues. ++ ++ ++ The numa id of the device and guest memory. ++ ++ ++ The path to the socket used for communication. ++ ++ ++ Status of connection to the device. ++ ++ ++ Each virtqueue will have it's size reported, where n is the ++ virtqueue number from 0..(num_of_vrings-1). ++ ++ ++ Whether userspace-tso is enabled or disabled. ++
diff --git a/SPECS/openvswitch3.2.spec b/SPECS/openvswitch3.2.spec index 84e430c..d5fa780 100644 --- a/SPECS/openvswitch3.2.spec +++ b/SPECS/openvswitch3.2.spec @@ -57,7 +57,7 @@ Summary: Open vSwitch Group: System Environment/Daemons daemon/database/utilities URL: http://www.openvswitch.org/ Version: 3.2.0 -Release: 30%{?dist} +Release: 31%{?dist} # Nearly all of openvswitch is ASL 2.0. The bugtool is LGPLv2+, and the # lib/sflow*.[ch] files are SISSL @@ -761,6 +761,15 @@ exit 0 %endif %changelog +* Tue Oct 31 2023 Open vSwitch CI - 3.2.0-31 +- Merging upstream branch-3.2 [RH git: d76eaaa84f] + Commit list: + 1b0c75320d netdev-offload: Fix Clang's static analyzer 'Division by zero' warnings. + 3919e61a74 ofp-table: Fix count_common_prefix_run() function. + 07e3598da4 vswitch.xml: Add entry for dpdkvhostuser userspace-tso. + afc9bad24f vswitch.xml: Add dpdkvhostuser group status. + + * Fri Oct 27 2023 Open vSwitch CI - 3.2.0-30 - Merging upstream branch-3.2 [RH git: 26d7eed996] Commit list: