From 0953c9bc208f02af19ef603a8b7e50699ca79a3e Mon Sep 17 00:00:00 2001 From: Open vSwitch CI Date: May 28 2024 23:27:13 +0000 Subject: Import openvswitch3.3-3.3.0-21 from Fast DataPath --- diff --git a/SOURCES/openvswitch-3.3.0.patch b/SOURCES/openvswitch-3.3.0.patch index 5c7a982..0c70264 100644 --- a/SOURCES/openvswitch-3.3.0.patch +++ b/SOURCES/openvswitch-3.3.0.patch @@ -522,6 +522,35 @@ index 2fa17d8140..3622764c47 100644 /* Mark packet 'b' as a tunnel packet with outer IPv4 header. */ static inline void dp_packet_hwol_set_tx_outer_ipv4(struct dp_packet *b) +diff --git a/lib/dpctl.c b/lib/dpctl.c +index 34ee7d0e2d..151848b909 100644 +--- a/lib/dpctl.c ++++ b/lib/dpctl.c +@@ -1359,19 +1359,17 @@ static int + dpctl_del_flow_dpif(struct dpif *dpif, const char *key_s, + struct dpctl_params *dpctl_p) + { ++ struct dpif_port_dump port_dump; + struct dpif_flow_stats stats; ++ bool ufid_generated = false; + struct dpif_port dpif_port; +- struct dpif_port_dump port_dump; +- struct ofpbuf key; ++ bool ufid_present = false; ++ struct simap port_names; + struct ofpbuf mask; /* To be ignored. */ +- ++ struct ofpbuf key; + ovs_u128 ufid; +- bool ufid_generated; +- bool ufid_present; +- struct simap port_names; + int n, error; + +- ufid_present = false; + n = odp_ufid_from_string(key_s, &ufid); + if (n < 0) { + dpctl_error(dpctl_p, -n, "parsing flow ufid"); diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c index 46e24d204d..99ff9b3693 100644 --- a/lib/dpif-netdev.c @@ -870,8 +899,51 @@ index cd7e85a818..e8bbf8d514 100644 unixctl_command_reply(conn, "OK"); } else { unixctl_command_reply_error(conn, error); +diff --git a/lib/netdev-linux.c b/lib/netdev-linux.c +index bf91ef462e..80ccade06a 100644 +--- a/lib/netdev-linux.c ++++ b/lib/netdev-linux.c +@@ -2403,6 +2403,7 @@ static int + netdev_linux_read_stringset_info(struct netdev_linux *netdev, uint32_t *len) + { + union { ++ struct ethtool_cmd ecmd; + struct ethtool_sset_info hdr; + struct { + uint64_t pad[2]; +@@ -2440,9 +2441,12 @@ netdev_linux_read_definitions(struct netdev_linux *netdev, + int error = 0; + + error = netdev_linux_read_stringset_info(netdev, &len); +- if (error || !len) { ++ if (error) { + return error; ++ } else if (!len) { ++ return -EOPNOTSUPP; + } ++ + strings = xzalloc(sizeof *strings + len * ETH_GSTRING_LEN); + + strings->cmd = ETHTOOL_GSTRINGS; +@@ -2725,6 +2729,7 @@ netdev_linux_get_speed_locked(struct netdev_linux *netdev, + uint32_t *current, uint32_t *max) + { + if (netdev_linux_netnsid_is_remote(netdev)) { ++ *current = *max = 0; + return EOPNOTSUPP; + } + +@@ -2734,6 +2739,8 @@ netdev_linux_get_speed_locked(struct netdev_linux *netdev, + ? 0 : netdev->current_speed; + *max = MIN(UINT32_MAX, + netdev_features_to_bps(netdev->supported, 0) / 1000000ULL); ++ } else { ++ *current = *max = 0; + } + return netdev->get_features_error; + } diff --git a/lib/netdev-native-tnl.c b/lib/netdev-native-tnl.c -index dee9ab344e..b21176037b 100644 +index dee9ab344e..d6f46ac4ae 100644 --- a/lib/netdev-native-tnl.c +++ b/lib/netdev-native-tnl.c @@ -932,9 +932,9 @@ netdev_srv6_build_header(const struct netdev *netdev, @@ -895,6 +967,18 @@ index dee9ab344e..b21176037b 100644 for (i = 0; i < nr_segs; i++) { /* Segment list is written to the header in reverse order. */ memcpy(s, &segs[nr_segs - i - 1], sizeof *s); +@@ -1068,7 +1067,10 @@ netdev_srv6_pop_header(struct dp_packet *packet) + } + + pkt_metadata_init_tnl(md); +- netdev_tnl_ip_extract_tnl_md(packet, tnl, &hlen); ++ if (!netdev_tnl_ip_extract_tnl_md(packet, tnl, &hlen)) { ++ goto err; ++ } ++ + dp_packet_reset_packet(packet, hlen); + + return packet; diff --git a/lib/netlink-protocol.h b/lib/netlink-protocol.h index 6eaa7035a4..e4bb28ac9f 100644 --- a/lib/netlink-protocol.h @@ -1205,6 +1289,36 @@ index 9927dcc185..f1fe32714e 100644 } static void +diff --git a/lib/socket-util.c b/lib/socket-util.c +index 3eb3a3816b..b3f541b6db 100644 +--- a/lib/socket-util.c ++++ b/lib/socket-util.c +@@ -546,9 +546,15 @@ inet_parse_active(const char *target_, int default_port, + if (!host) { + VLOG_ERR("%s: host must be specified", target_); + ok = false; ++ if (dns_failure) { ++ *dns_failure = false; ++ } + } else if (!port && default_port < 0) { + VLOG_ERR("%s: port must be specified", target_); + ok = false; ++ if (dns_failure) { ++ *dns_failure = false; ++ } + } else { + ok = parse_sockaddr_components(ss, host, port, default_port, + target_, resolve_host, dns_failure); +@@ -671,6 +677,9 @@ inet_parse_passive(const char *target_, int default_port, + if (!port && default_port < 0) { + VLOG_ERR("%s: port must be specified", target_); + ok = false; ++ if (dns_failure) { ++ *dns_failure = false; ++ } + } else { + ok = parse_sockaddr_components(ss, host, port, default_port, + target_, resolve_host, dns_failure); diff --git a/lib/table.c b/lib/table.c index 48d18b6518..b7addbf390 100644 --- a/lib/table.c diff --git a/SPECS/openvswitch3.3.spec b/SPECS/openvswitch3.3.spec index 1343962..475c81e 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: 20%{?dist} +Release: 21%{?dist} # Nearly all of openvswitch is ASL 2.0. The bugtool is LGPLv2+, and the # lib/sflow*.[ch] files are SISSL @@ -767,6 +767,17 @@ exit 0 %endif %changelog +* Tue May 28 2024 Open vSwitch CI - 3.3.0-21 +- Merging upstream branch-3.3 [RH git: 4793020729] + Commit list: + a3022b08ac netdev-linux: Initialize link speed in error conditions. + 216c2c1ff9 netdev-linux: Return an error if device feature names are empty. + 1b78323a21 socket: Fix uninitialized values in inet_parse_ functions. + 4ece94d2ab dpctl: Fix uninitialized value when deleting flows. + 7ee12c5ae1 netdev-native-tnl: Fix use of uninitialized offset on SRv6 header pop. + 258bc1e0c6 netdev-linux: Fix ethtool_cmd is partly outside array bounds. + + * Thu May 23 2024 Open vSwitch CI - 3.3.0-20 - Merging upstream branch-3.3 [RH git: e37661f387] Commit list: