From bdc9205fb80c3f8b149fd68a2f324af7fceb408d Mon Sep 17 00:00:00 2001 From: Open vSwitch CI Date: Dec 18 2021 08:59:24 +0000 Subject: Import openvswitch2.15-2.15.0-56 from Fast DataPath --- diff --git a/SOURCES/openvswitch-2.15.0.patch b/SOURCES/openvswitch-2.15.0.patch index 3504f8d..8764e97 100644 --- a/SOURCES/openvswitch-2.15.0.patch +++ b/SOURCES/openvswitch-2.15.0.patch @@ -199,13 +199,23 @@ index 103495415a..a98ec672fc 100644 This configuration accomplishes that the high priority traffic has a guaranteed bandwidth egressing the ports at CIR (1000pps), but it can also diff --git a/NEWS b/NEWS -index bc901efdb1..d0f0cc8d85 100644 +index bc901efdb1..a3d7694b81 100644 --- a/NEWS +++ b/NEWS -@@ -1,3 +1,25 @@ -+v2.15.3 - xx xxx xxxx +@@ -1,3 +1,35 @@ ++v2.15.4 - xx xxx xxxx +--------------------- + ++v2.15.3 - 17 Dec 2021 ++--------------------- ++ - Bug fixes ++ - The Python Idl class now has a cooperative_yield() method that can be ++ overridden by an application that uses eventlet / gevent / asyncio with ++ the desired yield method (e.g. {eventlet,gevent,asyncio}.sleep(0)) to ++ prevent the application from being blocked for a long time while ++ processing database updates. ++ ++ +v2.15.2 - 21 Oct 2021 +--------------------- + - Bug fixes @@ -247,7 +257,7 @@ index 435685c93d..15a54d636f 100644 AC_CHECK_MEMBERS([struct tcf_t.firstuse], [], [], [#include ]) diff --git a/configure.ac b/configure.ac -index fd82d7d270..4a14ffb748 100644 +index fd82d7d270..e45de27433 100644 --- a/configure.ac +++ b/configure.ac @@ -13,7 +13,7 @@ @@ -255,7 +265,7 @@ index fd82d7d270..4a14ffb748 100644 AC_PREREQ(2.63) -AC_INIT(openvswitch, 2.15.0, bugs@openvswitch.org) -+AC_INIT(openvswitch, 2.15.3, bugs@openvswitch.org) ++AC_INIT(openvswitch, 2.15.4, bugs@openvswitch.org) AC_CONFIG_SRCDIR([datapath/datapath.c]) AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_AUX_DIR([build-aux]) @@ -604,15 +614,21 @@ index 4cce92f66c..bc18c56b81 100644 #define nf_conntrack_in rpl_nf_conntrack_in #endif /* HAVE_NF_CONNTRACK_IN_TAKES_NF_HOOK_STATE */ diff --git a/debian/changelog b/debian/changelog -index 1f2b7a3668..bce2f5c305 100644 +index 1f2b7a3668..83eec24109 100644 --- a/debian/changelog +++ b/debian/changelog -@@ -1,3 +1,21 @@ +@@ -1,3 +1,27 @@ ++openvswitch (2.15.4-1) unstable; urgency=low ++ [ Open vSwitch team ] ++ * New upstream version ++ ++ -- Open vSwitch team Fri, 17 Dec 2021 22:13:44 +0100 ++ +openvswitch (2.15.3-1) unstable; urgency=low + [ Open vSwitch team ] + * New upstream version + -+ -- Open vSwitch team Thu, 21 Oct 2021 23:58:11 +0200 ++ -- Open vSwitch team Fri, 17 Dec 2021 22:13:44 +0100 + +openvswitch (2.15.2-1) unstable; urgency=low + [ Open vSwitch team ] @@ -20963,6 +20979,209 @@ index 3192207984..f173daa421 100644 ofpbuf_delete(reply); } +diff --git a/lib/tnl-neigh-cache.c b/lib/tnl-neigh-cache.c +index 5bda4af7e0..995c88bf17 100644 +--- a/lib/tnl-neigh-cache.c ++++ b/lib/tnl-neigh-cache.c +@@ -32,6 +32,7 @@ + #include "errno.h" + #include "flow.h" + #include "netdev.h" ++#include "ovs-atomic.h" + #include "ovs-thread.h" + #include "packets.h" + #include "openvswitch/poll-loop.h" +@@ -44,14 +45,13 @@ + #include "openvswitch/vlog.h" + + +-/* In seconds */ +-#define NEIGH_ENTRY_DEFAULT_IDLE_TIME (15 * 60) ++#define NEIGH_ENTRY_DEFAULT_IDLE_TIME_MS (15 * 60 * 1000) + + struct tnl_neigh_entry { + struct cmap_node cmap_node; + struct in6_addr ip; + struct eth_addr mac; +- time_t expires; /* Expiration time. */ ++ atomic_llong expires; /* Expiration time in ms. */ + char br_name[IFNAMSIZ]; + }; + +@@ -64,6 +64,16 @@ tnl_neigh_hash(const struct in6_addr *ip) + return hash_bytes(ip->s6_addr, 16, 0); + } + ++static bool ++tnl_neigh_expired(struct tnl_neigh_entry *neigh) ++{ ++ long long expires; ++ ++ atomic_read_explicit(&neigh->expires, &expires, memory_order_acquire); ++ ++ return expires <= time_msec(); ++} ++ + static struct tnl_neigh_entry * + tnl_neigh_lookup__(const char br_name[IFNAMSIZ], const struct in6_addr *dst) + { +@@ -73,11 +83,13 @@ tnl_neigh_lookup__(const char br_name[IFNAMSIZ], const struct in6_addr *dst) + hash = tnl_neigh_hash(dst); + CMAP_FOR_EACH_WITH_HASH (neigh, cmap_node, hash, &table) { + if (ipv6_addr_equals(&neigh->ip, dst) && !strcmp(neigh->br_name, br_name)) { +- if (neigh->expires <= time_now()) { ++ if (tnl_neigh_expired(neigh)) { + return NULL; + } + +- neigh->expires = time_now() + NEIGH_ENTRY_DEFAULT_IDLE_TIME; ++ atomic_store_explicit(&neigh->expires, time_msec() + ++ NEIGH_ENTRY_DEFAULT_IDLE_TIME_MS, ++ memory_order_release); + return neigh; + } + } +@@ -113,15 +125,16 @@ tnl_neigh_delete(struct tnl_neigh_entry *neigh) + ovsrcu_postpone(neigh_entry_free, neigh); + } + +-static void +-tnl_neigh_set__(const char name[IFNAMSIZ], const struct in6_addr *dst, +- const struct eth_addr mac) ++void ++tnl_neigh_set(const char name[IFNAMSIZ], const struct in6_addr *dst, ++ const struct eth_addr mac) + { + ovs_mutex_lock(&mutex); + struct tnl_neigh_entry *neigh = tnl_neigh_lookup__(name, dst); + if (neigh) { + if (eth_addr_equals(neigh->mac, mac)) { +- neigh->expires = time_now() + NEIGH_ENTRY_DEFAULT_IDLE_TIME; ++ atomic_store_relaxed(&neigh->expires, time_msec() + ++ NEIGH_ENTRY_DEFAULT_IDLE_TIME_MS); + ovs_mutex_unlock(&mutex); + return; + } +@@ -133,7 +146,8 @@ tnl_neigh_set__(const char name[IFNAMSIZ], const struct in6_addr *dst, + + neigh->ip = *dst; + neigh->mac = mac; +- neigh->expires = time_now() + NEIGH_ENTRY_DEFAULT_IDLE_TIME; ++ atomic_store_relaxed(&neigh->expires, time_msec() + ++ NEIGH_ENTRY_DEFAULT_IDLE_TIME_MS); + ovs_strlcpy(neigh->br_name, name, sizeof neigh->br_name); + cmap_insert(&table, &neigh->cmap_node, tnl_neigh_hash(&neigh->ip)); + ovs_mutex_unlock(&mutex); +@@ -144,12 +158,12 @@ tnl_arp_set(const char name[IFNAMSIZ], ovs_be32 dst, + const struct eth_addr mac) + { + struct in6_addr dst6 = in6_addr_mapped_ipv4(dst); +- tnl_neigh_set__(name, &dst6, mac); ++ tnl_neigh_set(name, &dst6, mac); + } + + static int + tnl_arp_snoop(const struct flow *flow, struct flow_wildcards *wc, +- const char name[IFNAMSIZ]) ++ const char name[IFNAMSIZ], bool allow_update) + { + /* Snoop normal ARP replies and gratuitous ARP requests/replies only */ + if (!is_arp(flow) +@@ -159,13 +173,17 @@ tnl_arp_snoop(const struct flow *flow, struct flow_wildcards *wc, + return EINVAL; + } + +- tnl_arp_set(name, FLOW_WC_GET_AND_MASK_WC(flow, wc, nw_src), flow->arp_sha); ++ memset(&wc->masks.nw_src, 0xff, sizeof wc->masks.nw_src); ++ ++ if (allow_update) { ++ tnl_arp_set(name, flow->nw_src, flow->arp_sha); ++ } + return 0; + } + + static int + tnl_nd_snoop(const struct flow *flow, struct flow_wildcards *wc, +- const char name[IFNAMSIZ]) ++ const char name[IFNAMSIZ], bool allow_update) + { + if (!is_nd(flow, wc) || flow->tp_src != htons(ND_NEIGHBOR_ADVERT)) { + return EINVAL; +@@ -184,20 +202,22 @@ tnl_nd_snoop(const struct flow *flow, struct flow_wildcards *wc, + memset(&wc->masks.ipv6_dst, 0xff, sizeof wc->masks.ipv6_dst); + memset(&wc->masks.nd_target, 0xff, sizeof wc->masks.nd_target); + +- tnl_neigh_set__(name, &flow->nd_target, flow->arp_tha); ++ if (allow_update) { ++ tnl_neigh_set(name, &flow->nd_target, flow->arp_tha); ++ } + return 0; + } + + int + tnl_neigh_snoop(const struct flow *flow, struct flow_wildcards *wc, +- const char name[IFNAMSIZ]) ++ const char name[IFNAMSIZ], bool allow_update) + { + int res; +- res = tnl_arp_snoop(flow, wc, name); ++ res = tnl_arp_snoop(flow, wc, name, allow_update); + if (res != EINVAL) { + return res; + } +- return tnl_nd_snoop(flow, wc, name); ++ return tnl_nd_snoop(flow, wc, name, allow_update); + } + + void +@@ -208,7 +228,7 @@ tnl_neigh_cache_run(void) + + ovs_mutex_lock(&mutex); + CMAP_FOR_EACH(neigh, cmap_node, &table) { +- if (neigh->expires <= time_now()) { ++ if (tnl_neigh_expired(neigh)) { + tnl_neigh_delete(neigh); + changed = true; + } +@@ -294,7 +314,7 @@ tnl_neigh_cache_add(struct unixctl_conn *conn, int argc OVS_UNUSED, + return; + } + +- tnl_neigh_set__(br_name, &ip6, mac); ++ tnl_neigh_set(br_name, &ip6, mac); + unixctl_command_reply(conn, "OK"); + } + +@@ -319,7 +339,7 @@ tnl_neigh_cache_show(struct unixctl_conn *conn, int argc OVS_UNUSED, + + ds_put_format(&ds, ETH_ADDR_FMT" %s", + ETH_ADDR_ARGS(neigh->mac), neigh->br_name); +- if (neigh->expires <= time_now()) { ++ if (tnl_neigh_expired(neigh)) { + ds_put_format(&ds, " STALE"); + } + ds_put_char(&ds, '\n'); +diff --git a/lib/tnl-neigh-cache.h b/lib/tnl-neigh-cache.h +index ded9c2f86f..877bca3127 100644 +--- a/lib/tnl-neigh-cache.h ++++ b/lib/tnl-neigh-cache.h +@@ -32,11 +32,13 @@ + #include "util.h" + + int tnl_neigh_snoop(const struct flow *flow, struct flow_wildcards *wc, +- const char dev_name[]); +-int tnl_neigh_lookup(const char dev_name[], const struct in6_addr *dst, ++ const char dev_name[IFNAMSIZ], bool allow_update); ++void tnl_neigh_set(const char name[IFNAMSIZ], const struct in6_addr *dst, ++ const struct eth_addr mac); ++int tnl_neigh_lookup(const char dev_name[IFNAMSIZ], const struct in6_addr *dst, + struct eth_addr *mac); + void tnl_neigh_cache_init(void); + void tnl_neigh_cache_run(void); +-void tnl_neigh_flush(const char dev_name[]); ++void tnl_neigh_flush(const char dev_name[IFNAMSIZ]); + + #endif diff --git a/lib/tun-metadata.c b/lib/tun-metadata.c index c0b0ae0448..af0bcbde8d 100644 --- a/lib/tun-metadata.c @@ -21243,10 +21462,33 @@ index 5fae46adfc..ccf97266c0 100644 ovs_mutex_destroy(&udpif->ukeys[i].mutex); } diff --git a/ofproto/ofproto-dpif-xlate.c b/ofproto/ofproto-dpif-xlate.c -index 7108c8a301..e776ae904b 100644 +index 7108c8a301..8606d584be 100644 --- a/ofproto/ofproto-dpif-xlate.c +++ b/ofproto/ofproto-dpif-xlate.c -@@ -6177,11 +6177,32 @@ static void +@@ -4097,7 +4097,21 @@ terminate_native_tunnel(struct xlate_ctx *ctx, struct flow *flow, + (flow->dl_type == htons(ETH_TYPE_ARP) || + flow->nw_proto == IPPROTO_ICMPV6) && + is_neighbor_reply_correct(ctx, flow)) { +- tnl_neigh_snoop(flow, wc, ctx->xbridge->name); ++ tnl_neigh_snoop(flow, wc, ctx->xbridge->name, ++ ctx->xin->allow_side_effects); ++ } else if (*tnl_port != ODPP_NONE && ++ ctx->xin->allow_side_effects && ++ dl_type_is_ip_any(flow->dl_type)) { ++ struct eth_addr mac = flow->dl_src; ++ struct in6_addr s_ip6; ++ ++ if (flow->dl_type == htons(ETH_TYPE_IP)) { ++ in6_addr_set_mapped_ipv4(&s_ip6, flow->nw_src); ++ } else { ++ s_ip6 = flow->ipv6_src; ++ } ++ ++ tnl_neigh_set(ctx->xbridge->name, &s_ip6, mac); + } + } + +@@ -6177,11 +6191,32 @@ static void compose_conntrack_action(struct xlate_ctx *ctx, struct ofpact_conntrack *ofc, bool is_last_action) { @@ -21257,7 +21499,7 @@ index 7108c8a301..e776ae904b 100644 + if (ofc->zone_src.field) { + union mf_subvalue value; + memset(&value, 0xff, sizeof(value)); - ++ + zone = mf_get_subfield(&ofc->zone_src, &ctx->xin->flow); + if (ctx->xin->frozen_state) { + /* If the upcall is a resume of a recirculation, we only need to @@ -21275,14 +21517,14 @@ index 7108c8a301..e776ae904b 100644 + } else { + zone = ofc->zone_imm; + } -+ + + size_t ct_offset; + ovs_u128 old_ct_label_mask = ctx->wc->masks.ct_label; + uint32_t old_ct_mark_mask = ctx->wc->masks.ct_mark; /* Ensure that any prior actions are applied before composing the new * conntrack action. */ xlate_commit_actions(ctx); -@@ -6193,11 +6214,6 @@ compose_conntrack_action(struct xlate_ctx *ctx, struct ofpact_conntrack *ofc, +@@ -6193,11 +6228,6 @@ compose_conntrack_action(struct xlate_ctx *ctx, struct ofpact_conntrack *ofc, do_xlate_actions(ofc->actions, ofpact_ct_get_action_len(ofc), ctx, is_last_action, false); @@ -21294,7 +21536,7 @@ index 7108c8a301..e776ae904b 100644 ct_offset = nl_msg_start_nested(ctx->odp_actions, OVS_ACTION_ATTR_CT); if (ofc->flags & NX_CT_F_COMMIT) { -@@ -6333,6 +6349,7 @@ xlate_check_pkt_larger(struct xlate_ctx *ctx, +@@ -6333,6 +6363,7 @@ xlate_check_pkt_larger(struct xlate_ctx *ctx, * then ctx->exit would be true. Reset to false so that we can * do flow translation for 'IF_LESS_EQUAL' case. finish_freezing() * would have taken care of Undoing the changes done for freeze. */ @@ -21302,7 +21544,7 @@ index 7108c8a301..e776ae904b 100644 ctx->exit = false; offset_attr = nl_msg_start_nested( -@@ -6357,7 +6374,7 @@ xlate_check_pkt_larger(struct xlate_ctx *ctx, +@@ -6357,7 +6388,7 @@ xlate_check_pkt_larger(struct xlate_ctx *ctx, ctx->was_mpls = old_was_mpls; ctx->conntracked = old_conntracked; ctx->xin->flow = old_flow; @@ -21311,7 +21553,7 @@ index 7108c8a301..e776ae904b 100644 } static void -@@ -6736,6 +6753,7 @@ do_xlate_actions(const struct ofpact *ofpacts, size_t ofpacts_len, +@@ -6736,6 +6767,7 @@ do_xlate_actions(const struct ofpact *ofpacts, size_t ofpacts_len, return; } @@ -21319,7 +21561,7 @@ index 7108c8a301..e776ae904b 100644 OFPACT_FOR_EACH (a, ofpacts, ofpacts_len) { struct ofpact_controller *controller; const struct ofpact_metadata *metadata; -@@ -6750,7 +6768,7 @@ do_xlate_actions(const struct ofpact *ofpacts, size_t ofpacts_len, +@@ -6750,7 +6782,7 @@ do_xlate_actions(const struct ofpact *ofpacts, size_t ofpacts_len, recirc_for_mpls(a, ctx); @@ -21328,7 +21570,7 @@ index 7108c8a301..e776ae904b 100644 /* Check if need to store the remaining actions for later * execution. */ if (ctx->freezing) { -@@ -7127,7 +7145,9 @@ do_xlate_actions(const struct ofpact *ofpacts, size_t ofpacts_len, +@@ -7127,7 +7159,9 @@ do_xlate_actions(const struct ofpact *ofpacts, size_t ofpacts_len, break; case OFPACT_CT_CLEAR: @@ -21339,7 +21581,7 @@ index 7108c8a301..e776ae904b 100644 break; case OFPACT_NAT: -@@ -7156,6 +7176,12 @@ do_xlate_actions(const struct ofpact *ofpacts, size_t ofpacts_len, +@@ -7156,6 +7190,12 @@ do_xlate_actions(const struct ofpact *ofpacts, size_t ofpacts_len, ofpacts_len); xlate_check_pkt_larger(ctx, ofpact_get_CHECK_PKT_LARGER(a), remaining_acts, remaining_acts_len); @@ -21942,7 +22184,7 @@ index 8aec6bbac1..ba55566926 100644 from collections import Sequence, MutableSequence from functools import wraps diff --git a/python/ovs/db/idl.py b/python/ovs/db/idl.py -index 5850ac7abf..3ca47f96bb 100644 +index 5850ac7abf..7ecaeee6d5 100644 --- a/python/ovs/db/idl.py +++ b/python/ovs/db/idl.py @@ -12,6 +12,7 @@ @@ -22049,7 +22291,23 @@ index 5850ac7abf..3ca47f96bb 100644 self._session.force_reconnect() def session_name(self): -@@ -614,6 +631,7 @@ class Idl(object): +@@ -474,6 +491,15 @@ class Idl(object): + :type updates: Row + """ + ++ def cooperative_yield(self): ++ """Hook for cooperatively yielding to eventlet/gevent/asyncio/etc. ++ ++ When a block of code is going to spend a lot of time cpu-bound without ++ doing any I/O, it can cause greenthread/coroutine libraries to block. ++ This call should be added to code where this can happen, but defaults ++ to doing nothing to avoid overhead where it is not needed. ++ """ ++ + def __send_cond_change(self, table, cond): + monitor_cond_change = {table.name: [{"where": cond}]} + old_uuid = str(self.uuid) +@@ -614,6 +640,7 @@ class Idl(object): raise error.Error(" is not an object", table_updates) @@ -22057,9 +22315,12 @@ index 5850ac7abf..3ca47f96bb 100644 for table_name, table_update in table_updates.items(): table = tables.get(table_name) if not table: -@@ -639,7 +657,9 @@ class Idl(object): +@@ -638,8 +665,12 @@ class Idl(object): + 'is not an object' % (table_name, uuid_string)) ++ self.cooperative_yield() ++ if version == OVSDB_UPDATE2: - if self.__process_update2(table, uuid, row_update): + changes = self.__process_update2(table, uuid, row_update) @@ -22068,7 +22329,7 @@ index 5850ac7abf..3ca47f96bb 100644 self.change_seqno += 1 continue -@@ -652,17 +672,20 @@ class Idl(object): +@@ -652,17 +683,20 @@ class Idl(object): raise error.Error(' missing "old" and ' '"new" members', row_update) @@ -22093,7 +22354,7 @@ index 5850ac7abf..3ca47f96bb 100644 else: # XXX rate-limit vlog.warn("cannot delete missing row %s from table" -@@ -681,29 +704,27 @@ class Idl(object): +@@ -681,29 +715,27 @@ class Idl(object): changed = self.__row_update(table, row, row_update) table.rows[uuid] = row if changed: @@ -22128,7 +22389,7 @@ index 5850ac7abf..3ca47f96bb 100644 else: # XXX rate-limit vlog.warn("cannot delete missing row %s from table %s" -@@ -723,7 +744,7 @@ class Idl(object): +@@ -723,7 +755,7 @@ class Idl(object): if op == ROW_CREATE: table.rows[uuid] = row if changed: @@ -22137,7 +22398,7 @@ index 5850ac7abf..3ca47f96bb 100644 else: op = ROW_UPDATE if not row: -@@ -737,8 +758,8 @@ class Idl(object): +@@ -737,8 +769,8 @@ class Idl(object): if op == ROW_CREATE: table.rows[uuid] = row if changed: @@ -22148,7 +22409,7 @@ index 5850ac7abf..3ca47f96bb 100644 def __check_server_db(self): """Returns True if this is a valid server database, False otherwise.""" -@@ -1458,6 +1479,11 @@ class Transaction(object): +@@ -1458,6 +1490,11 @@ class Transaction(object): if self != self.idl.txn: return self._status @@ -25257,11 +25518,100 @@ index f0ad9f9793..cea48eb527 100644 import errno import sys +diff --git a/tests/tunnel-push-pop-ipv6.at b/tests/tunnel-push-pop-ipv6.at +index 59723e63b8..c7665a1aeb 100644 +--- a/tests/tunnel-push-pop-ipv6.at ++++ b/tests/tunnel-push-pop-ipv6.at +@@ -432,6 +432,42 @@ AT_CHECK([ovs-appctl dpif/dump-flows int-br | grep 'in_port(6081)'], [0], [dnl + tunnel(tun_id=0x7b,ipv6_src=2001:cafe::92,ipv6_dst=2001:cafe::88,geneve({class=0xffff,type=0x80,len=4,0xa/0xf}{class=0xffff,type=0,len=4}),flags(-df-csum+key)),recirc_id(0),in_port(6081),packet_type(ns=0,id=0),eth_type(0x0800),ipv4(frag=no), packets:0, bytes:0, used:never, actions:userspace(pid=0,controller(reason=1,dont_send=0,continuation=0,recirc_id=3,rule_cookie=0,controller_id=0,max_len=65535)) + ]) + ++dnl Receive VXLAN with different MAC and verify that the neigh cache gets updated ++AT_CHECK([ovs-appctl netdev-dummy/receive p0 'aa55aa550000f8bc1244cafe86dd60000000003a11402001cafe0000000000000000000000922001cafe000000000000000000000088c85312b5003abc700c00000300007b00ffffffffffff00000000000008004500001c0001000040117cce7f0000017f0000010035003500080172']) ++ ++ovs-appctl time/warp 1000 ++ovs-appctl time/warp 1000 ++ ++dnl Check VXLAN tunnel push ++AT_CHECK([ovs-ofctl add-flow int-br action=2]) ++AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(2),eth(src=36:b1:ee:7c:01:01,dst=36:b1:ee:7c:01:02),eth_type(0x0800),ipv4(src=1.1.3.88,dst=1.1.3.112,proto=47,tos=0,ttl=64,frag=no)'], [0], [stdout]) ++AT_CHECK([tail -1 stdout], [0], ++ [Datapath actions: clone(tnl_push(tnl_port(4789),header(size=70,type=4,eth(dst=f8:bc:12:44:ca:fe,src=aa:55:aa:55:00:00,dl_type=0x86dd),ipv6(src=2001:cafe::88,dst=2001:cafe::92,label=0,proto=17,tclass=0x0,hlimit=64),udp(src=0,dst=4789,csum=0xffff),vxlan(flags=0x8000000,vni=0x7b)),out_port(100)),1) ++]) ++ ++AT_CHECK([ovs-appctl tnl/arp/show | tail -n+3 | sort], [0], [dnl ++2001:cafe::92 f8:bc:12:44:ca:fe br0 ++2001:cafe::93 f8:bc:12:44:34:b7 br0 ++]) ++ ++dnl Restore and check the cache entries ++AT_CHECK([ovs-appctl netdev-dummy/receive p0 'aa55aa550000f8bc124434b686dd60000000003a11402001cafe0000000000000000000000922001cafe000000000000000000000088c85312b5003abc700c00000300007b00ffffffffffff00000000000008004500001c0001000040117cce7f0000017f0000010035003500080172']) ++ ++ovs-appctl time/warp 1000 ++ovs-appctl time/warp 1000 ++ ++dnl Check VXLAN tunnel push ++AT_CHECK([ovs-ofctl add-flow int-br action=2]) ++AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(2),eth(src=36:b1:ee:7c:01:01,dst=36:b1:ee:7c:01:02),eth_type(0x0800),ipv4(src=1.1.3.88,dst=1.1.3.112,proto=47,tos=0,ttl=64,frag=no)'], [0], [stdout]) ++AT_CHECK([tail -1 stdout], [0], ++ [Datapath actions: clone(tnl_push(tnl_port(4789),header(size=70,type=4,eth(dst=f8:bc:12:44:34:b6,src=aa:55:aa:55:00:00,dl_type=0x86dd),ipv6(src=2001:cafe::88,dst=2001:cafe::92,label=0,proto=17,tclass=0x0,hlimit=64),udp(src=0,dst=4789,csum=0xffff),vxlan(flags=0x8000000,vni=0x7b)),out_port(100)),1) ++]) ++ ++AT_CHECK([ovs-appctl tnl/arp/show | tail -n+3 | sort], [0], [dnl ++2001:cafe::92 f8:bc:12:44:34:b6 br0 ++2001:cafe::93 f8:bc:12:44:34:b7 br0 ++]) ++ + ovs-appctl time/warp 10000 + + AT_CHECK([ovs-vsctl del-port int-br t3 \ diff --git a/tests/tunnel-push-pop.at b/tests/tunnel-push-pop.at -index 48c5de9d19..6364653975 100644 +index 48c5de9d19..6a597488e6 100644 --- a/tests/tunnel-push-pop.at +++ b/tests/tunnel-push-pop.at -@@ -595,6 +595,64 @@ OVS_WAIT_UNTIL([test `ovs-pcap p0.pcap | grep 50540000000a5054000000091235 | wc +@@ -522,6 +522,41 @@ AT_CHECK([ovs-appctl dpif/dump-flows int-br | grep 'in_port(6081)'], [0], [dnl + tunnel(tun_id=0x7b,src=1.1.2.92,dst=1.1.2.88,geneve({class=0xffff,type=0x80,len=4,0xa/0xf}{class=0xffff,type=0,len=4}),flags(-df-csum+key)),recirc_id(0),in_port(6081),packet_type(ns=0,id=0),eth_type(0x0800),ipv4(frag=no), packets:0, bytes:0, used:never, actions:userspace(pid=0,controller(reason=1,dont_send=0,continuation=0,recirc_id=2,rule_cookie=0,controller_id=0,max_len=65535)) + ]) + ++dnl Receive VXLAN with different MAC and verify that the neigh cache gets updated ++AT_CHECK([ovs-appctl netdev-dummy/receive p0 'aa55aa550000f8bc1244cafe08004500004e00010000401173e90101025c01010258c85312b5003a8cd40c00000300007b00ffffffffffff00000000000008004500001c0001000040117cce7f0000017f0000010035003500080172']) ++ ++ovs-appctl time/warp 1000 ++ovs-appctl time/warp 1000 ++ ++dnl Check VXLAN tunnel push ++AT_CHECK([ovs-ofctl add-flow int-br action=2]) ++AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(2),eth(src=36:b1:ee:7c:01:01,dst=36:b1:ee:7c:01:02),eth_type(0x0800),ipv4(src=1.1.3.88,dst=1.1.3.112,proto=47,tos=0,ttl=64,frag=no)'], [0], [stdout]) ++AT_CHECK([tail -1 stdout], [0], ++ [Datapath actions: clone(tnl_push(tnl_port(4789),header(size=50,type=4,eth(dst=f8:bc:12:44:ca:fe,src=aa:55:aa:55:00:00,dl_type=0x0800),ipv4(src=1.1.2.88,dst=1.1.2.92,proto=17,tos=0,ttl=64,frag=0x4000),udp(src=0,dst=4789,csum=0x0),vxlan(flags=0x8000000,vni=0x7b)),out_port(100)),1) ++]) ++ ++AT_CHECK([ovs-appctl tnl/neigh/show | tail -n+3 | sort], [0], [dnl ++1.1.2.92 f8:bc:12:44:ca:fe br0 ++1.1.2.93 f8:bc:12:44:34:b7 br0 ++]) ++ ++dnl Restore and check the cache entries ++AT_CHECK([ovs-appctl netdev-dummy/receive p0 'aa55aa550000f8bc124434b608004500004e00010000401173e90101025c01010258c85312b5003a8cd40c00000300007b00ffffffffffff00000000000008004500001c0001000040117cce7f0000017f0000010035003500080172']) ++ ++ovs-appctl time/warp 1000 ++ovs-appctl time/warp 1000 ++ ++dnl Check VXLAN tunnel push ++AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(2),eth(src=36:b1:ee:7c:01:01,dst=36:b1:ee:7c:01:02),eth_type(0x0800),ipv4(src=1.1.3.88,dst=1.1.3.112,proto=47,tos=0,ttl=64,frag=no)'], [0], [stdout]) ++AT_CHECK([tail -1 stdout], [0], ++ [Datapath actions: clone(tnl_push(tnl_port(4789),header(size=50,type=4,eth(dst=f8:bc:12:44:34:b6,src=aa:55:aa:55:00:00,dl_type=0x0800),ipv4(src=1.1.2.88,dst=1.1.2.92,proto=17,tos=0,ttl=64,frag=0x4000),udp(src=0,dst=4789,csum=0x0),vxlan(flags=0x8000000,vni=0x7b)),out_port(100)),1) ++]) ++ ++AT_CHECK([ovs-appctl tnl/neigh/show | tail -n+3 | sort], [0], [dnl ++1.1.2.92 f8:bc:12:44:34:b6 br0 ++1.1.2.93 f8:bc:12:44:34:b7 br0 ++]) ++ + ovs-appctl time/warp 10000 + + AT_CHECK([ovs-vsctl del-port int-br t3 \ +@@ -595,6 +630,64 @@ OVS_WAIT_UNTIL([test `ovs-pcap p0.pcap | grep 50540000000a5054000000091235 | wc OVS_VSWITCHD_STOP AT_CLEANUP diff --git a/SPECS/openvswitch2.15.spec b/SPECS/openvswitch2.15.spec index beb4dd9..26f546b 100644 --- a/SPECS/openvswitch2.15.spec +++ b/SPECS/openvswitch2.15.spec @@ -57,7 +57,7 @@ Summary: Open vSwitch Group: System Environment/Daemons daemon/database/utilities URL: http://www.openvswitch.org/ Version: 2.15.0 -Release: 55%{?dist} +Release: 56%{?dist} # Nearly all of openvswitch is ASL 2.0. The bugtool is LGPLv2+, and the # lib/sflow*.[ch] files are SISSL @@ -699,6 +699,18 @@ exit 0 %endif %changelog +* Sat Dec 18 2021 Open vSwitch CI - 2.15.0-56 +- Merging upstream branch-2.15 [RH git: 9504acc03d] + Commit list: + 31288dc725 Prepare for 2.15.4. + e4d2df62e6 Set release date for 2.15.3. + b8baa11416 python: Add cooperative_yield() API method to Idl. + 7834abc669 ofproto-dpif-xlate: Snoop ingress packets and update neigh cache if needed. + 833c02daab tnl-neigh-cache: Do not refresh the entry while revalidating. + e2182eca88 tnl-neigh-cache: Include expected array sizes in prototypes. + 566fe43721 tnl-neigh-cache: Read/write expires atomically. + + * Thu Dec 09 2021 Open vSwitch CI - 2.15.0-55 - Merging upstream branch-2.15 [RH git: a1abf356d3] Commit list: