diff --git a/SOURCES/openvswitch-3.5.0.patch b/SOURCES/openvswitch-3.5.0.patch index c14fd84..90b443f 100644 --- a/SOURCES/openvswitch-3.5.0.patch +++ b/SOURCES/openvswitch-3.5.0.patch @@ -34,6 +34,19 @@ index c9acc1e80e..1368f52b84 100644 ============ ======== Q: Are all the DPDK releases that OVS versions work with maintained? +diff --git a/Documentation/intro/install/general.rst b/Documentation/intro/install/general.rst +index 42b7172891..0f3cb4e496 100644 +--- a/Documentation/intro/install/general.rst ++++ b/Documentation/intro/install/general.rst +@@ -166,7 +166,7 @@ other than plain text, only if you have the following: + If you are going to extensively modify Open vSwitch, consider installing the + following to obtain better warnings: + +-- "sparse" version 0.6.2 or later ++- "sparse" version 0.6.4 or later + (https://git.kernel.org/pub/scm/devel/sparse/sparse.git/). + + - GNU make. diff --git a/Documentation/topics/userspace-tso.rst b/Documentation/topics/userspace-tso.rst index ae08496bdd..ed4d36edd1 100644 --- a/Documentation/topics/userspace-tso.rst @@ -518,6 +531,121 @@ index d57b626784..ea68c2e605 100644 #ifdef __cplusplus extern "C" { #endif +diff --git a/include/sparse/automake.mk b/include/sparse/automake.mk +index 45e6202c52..052a1b4b82 100644 +--- a/include/sparse/automake.mk ++++ b/include/sparse/automake.mk +@@ -12,10 +12,7 @@ noinst_HEADERS += \ + include/sparse/netinet/ip6.h \ + include/sparse/netpacket/packet.h \ + include/sparse/pthread.h \ +- include/sparse/rte_atomic.h \ +- include/sparse/rte_mbuf.h \ + include/sparse/rte_memcpy.h \ +- include/sparse/rte_trace_point.h \ + include/sparse/sys/socket.h \ + include/sparse/sys/sysmacros.h \ + include/sparse/sys/types.h \ +diff --git a/include/sparse/rte_atomic.h b/include/sparse/rte_atomic.h +deleted file mode 100644 +index ae49fe5c03..0000000000 +--- a/include/sparse/rte_atomic.h ++++ /dev/null +@@ -1,25 +0,0 @@ +-/* Copyright (c) 2015 Nicira, Inc. +- * +- * Licensed under the Apache License, Version 2.0 (the "License"); +- * you may not use this file except in compliance with the License. +- * You may obtain a copy of the License at: +- * +- * http://www.apache.org/licenses/LICENSE-2.0 +- * +- * Unless required by applicable law or agreed to in writing, software +- * distributed under the License is distributed on an "AS IS" BASIS, +- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +- * See the License for the specific language governing permissions and +- * limitations under the License. +- */ +- +-#ifndef __CHECKER__ +-#error "Use this header only with sparse. It is not a correct implementation." +-#endif +- +-/* Fix sparse technicality about types in one of the function calls by just +- * ignoring it. */ +-#define __sync_add_and_fetch(a, b) (0) +- +-/* Get actual definitions for us to annotate and build on. */ +-#include_next +diff --git a/include/sparse/rte_mbuf.h b/include/sparse/rte_mbuf.h +deleted file mode 100644 +index 981cdb441f..0000000000 +--- a/include/sparse/rte_mbuf.h ++++ /dev/null +@@ -1,29 +0,0 @@ +-/* Copyright (c) 2020 Intel, Inc. +- * +- * Licensed under the Apache License, Version 2.0 (the "License"); +- * you may not use this file except in compliance with the License. +- * You may obtain a copy of the License at: +- * +- * http://www.apache.org/licenses/LICENSE-2.0 +- * +- * Unless required by applicable law or agreed to in writing, software +- * distributed under the License is distributed on an "AS IS" BASIS, +- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +- * See the License for the specific language governing permissions and +- * limitations under the License. +- */ +- +-#ifndef __CHECKER__ +-#error "Use this header only with sparse. It is not a correct implementation." +-#endif +- +-/* sparse doesn't know about gcc atomic builtins. */ +-#ifndef __ATOMIC_ACQ_REL +-#define __ATOMIC_ACQ_REL 0 +-#define __ATOMIC_RELAXED 1 +-#define __atomic_add_fetch(p, val, memorder) (*(p) = *(p) + (val)) +-#define __atomic_store_n(p, val, memorder) (*(p) = (val)) +-#endif +- +-/* Get actual definitions for us to annotate and build on. */ +-#include_next +diff --git a/include/sparse/rte_trace_point.h b/include/sparse/rte_trace_point.h +deleted file mode 100644 +index 8039232754..0000000000 +--- a/include/sparse/rte_trace_point.h ++++ /dev/null +@@ -1,28 +0,0 @@ +-/* Copyright 2020, Red Hat, Inc. +- * +- * Licensed under the Apache License, Version 2.0 (the "License"); +- * you may not use this file except in compliance with the License. +- * You may obtain a copy of the License at: +- * +- * http://www.apache.org/licenses/LICENSE-2.0 +- * +- * Unless required by applicable law or agreed to in writing, software +- * distributed under the License is distributed on an "AS IS" BASIS, +- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +- * See the License for the specific language governing permissions and +- * limitations under the License. +- */ +- +-#ifndef __CHECKER__ +-#error "Use this header only with sparse. It is not a correct implementation." +-#endif +- +-/* sparse doesn't know about gcc atomic builtins. */ +-#ifndef __ATOMIC_ACQUIRE +-#define __ATOMIC_ACQUIRE 0 +-#define __atomic_load_n(p, memorder) *(p) +-#endif +- +-/* Get actual definitions for us to annotate and +- * build on. */ +-#include_next diff --git a/lib/dp-packet-gso.c b/lib/dp-packet-gso.c index 04ebb19da1..2356359772 100644 --- a/lib/dp-packet-gso.c @@ -1070,7 +1198,7 @@ index 008604aa60..d98ef3a989 100644 }; diff --git a/lib/route-table.c b/lib/route-table.c -index c6cb21394a..d9b51931ef 100644 +index c6cb21394a..2bbb51c08f 100644 --- a/lib/route-table.c +++ b/lib/route-table.c @@ -32,6 +32,7 @@ @@ -1209,7 +1337,7 @@ index c6cb21394a..d9b51931ef 100644 RT_TABLE_DEFAULT, RT_TABLE_MAIN, RT_TABLE_LOCAL, -@@ -212,19 +218,21 @@ route_table_reset(void) +@@ -212,19 +218,39 @@ route_table_reset(void) COVERAGE_INC(route_table_dump); for (size_t i = 0; i < ARRAY_SIZE(tables); i++) { @@ -1224,6 +1352,24 @@ index c6cb21394a..d9b51931ef 100644 -/* Return RTNLGRP_IPV4_ROUTE or RTNLGRP_IPV6_ROUTE on success, 0 on parse - * error. */ ++/* Returns true if the given route requires nexthop information (output ++ * interface, nexthop IP, ...). Returns false for special route types ++ * that don't need this information. */ ++static bool ++route_type_needs_nexthop(unsigned char rtmsg_type) ++{ ++ switch (rtmsg_type) { ++ case RTN_BLACKHOLE: ++ case RTN_THROW: ++ case RTN_UNREACHABLE: ++ case RTN_PROHIBIT: ++ return false; ++ ++ default: ++ return true; ++ } ++} ++ static int -route_table_parse(struct ofpbuf *buf, void *change_) +route_table_parse__(struct ofpbuf *buf, size_t ofs, @@ -1236,7 +1382,7 @@ index c6cb21394a..d9b51931ef 100644 bool parsed, ipv4 = false; static const struct nl_policy policy[] = { -@@ -234,6 +242,9 @@ route_table_parse(struct ofpbuf *buf, void *change_) +@@ -234,6 +260,9 @@ route_table_parse(struct ofpbuf *buf, void *change_) [RTA_MARK] = { .type = NL_A_U32, .optional = true }, [RTA_PREFSRC] = { .type = NL_A_U32, .optional = true }, [RTA_TABLE] = { .type = NL_A_U32, .optional = true }, @@ -1246,7 +1392,7 @@ index c6cb21394a..d9b51931ef 100644 }; static const struct nl_policy policy6[] = { -@@ -243,33 +254,36 @@ route_table_parse(struct ofpbuf *buf, void *change_) +@@ -243,33 +272,36 @@ route_table_parse(struct ofpbuf *buf, void *change_) [RTA_GATEWAY] = { .type = NL_A_IPV6, .optional = true }, [RTA_PREFSRC] = { .type = NL_A_IPV6, .optional = true }, [RTA_TABLE] = { .type = NL_A_U32, .optional = true }, @@ -1294,7 +1440,7 @@ index c6cb21394a..d9b51931ef 100644 change->relevant = true; if (rtm->rtm_scope == RT_SCOPE_NOWHERE) { -@@ -281,33 +295,33 @@ route_table_parse(struct ofpbuf *buf, void *change_) +@@ -281,33 +313,33 @@ route_table_parse(struct ofpbuf *buf, void *change_) change->relevant = false; } @@ -1344,7 +1490,7 @@ index c6cb21394a..d9b51931ef 100644 } } } -@@ -337,40 +351,190 @@ route_table_parse(struct ofpbuf *buf, void *change_) +@@ -337,40 +369,197 @@ route_table_parse(struct ofpbuf *buf, void *change_) if (ipv4) { ovs_be32 gw; gw = nl_attr_get_be32(attrs[RTA_GATEWAY]); @@ -1361,7 +1507,7 @@ index c6cb21394a..d9b51931ef 100644 + } + if (attrs[RTA_PRIORITY]) { + change->rd.rta_priority = nl_attr_get_u32(attrs[RTA_PRIORITY]); - } ++ } + if (attrs[RTA_VIA]) { + const struct rtvia *rtvia = nl_attr_get(attrs[RTA_VIA]); + ovs_be32 addr; @@ -1447,13 +1593,20 @@ index c6cb21394a..d9b51931ef 100644 + &mp_change.rd.nexthops); + } + } -+ if (!attrs[RTA_OIF] && !attrs[RTA_GATEWAY] -+ && !attrs[RTA_VIA] && !attrs[RTA_MULTIPATH]) { ++ if (route_type_needs_nexthop(rtm->rtm_type) ++ && !attrs[RTA_OIF] && !attrs[RTA_GATEWAY] ++ && !attrs[RTA_VIA] && !attrs[RTA_MULTIPATH]) { + VLOG_DBG_RL(&rl, "route message needs an RTA_OIF, RTA_GATEWAY, " + "RTA_VIA or RTA_MULTIPATH attribute"); + goto error_out; + } + /* Add any additional RTA attribute processing before RTA_MULTIPATH. */ ++ ++ /* Ensure that the change->rd->nexthops list is cleared in cases when ++ * the route does not need a next hop. */ ++ if (!route_type_needs_nexthop(rtm->rtm_type)) { ++ route_data_destroy_nexthops__(&change->rd); + } } else { VLOG_DBG_RL(&rl, "received unparseable rtnetlink route message"); - return 0; diff --git a/SPECS/openvswitch3.5.spec b/SPECS/openvswitch3.5.spec index 51e28d3..9a3e305 100644 --- a/SPECS/openvswitch3.5.spec +++ b/SPECS/openvswitch3.5.spec @@ -57,7 +57,7 @@ Summary: Open vSwitch Group: System Environment/Daemons daemon/database/utilities URL: http://www.openvswitch.org/ Version: 3.5.0 -Release: 0.15%{?dist} +Release: 0.16%{?dist} # Nearly all of openvswitch is ASL 2.0. The bugtool is LGPLv2+, and the # lib/sflow*.[ch] files are SISSL @@ -773,6 +773,13 @@ exit 0 %endif %changelog +* Thu Jan 30 2025 Open vSwitch CI - 3.5.0-0.16 +- Merging upstream branch-3.5 [RH git: bdadb926b5] + Commit list: + 57c3cc37c8 route-table: Allow parsing routes without nexthop. + 123798f7f7 sparse: Remove wrappers for some DPDK headers. + + * Wed Jan 29 2025 Open vSwitch CI - 3.5.0-0.15 - Merging upstream branch-3.5 [RH git: 89c55b4126] Commit list: