diff --git a/SOURCES/openvswitch-3.1.0.patch b/SOURCES/openvswitch-3.1.0.patch index 5670cf4..f59c8fd 100644 --- a/SOURCES/openvswitch-3.1.0.patch +++ b/SOURCES/openvswitch-3.1.0.patch @@ -1852,7 +1852,7 @@ index d12d9b8a5..41b23d8ae 100644 free(argcopy); return 0; diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c -index c9f7179c3..10371359c 100644 +index c9f7179c3..4c85ab4aa 100644 --- a/lib/dpif-netdev.c +++ b/lib/dpif-netdev.c @@ -3365,14 +3365,13 @@ static inline void @@ -1942,7 +1942,18 @@ index c9f7179c3..10371359c 100644 ovs_mutex_unlock(&pmd->flow_mutex); return error; } -@@ -9616,6 +9630,7 @@ dpif_netdev_bond_stats_get(struct dpif *dpif, uint32_t bond_id, +@@ -4719,6 +4733,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); +@@ -9616,6 +9634,7 @@ dpif_netdev_bond_stats_get(struct dpif *dpif, uint32_t bond_id, const struct dpif_class dpif_netdev_class = { "netdev", true, /* cleanup_required */ @@ -2927,7 +2938,7 @@ index 4c78c4816..09f6393f8 100644 } diff --git a/lib/netdev-offload.c b/lib/netdev-offload.c -index 4592262bd..a5fa62487 100644 +index 4592262bd..931d634e1 100644 --- a/lib/netdev-offload.c +++ b/lib/netdev-offload.c @@ -485,11 +485,13 @@ netdev_set_hw_info(struct netdev *netdev, int type, int val) @@ -3189,6 +3200,16 @@ index 4592262bd..a5fa62487 100644 } void +@@ -866,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/netdev-vport-private.h b/lib/netdev-vport-private.h index d89a28c66..586231057 100644 --- a/lib/netdev-vport-private.h @@ -3753,6 +3774,19 @@ index a90b926ef..102b183a8 100644 return xasprintf("invalid numeric format %s", str); } *valuep = value; +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/ovs-thread.c b/lib/ovs-thread.c index 2d382f1e8..ac5d2c3d0 100644 --- a/lib/ovs-thread.c @@ -9521,7 +9555,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 @@ @@ -9539,8 +9573,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 @@ @@ -9558,6 +9601,15 @@ 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/tests/test-ovsdb.c b/tests/test-ovsdb.c index 1bc5ac17a..c761822e6 100644 --- a/tests/test-ovsdb.c @@ -9831,7 +9883,7 @@ index 407bfc60e..2b2afb44c 100644 + } } diff --git a/vswitchd/vswitch.xml b/vswitchd/vswitch.xml -index 2b57fc0e3..ca7d18a6d 100644 +index 2b57fc0e3..ec3d3356d 100644 --- a/vswitchd/vswitch.xml +++ b/vswitchd/vswitch.xml @@ -215,6 +215,19 @@ @@ -9854,7 +9906,7 @@ index 2b57fc0e3..ca7d18a6d 100644

-@@ -3688,14 +3701,15 @@ ovs-vsctl add-port br0 p0 -- set Interface p0 type=patch options:peer=p1 \ +@@ -3688,14 +3701,48 @@ ovs-vsctl add-port br0 p0 -- set Interface p0 type=patch options:peer=p1 \ Interface description string. @@ -9871,11 +9923,43 @@ index 2b57fc0e3..ca7d18a6d 100644 + Ethernet address set for this VF interface. Only reported for dpdk + VF representors. -- ++ + ++ ++

++ 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. ++ -@@ -6296,6 +6310,12 @@ ovs-vsctl add-port br0 p0 -- set Interface p0 type=patch options:peer=p1 \ +@@ -6296,6 +6343,12 @@ ovs-vsctl add-port br0 p0 -- set Interface p0 type=patch options:peer=p1 \ translated to an ephemeral port. If there is no collision, no SNAT is performed.
diff --git a/SPECS/openvswitch3.1.spec b/SPECS/openvswitch3.1.spec index 61a14da..692bc14 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: 63%{?dist} +Release: 64%{?dist} # Nearly all of openvswitch is ASL 2.0. The bugtool is LGPLv2+, and the # lib/sflow*.[ch] files are SISSL @@ -754,6 +754,15 @@ exit 0 %endif %changelog +* Tue Oct 31 2023 Open vSwitch CI - 3.1.0-64 +- Merging upstream branch-3.1 [RH git: 95bf68b1ea] + Commit list: + 0aefd48561 netdev-offload: Fix Clang's static analyzer 'Division by zero' warnings. + 8df66889c1 ofp-table: Fix count_common_prefix_run() function. + 075f056383 vswitch.xml: Add entry for dpdkvhostuser userspace-tso. + 2ff1dbe5e9 vswitch.xml: Add dpdkvhostuser group status. + + * Thu Oct 26 2023 Open vSwitch CI - 3.1.0-63 - Merging upstream branch-3.1 [RH git: 73ed44c2c6] Commit list: