From ef7ad385fd048bc8f612471ea2b79bc667e7bbc8 Mon Sep 17 00:00:00 2001 From: Jenkins Automation Server Date: Feb 12 2021 20:44:00 +0000 Subject: Import openvswitch2.11-2.11.3-68 from Fast DataPath --- diff --git a/SOURCES/openvswitch-2.11.3.patch b/SOURCES/openvswitch-2.11.3.patch index 3531f3b..a927c4a 100644 --- a/SOURCES/openvswitch-2.11.3.patch +++ b/SOURCES/openvswitch-2.11.3.patch @@ -1,5 +1,5 @@ diff --git a/.cirrus.yml b/.cirrus.yml -index eb6af0a719..c6ecd9fd58 100644 +index eb6af0a719..14d0cbec9f 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -2,21 +2,21 @@ freebsd_build_task: @@ -9,7 +9,7 @@ index eb6af0a719..c6ecd9fd58 100644 - image: freebsd-12-0-release-amd64 - image: freebsd-11-2-release-amd64 + image_family: freebsd-12-1-snap -+ image_family: freebsd-11-3-snap ++ image_family: freebsd-11-4-snap cpu: 4 memory: 8G @@ -42,7 +42,7 @@ index de8e76f192..ab0089d554 100755 install_dpdk $DPDK_VER if [ "$CC" = "clang" ]; then diff --git a/AUTHORS.rst b/AUTHORS.rst -index f3237e1828..4dc35cedeb 100644 +index f3237e1828..e1e1e5fa36 100644 --- a/AUTHORS.rst +++ b/AUTHORS.rst @@ -523,6 +523,7 @@ Krishna Miriyala miriyalak@vmware.com @@ -53,6 +53,14 @@ index f3237e1828..4dc35cedeb 100644 Logan Rosen logatronico@gmail.com Luca Falavigna dktrkranz@debian.org Luiz Henrique Ozaki luiz.ozaki@gmail.com +@@ -619,6 +620,7 @@ Ying Chen yingchen@vmware.com + Yongqiang Liu liuyq7809@gmail.com + ZHANG Zhiming zhangzhiming@yunshan.net.cn + Zhangguanghui zhang.guanghui@h3c.com ++Zheng Jingzhou glovejmm@163.com + Ziyou Wang ziyouw@vmware.com + ankur dwivedi ankurengg2003@gmail.com + chen zhang 3zhangchen9211@gmail.com diff --git a/Documentation/faq/configuration.rst b/Documentation/faq/configuration.rst index cb2c6b4eca..ff3b71a5d4 100644 --- a/Documentation/faq/configuration.rst @@ -262,12 +270,16 @@ index 33361ec359..3bd2dc608a 100644 ------------------------------------------- diff --git a/NEWS b/NEWS -index f177d7efc1..cd0c889c10 100644 +index f177d7efc1..87f24b52c2 100644 --- a/NEWS +++ b/NEWS -@@ -1,3 +1,12 @@ -+v2.11.4 - xx xxx xxxx +@@ -1,3 +1,16 @@ ++v2.11.5 - xx xxx xxxx +--------------------- ++ ++v2.11.4 - 30 Jul 2020 ++--------------------- ++ - Bug fixes + - DPDK + * OVS validated with DPDK 18.11.9. Due to this being the latest LTS to + be validated and coupled with the inclusion of fixes for @@ -279,7 +291,7 @@ index f177d7efc1..cd0c889c10 100644 --------------------- - Fix compilation issue with Ubuntu kernel 4.15.60. diff --git a/acinclude.m4 b/acinclude.m4 -index f15b1ff670..43c0e79262 100644 +index f15b1ff670..78d3f2779e 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -172,16 +172,30 @@ AC_DEFUN([OVS_CHECK_LINUX], [ @@ -316,7 +328,18 @@ index f15b1ff670..43c0e79262 100644 AC_COMPILE_IFELSE([ AC_LANG_PROGRAM([#include ], [ -@@ -967,6 +981,8 @@ AC_DEFUN([OVS_CHECK_LINUX_COMPAT], [ +@@ -685,6 +699,10 @@ AC_DEFUN([OVS_CHECK_LINUX_COMPAT], [ + + OVS_GREP_IFELSE([$KSRC/include/linux/random.h], [prandom_u32]) + OVS_GREP_IFELSE([$KSRC/include/linux/random.h], [prandom_u32_max]) ++ OVS_GREP_IFELSE([$KSRC/include/linux/prandom.h], ++ [prandom_u32[[\(]]], ++ [OVS_DEFINE([HAVE_PRANDOM_U32])]) ++ OVS_GREP_IFELSE([$KSRC/include/linux/prandom.h], [prandom_u32_max]) + + OVS_GREP_IFELSE([$KSRC/include/net/rtnetlink.h], [get_link_net]) + OVS_GREP_IFELSE([$KSRC/include/net/rtnetlink.h], [name_assign_type]) +@@ -967,6 +985,8 @@ AC_DEFUN([OVS_CHECK_LINUX_COMPAT], [ [OVS_DEFINE([HAVE_NF_CONNTRACK_IN_TAKES_NF_HOOK_STATE])]) OVS_GREP_IFELSE([$KSRC/include/net/ipv6_frag.h], [IP6_DEFRAG_CONNTRACK_IN], [OVS_DEFINE([HAVE_IPV6_FRAG_H])]) @@ -326,7 +349,7 @@ index f15b1ff670..43c0e79262 100644 if cmp -s datapath/linux/kcompat.h.new \ datapath/linux/kcompat.h >/dev/null 2>&1; then diff --git a/configure.ac b/configure.ac -index 45ff8cb07e..e64c4ceb35 100644 +index 45ff8cb07e..deb5e1a083 100644 --- a/configure.ac +++ b/configure.ac @@ -13,7 +13,7 @@ @@ -334,7 +357,7 @@ index 45ff8cb07e..e64c4ceb35 100644 AC_PREREQ(2.63) -AC_INIT(openvswitch, 2.11.3, bugs@openvswitch.org) -+AC_INIT(openvswitch, 2.11.4, bugs@openvswitch.org) ++AC_INIT(openvswitch, 2.11.5, bugs@openvswitch.org) AC_CONFIG_SRCDIR([datapath/datapath.c]) AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_AUX_DIR([build-aux]) @@ -346,6 +369,180 @@ index 45ff8cb07e..e64c4ceb35 100644 OVS_CHECK_LINUX_TC OVS_CHECK_DPDK OVS_CHECK_PRAGMA_MESSAGE +diff --git a/datapath-windows/ovsext/Actions.c b/datapath-windows/ovsext/Actions.c +index 5c9b5c3a0c..ced1d2957d 100644 +--- a/datapath-windows/ovsext/Actions.c ++++ b/datapath-windows/ovsext/Actions.c +@@ -1259,6 +1259,7 @@ OvsActionMplsPush(OvsForwardingContext *ovsFwdCtx, + */ + static __inline NDIS_STATUS + OvsUpdateEthHeader(OvsForwardingContext *ovsFwdCtx, ++ OvsFlowKey *key, + const struct ovs_key_ethernet *ethAttr) + { + PNET_BUFFER curNb; +@@ -1285,9 +1286,11 @@ OvsUpdateEthHeader(OvsForwardingContext *ovsFwdCtx, + } + ethHdr = (EthHdr *)(bufferStart + NET_BUFFER_CURRENT_MDL_OFFSET(curNb)); + +- RtlCopyMemory(ethHdr->Destination, ethAttr->eth_dst, +- sizeof ethHdr->Destination); +- RtlCopyMemory(ethHdr->Source, ethAttr->eth_src, sizeof ethHdr->Source); ++ RtlCopyMemory(ethHdr->Destination, ethAttr->eth_dst, ETH_ADDR_LENGTH); ++ RtlCopyMemory(ethHdr->Source, ethAttr->eth_src, ETH_ADDR_LENGTH); ++ /* Update l2 flow key */ ++ RtlCopyMemory(key->l2.dlDst, ethAttr->eth_dst, ETH_ADDR_LENGTH); ++ RtlCopyMemory(key->l2.dlSrc, ethAttr->eth_src, ETH_ADDR_LENGTH); + + return NDIS_STATUS_SUCCESS; + } +@@ -1376,6 +1379,7 @@ PUINT8 OvsGetHeaderBySize(OvsForwardingContext *ovsFwdCtx, + */ + NDIS_STATUS + OvsUpdateUdpPorts(OvsForwardingContext *ovsFwdCtx, ++ OvsFlowKey *key, + const struct ovs_key_udp *udpAttr) + { + PUINT8 bufferStart; +@@ -1400,15 +1404,19 @@ OvsUpdateUdpPorts(OvsForwardingContext *ovsFwdCtx, + udpHdr->check = ChecksumUpdate16(udpHdr->check, udpHdr->source, + udpAttr->udp_src); + udpHdr->source = udpAttr->udp_src; ++ key->ipKey.l4.tpSrc = udpAttr->udp_src; + } + if (udpHdr->dest != udpAttr->udp_dst) { + udpHdr->check = ChecksumUpdate16(udpHdr->check, udpHdr->dest, + udpAttr->udp_dst); + udpHdr->dest = udpAttr->udp_dst; ++ key->ipKey.l4.tpDst = udpAttr->udp_dst; + } + } else { + udpHdr->source = udpAttr->udp_src; ++ key->ipKey.l4.tpSrc = udpAttr->udp_src; + udpHdr->dest = udpAttr->udp_dst; ++ key->ipKey.l4.tpDst = udpAttr->udp_dst; + } + + return NDIS_STATUS_SUCCESS; +@@ -1423,6 +1431,7 @@ OvsUpdateUdpPorts(OvsForwardingContext *ovsFwdCtx, + */ + NDIS_STATUS + OvsUpdateTcpPorts(OvsForwardingContext *ovsFwdCtx, ++ OvsFlowKey *key, + const struct ovs_key_tcp *tcpAttr) + { + PUINT8 bufferStart; +@@ -1447,11 +1456,13 @@ OvsUpdateTcpPorts(OvsForwardingContext *ovsFwdCtx, + tcpHdr->check = ChecksumUpdate16(tcpHdr->check, tcpHdr->source, + tcpAttr->tcp_src); + tcpHdr->source = tcpAttr->tcp_src; ++ key->ipKey.l4.tpSrc = tcpAttr->tcp_src; + } + if (tcpHdr->dest != tcpAttr->tcp_dst) { + tcpHdr->check = ChecksumUpdate16(tcpHdr->check, tcpHdr->dest, + tcpAttr->tcp_dst); + tcpHdr->dest = tcpAttr->tcp_dst; ++ key->ipKey.l4.tpDst = tcpAttr->tcp_dst; + } + + return NDIS_STATUS_SUCCESS; +@@ -1579,6 +1590,7 @@ OvsUpdateAddressAndPort(OvsForwardingContext *ovsFwdCtx, + */ + NDIS_STATUS + OvsUpdateIPv4Header(OvsForwardingContext *ovsFwdCtx, ++ OvsFlowKey *key, + const struct ovs_key_ipv4 *ipAttr) + { + PUINT8 bufferStart; +@@ -1632,6 +1644,7 @@ OvsUpdateIPv4Header(OvsForwardingContext *ovsFwdCtx, + ipAttr->ipv4_src); + } + ipHdr->saddr = ipAttr->ipv4_src; ++ key->ipKey.nwSrc = ipAttr->ipv4_src; + } + if (ipHdr->daddr != ipAttr->ipv4_dst) { + if (tcpHdr) { +@@ -1647,6 +1660,7 @@ OvsUpdateIPv4Header(OvsForwardingContext *ovsFwdCtx, + ipAttr->ipv4_dst); + } + ipHdr->daddr = ipAttr->ipv4_dst; ++ key->ipKey.nwDst = ipAttr->ipv4_dst; + } + if (ipHdr->protocol != ipAttr->ipv4_proto) { + UINT16 oldProto = (ipHdr->protocol << 16) & 0xff00; +@@ -1661,6 +1675,7 @@ OvsUpdateIPv4Header(OvsForwardingContext *ovsFwdCtx, + ipHdr->check = ChecksumUpdate16(ipHdr->check, oldProto, newProto); + } + ipHdr->protocol = ipAttr->ipv4_proto; ++ key->ipKey.nwProto = ipAttr->ipv4_proto; + } + if (ipHdr->ttl != ipAttr->ipv4_ttl) { + UINT16 oldTtl = (ipHdr->ttl) & 0xff; +@@ -1669,6 +1684,7 @@ OvsUpdateIPv4Header(OvsForwardingContext *ovsFwdCtx, + ipHdr->check = ChecksumUpdate16(ipHdr->check, oldTtl, newTtl); + } + ipHdr->ttl = ipAttr->ipv4_ttl; ++ key->ipKey.nwTtl = ipAttr->ipv4_ttl; + } + + return NDIS_STATUS_SUCCESS; +@@ -1691,12 +1707,12 @@ OvsExecuteSetAction(OvsForwardingContext *ovsFwdCtx, + + switch (type) { + case OVS_KEY_ATTR_ETHERNET: +- status = OvsUpdateEthHeader(ovsFwdCtx, ++ status = OvsUpdateEthHeader(ovsFwdCtx, key, + NlAttrGetUnspec(a, sizeof(struct ovs_key_ethernet))); + break; + + case OVS_KEY_ATTR_IPV4: +- status = OvsUpdateIPv4Header(ovsFwdCtx, ++ status = OvsUpdateIPv4Header(ovsFwdCtx, key, + NlAttrGetUnspec(a, sizeof(struct ovs_key_ipv4))); + break; + +@@ -1709,16 +1725,17 @@ OvsExecuteSetAction(OvsForwardingContext *ovsFwdCtx, + status = SUCCEEDED(convertStatus) ? NDIS_STATUS_SUCCESS : NDIS_STATUS_FAILURE; + ASSERT(status == NDIS_STATUS_SUCCESS); + RtlCopyMemory(&ovsFwdCtx->tunKey, &tunKey, sizeof ovsFwdCtx->tunKey); ++ RtlCopyMemory(&key->tunKey, &tunKey, sizeof key->tunKey); + break; + } + + case OVS_KEY_ATTR_UDP: +- status = OvsUpdateUdpPorts(ovsFwdCtx, ++ status = OvsUpdateUdpPorts(ovsFwdCtx, key, + NlAttrGetUnspec(a, sizeof(struct ovs_key_udp))); + break; + + case OVS_KEY_ATTR_TCP: +- status = OvsUpdateTcpPorts(ovsFwdCtx, ++ status = OvsUpdateTcpPorts(ovsFwdCtx, key, + NlAttrGetUnspec(a, sizeof(struct ovs_key_tcp))); + break; + +diff --git a/datapath-windows/ovsext/Actions.h b/datapath-windows/ovsext/Actions.h +index fd050d5dd8..bc12e1166d 100644 +--- a/datapath-windows/ovsext/Actions.h ++++ b/datapath-windows/ovsext/Actions.h +@@ -115,14 +115,17 @@ PUINT8 OvsGetHeaderBySize(OvsForwardingContext *ovsFwdCtx, + + NDIS_STATUS + OvsUpdateUdpPorts(OvsForwardingContext *ovsFwdCtx, ++ OvsFlowKey *key, + const struct ovs_key_udp *udpAttr); + + NDIS_STATUS + OvsUpdateTcpPorts(OvsForwardingContext *ovsFwdCtx, ++ OvsFlowKey *key, + const struct ovs_key_tcp *tcpAttr); + + NDIS_STATUS + OvsUpdateIPv4Header(OvsForwardingContext *ovsFwdCtx, ++ OvsFlowKey *key, + const struct ovs_key_ipv4 *ipAttr); + + NDIS_STATUS diff --git a/datapath/linux/compat/include/linux/openvswitch.h b/datapath/linux/compat/include/linux/openvswitch.h index 9b087f1b06..3369c8630d 100644 --- a/datapath/linux/compat/include/linux/openvswitch.h @@ -471,15 +668,21 @@ index d16e60fbfe..f1c8ba7cdc 100644 if (skb->protocol == htons(ETH_P_IP)) { if (!skb_is_gso(skb) && diff --git a/debian/changelog b/debian/changelog -index d08cfbfd91..56471d417a 100644 +index d08cfbfd91..851cca9cb6 100644 --- a/debian/changelog +++ b/debian/changelog -@@ -1,3 +1,9 @@ +@@ -1,3 +1,15 @@ ++openvswitch (2.11.5-1) unstable; urgency=low ++ [ Open vSwitch team ] ++ * New upstream version ++ ++ -- Open vSwitch team Thu, 30 Jul 2020 00:25:16 +0200 ++ +openvswitch (2.11.4-1) unstable; urgency=low + [ Open vSwitch team ] + * New upstream version + -+ -- Open vSwitch team Fri, 06 Sep 2019 14:31:36 -0700 ++ -- Open vSwitch team Thu, 30 Jul 2020 00:25:16 +0200 + openvswitch (2.11.3-1) unstable; urgency=low [ Open vSwitch team ] @@ -14096,7 +14299,7 @@ index b1ff495ff1..49fbb1deaf 100644 lib/netdev-linux.h \ lib/netdev-tc-offloads.c \ diff --git a/lib/classifier.c b/lib/classifier.c -index edb40c89c6..cb136f6529 100644 +index edb40c89c6..4272c45156 100644 --- a/lib/classifier.c +++ b/lib/classifier.c @@ -393,7 +393,9 @@ classifier_set_prefix_fields(struct classifier *cls, @@ -14135,7 +14338,15 @@ index edb40c89c6..cb136f6529 100644 ctx->lookup_done = false; } -@@ -1513,8 +1513,10 @@ insert_subtable(struct classifier *cls, const struct minimask *mask) +@@ -1370,6 +1370,7 @@ cls_cursor_start(const struct classifier *cls, const struct cls_rule *target, + struct cls_cursor cursor; + struct cls_subtable *subtable; + ++ memset(&cursor, 0x0, sizeof cursor); + cursor.cls = cls; + cursor.target = target && !cls_rule_is_catchall(target) ? target : NULL; + cursor.version = version; +@@ -1513,8 +1514,10 @@ insert_subtable(struct classifier *cls, const struct minimask *mask) *CONST_CAST(uint8_t *, &subtable->n_indices) = index; for (i = 0; i < cls->n_tries; i++) { @@ -14148,7 +14359,7 @@ index edb40c89c6..cb136f6529 100644 } /* Ports trie. */ -@@ -1568,11 +1570,17 @@ check_tries(struct trie_ctx trie_ctx[CLS_MAX_TRIES], unsigned int n_tries, +@@ -1568,11 +1571,17 @@ check_tries(struct trie_ctx trie_ctx[CLS_MAX_TRIES], unsigned int n_tries, * fields using the prefix tries. The trie checks are done only as * needed to avoid folding in additional bits to the wildcards mask. */ for (j = 0; j < n_tries; j++) { @@ -14170,7 +14381,7 @@ index edb40c89c6..cb136f6529 100644 /* On-demand trie lookup. */ if (!ctx->lookup_done) { -@@ -1594,14 +1602,16 @@ check_tries(struct trie_ctx trie_ctx[CLS_MAX_TRIES], unsigned int n_tries, +@@ -1594,14 +1603,16 @@ check_tries(struct trie_ctx trie_ctx[CLS_MAX_TRIES], unsigned int n_tries, * than this subtable would otherwise. */ if (ctx->maskbits <= field_plen[j]) { /* Unwildcard the bits and skip the rest. */ @@ -14189,7 +14400,7 @@ index edb40c89c6..cb136f6529 100644 return true; } } -@@ -1994,12 +2004,12 @@ static unsigned int +@@ -1994,12 +2005,12 @@ static unsigned int trie_lookup(const struct cls_trie *trie, const struct flow *flow, union trie_prefix *plens) { @@ -14204,7 +14415,7 @@ index edb40c89c6..cb136f6529 100644 return trie_lookup_value(&trie->root, &((ovs_be32 *)flow)[mf->flow_be32ofs], &plens->be32, mf->n_bits); -@@ -2046,8 +2056,9 @@ minimask_get_prefix_len(const struct minimask *minimask, +@@ -2046,8 +2057,9 @@ minimask_get_prefix_len(const struct minimask *minimask, * happened to be zeros. */ static const ovs_be32 * @@ -14215,7 +14426,7 @@ index edb40c89c6..cb136f6529 100644 size_t u64_ofs = mf->flow_be32ofs / 2; return (OVS_FORCE const ovs_be32 *)miniflow_get__(match->flow, u64_ofs) -@@ -2061,7 +2072,7 @@ static void +@@ -2061,7 +2073,7 @@ static void trie_insert(struct cls_trie *trie, const struct cls_rule *rule, int mlen) { trie_insert_prefix(&trie->root, @@ -14224,7 +14435,7 @@ index edb40c89c6..cb136f6529 100644 } static void -@@ -2116,7 +2127,7 @@ static void +@@ -2116,7 +2128,7 @@ static void trie_remove(struct cls_trie *trie, const struct cls_rule *rule, int mlen) { trie_remove_prefix(&trie->root, @@ -14422,6 +14633,19 @@ index ea9486b735..2d050b627e 100644 ctx->hash = conn_key_hash(&ctx->key, ct->hash_basis); return true; } +diff --git a/lib/dpctl.c b/lib/dpctl.c +index bea9f87e86..8e37a29b42 100644 +--- a/lib/dpctl.c ++++ b/lib/dpctl.c +@@ -999,7 +999,7 @@ dpctl_dump_flows(int argc, const char *argv[], struct dpctl_params *dpctl_p) + memset(&dump_types, 0, sizeof dump_types); + error = populate_dump_types(types_list, &dump_types, dpctl_p); + if (error) { +- goto out_free; ++ goto out_dpifclose; + } + determine_dpif_flow_dump_types(&dump_types, &dpif_dump_types); + diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c index 5dae9e1e76..62f8b1bb6d 100644 --- a/lib/dpif-netdev.c @@ -14949,8 +15173,35 @@ index bc48d63049..a131adc918 100644 case MFF_ETH_DST: match_set_dl_dst_masked(match, value->mac, mask->mac); break; +diff --git a/lib/meta-flow.xml b/lib/meta-flow.xml +index 0b5c1d0087..e1b32d6ab4 100644 +--- a/lib/meta-flow.xml ++++ b/lib/meta-flow.xml +@@ -3835,18 +3835,18 @@ r r c c c. + +
    +
  • +- When is 1, there is another MPLS label ++ When is 0, there is another MPLS label + following this one, so the Ethertype passed to pop_mpls + should be an MPLS Ethertype. For example: table=0, +- dl_type=0x8847, mpls_bos=1, actions=pop_mpls:0x8847, ++ dl_type=0x8847, mpls_bos=0, actions=pop_mpls:0x8847, + goto_table:1 +
  • + +
  • +- When is 0, this MPLS label is the last one, ++ When is 1, this MPLS label is the last one, + so the Ethertype passed to pop_mpls should be a non-MPLS + Ethertype such as IPv4. For example: table=1, dl_type=0x8847, +- mpls_bos=0, actions=pop_mpls:0x0800, goto_table:2 ++ mpls_bos=1, actions=pop_mpls:0x0800, goto_table:2 +
  • +
+ diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c -index 20be56bc6c..7d2ac99fba 100644 +index 20be56bc6c..0021867e92 100644 --- a/lib/netdev-dpdk.c +++ b/lib/netdev-dpdk.c @@ -41,11 +41,13 @@ @@ -15764,17 +16015,28 @@ index 20be56bc6c..7d2ac99fba 100644 dev->started = false; err = netdev_dpdk_mempool_configure(dev); -@@ -4580,7 +4774,8 @@ netdev_dpdk_add_rte_flow_offload(struct netdev *netdev, +@@ -4580,8 +4774,18 @@ netdev_dpdk_add_rte_flow_offload(struct netdev *netdev, struct rte_flow_item_eth eth_mask; memset(ð_spec, 0, sizeof(eth_spec)); memset(ð_mask, 0, sizeof(eth_mask)); - if (!eth_addr_is_zero(match->wc.masks.dl_src) || -+ if (match->wc.masks.dl_type || -+ !eth_addr_is_zero(match->wc.masks.dl_src) || - !eth_addr_is_zero(match->wc.masks.dl_dst)) { +- !eth_addr_is_zero(match->wc.masks.dl_dst)) { ++ if (match->wc.masks.dl_type == OVS_BE16_MAX && is_ip_any(&match->flow) ++ && eth_addr_is_zero(match->wc.masks.dl_dst) ++ && eth_addr_is_zero(match->wc.masks.dl_src)) { ++ /* ++ * This is a temporary work around to fix ethernet pattern for partial ++ * hardware offload for X710 devices. This fix will be reverted once ++ * the issue is fixed within the i40e PMD driver. ++ */ ++ add_flow_pattern(&patterns, RTE_FLOW_ITEM_TYPE_ETH, NULL, NULL); ++ } else if (match->wc.masks.dl_type || ++ !eth_addr_is_zero(match->wc.masks.dl_src) || ++ !eth_addr_is_zero(match->wc.masks.dl_dst)) { rte_memcpy(ð_spec.dst, &match->flow.dl_dst, sizeof(eth_spec.dst)); rte_memcpy(ð_spec.src, &match->flow.dl_src, sizeof(eth_spec.src)); -@@ -4594,15 +4789,6 @@ netdev_dpdk_add_rte_flow_offload(struct netdev *netdev, + eth_spec.type = match->flow.dl_type; +@@ -4594,15 +4798,6 @@ netdev_dpdk_add_rte_flow_offload(struct netdev *netdev, add_flow_pattern(&patterns, RTE_FLOW_ITEM_TYPE_ETH, ð_spec, ð_mask); @@ -15790,7 +16052,7 @@ index 20be56bc6c..7d2ac99fba 100644 } /* VLAN */ -@@ -5020,6 +5206,7 @@ static const struct netdev_class dpdk_vhost_class = { +@@ -5020,6 +5215,7 @@ static const struct netdev_class dpdk_vhost_class = { .send = netdev_dpdk_vhost_send, .get_carrier = netdev_dpdk_vhost_get_carrier, .get_stats = netdev_dpdk_vhost_get_stats, @@ -15798,7 +16060,7 @@ index 20be56bc6c..7d2ac99fba 100644 .get_status = netdev_dpdk_vhost_user_get_status, .reconfigure = netdev_dpdk_vhost_reconfigure, .rxq_recv = netdev_dpdk_vhost_rxq_recv -@@ -5034,6 +5221,7 @@ static const struct netdev_class dpdk_vhost_client_class = { +@@ -5034,6 +5230,7 @@ static const struct netdev_class dpdk_vhost_client_class = { .send = netdev_dpdk_vhost_send, .get_carrier = netdev_dpdk_vhost_get_carrier, .get_stats = netdev_dpdk_vhost_get_stats, @@ -16803,6 +17065,19 @@ index ebc8120f0f..cde1e925ba 100644 free(cbset); } +diff --git a/lib/ovs-router.c b/lib/ovs-router.c +index bfb2b7071b..09b81c6e5a 100644 +--- a/lib/ovs-router.c ++++ b/lib/ovs-router.c +@@ -505,7 +505,7 @@ ovs_router_flush(void) + ovs_mutex_lock(&mutex); + classifier_defer(&cls); + CLS_FOR_EACH(rt, cr, &cls) { +- if (rt->priority == rt->plen) { ++ if (rt->priority == rt->plen || rt->local) { + rt_entry_delete__(&rt->cr); + } + } diff --git a/lib/ovsdb-idl.c b/lib/ovsdb-idl.c index 4c9862b88b..ebb5b50f3c 100644 --- a/lib/ovsdb-idl.c @@ -18531,10 +18806,39 @@ index c15be4b3e5..a98057e42a 100644 if SSL: # Register SSL only if the OpenSSL module is available diff --git a/rhel/openvswitch-fedora.spec.in b/rhel/openvswitch-fedora.spec.in -index 4ece47a54d..0a08929cd8 100644 +index 4ece47a54d..ba862e25e1 100644 --- a/rhel/openvswitch-fedora.spec.in +++ b/rhel/openvswitch-fedora.spec.in -@@ -380,7 +380,7 @@ fi +@@ -361,18 +361,19 @@ exit 0 + + %post + if [ $1 -eq 1 ]; then +- sed -i 's:^#OVS_USER_ID=:OVS_USER_ID=:' /etc/sysconfig/openvswitch +- sed -i 's:\(.*su\).*:\1 openvswitch openvswitch:' %{_sysconfdir}/logrotate.d/openvswitch +- + %if %{with dpdk} +- sed -i \ +- 's@OVS_USER_ID="openvswitch:openvswitch"@OVS_USER_ID="openvswitch:hugetlbfs"@'\ +- /etc/sysconfig/openvswitch ++ %define gname hugetlbfs ++%else ++ %define gname openvswitch + %endif ++ sed -i \ ++ 's@^#OVS_USER_ID="openvswitch:openvswitch"@OVS_USER_ID="openvswitch:%{gname}"@'\ ++ %{_sysconfdir}/sysconfig/openvswitch ++ sed -i 's:\(.*su\).*:\1 openvswitch %{gname}:' %{_sysconfdir}/logrotate.d/openvswitch + +- # In the case of upgrade, this is not needed. +- chown -R openvswitch:openvswitch /etc/openvswitch +- chown -R openvswitch:openvswitch /var/log/openvswitch ++ # In the case of upgrade, this is not needed ++ chown -R openvswitch:openvswitch %{_sysconfdir}/openvswitch ++ chown -R openvswitch:%{gname} %{_localstatedir}/log/openvswitch + fi + + %if 0%{?systemd_post:1} +@@ -380,7 +381,7 @@ fi %else # Package install, not upgrade if [ $1 -eq 1 ]; then @@ -18613,7 +18917,7 @@ index 9364454020..c467d02db9 100644 # Uncomment and set the OVS User/Group value diff --git a/tests/automake.mk b/tests/automake.mk -index 92d56b29de..a4da75ebe0 100644 +index 92d56b29de..875f23f6a0 100644 --- a/tests/automake.mk +++ b/tests/automake.mk @@ -108,7 +108,8 @@ TESTSUITE_AT = \ @@ -18626,6 +18930,16 @@ index 92d56b29de..a4da75ebe0 100644 EXTRA_DIST += $(FUZZ_REGRESSION_TESTS) FUZZ_REGRESSION_TESTS = \ +@@ -150,7 +151,8 @@ SYSTEM_USERSPACE_TESTSUITE_AT = \ + tests/system-userspace-testsuite.at \ + tests/system-ovn.at \ + tests/system-userspace-macros.at \ +- tests/system-userspace-packet-type-aware.at ++ tests/system-userspace-packet-type-aware.at \ ++ tests/system-route.at + + SYSTEM_TESTSUITE_AT = \ + tests/system-common-macros.at \ diff --git a/tests/dpif-netdev.at b/tests/dpif-netdev.at index 6915d43ba1..9295f5a0ec 100644 --- a/tests/dpif-netdev.at @@ -19344,6 +19658,40 @@ index 81f03d28b0..b128c4f0fb 100644 +]) + +AT_CLEANUP +diff --git a/tests/system-route.at b/tests/system-route.at +new file mode 100644 +index 0000000000..1714273e35 +--- /dev/null ++++ b/tests/system-route.at +@@ -0,0 +1,28 @@ ++AT_BANNER([system-route]) ++ ++dnl Add an interface, add/del ip address, check that OVS catches route updates. ++AT_SETUP([ovs-route - add/remove system route]) ++AT_KEYWORDS([route]) ++OVS_TRAFFIC_VSWITCHD_START() ++ ++dnl Create tap port. ++AT_CHECK([ip tuntap add name p1-route mode tap]) ++AT_CHECK([ip link set p1-route up]) ++on_exit 'ip link del p1-route' ++ ++dnl Add ip address. ++AT_CHECK([ip addr add 10.0.0.17/24 dev p1-route], [0], [stdout]) ++ ++dnl Check that OVS catches route updates. ++OVS_WAIT_UNTIL([ovs-appctl ovs/route/show | grep 'p1-route' | sort], [0], [dnl ++Cached: 10.0.0.17/24 dev p1-route SRC 10.0.0.17 ++Cached: 10.0.0.17/32 dev p1-route SRC 10.0.0.17 local ++]) ++ ++dnl Delete ip address. ++AT_CHECK([ip addr del 10.0.0.17/24 dev p1-route], [0], [stdout]) ++dnl Check that routes was removed from OVS. ++OVS_WAIT_UNTIL([test `ovs-appctl ovs/route/show | grep -c 'p1-route'` -eq 0 ]) ++ ++OVS_TRAFFIC_VSWITCHD_STOP ++AT_CLEANUP diff --git a/tests/system-traffic.at b/tests/system-traffic.at index e34f7a4fbd..be702ae597 100644 --- a/tests/system-traffic.at @@ -19471,6 +19819,15 @@ index 24a7698ab4..c2246316de 100644 ]) ### Test L3 forwarding flows +diff --git a/tests/system-userspace-testsuite.at b/tests/system-userspace-testsuite.at +index c0aaa606d0..4815d478ec 100644 +--- a/tests/system-userspace-testsuite.at ++++ b/tests/system-userspace-testsuite.at +@@ -27,3 +27,4 @@ m4_include([tests/system-layer3-tunnels.at]) + m4_include([tests/system-ovn.at]) + m4_include([tests/system-interface.at]) + m4_include([tests/system-userspace-packet-type-aware.at]) ++m4_include([tests/system-route.at]) diff --git a/tests/test-classifier.c b/tests/test-classifier.c index 6d53d016de..2d98fad485 100644 --- a/tests/test-classifier.c @@ -19735,6 +20092,19 @@ index 9c2a092ea7..8c5cd70327 100644 DB_FILE=$dbdir/conf.db DB_SOCK=$rundir/db.sock +diff --git a/utilities/ovs-dpctl-top.in b/utilities/ovs-dpctl-top.in +index 7f0f1f8c22..fcb178be64 100755 +--- a/utilities/ovs-dpctl-top.in ++++ b/utilities/ovs-dpctl-top.in +@@ -479,6 +479,8 @@ def elements_to_dict(elements): + """ Convert line to a hierarchy of dictionaries. """ + result = {} + for element in elements: ++ if (element == "eth()"): ++ continue + match = FIELDS_CMPND.search(element) + if (match): + key = match.group(1) diff --git a/utilities/ovs-tcpundump.in b/utilities/ovs-tcpundump.in index c298700624..b729276a99 100755 --- a/utilities/ovs-tcpundump.in diff --git a/SPECS/openvswitch2.11.spec b/SPECS/openvswitch2.11.spec index 54065a2..4e1bf81 100644 --- a/SPECS/openvswitch2.11.spec +++ b/SPECS/openvswitch2.11.spec @@ -67,7 +67,7 @@ Summary: Open vSwitch Group: System Environment/Daemons daemon/database/utilities URL: http://www.openvswitch.org/ Version: 2.11.3 -Release: 60%{?dist} +Release: 68%{?dist} # Nearly all of openvswitch is ASL 2.0. The bugtool is LGPLv2+, and the # lib/sflow*.[ch] files are SISSL @@ -746,6 +746,38 @@ exit 0 %changelog +* Wed Sep 16 2020 Open vSwitch CI - 2.11.3-68 +- Merging upstream branch-2.11 + [a43432762b2e12773cf207bb659b2e181dc269ed] + +* Thu Aug 27 2020 Open vSwitch CI - 2.11.3-67 +- Merging upstream branch-2.11 + [dd4802fb0c2e82bda1feee39ad3a64199fe5a57d] + +* Tue Aug 18 2020 Flavio Leitner - 2.11.3-66 +- pkgtool: Use git-branch to retrieve the name. + [7240e67479909550e28239a8aa26c3ee0cf517f6] + +* Mon Aug 17 2020 Open vSwitch CI - 2.11.3-65 +- Merging upstream branch-2.11 + [b16596dda3aa9773812e46a4c17f8089a0a89f78] + +* Wed Aug 12 2020 Open vSwitch CI - 2.11.3-64 +- Merging upstream branch-2.11 + [7b48e669229bc1db642607c41c26e8c59be5989b] + +* Tue Aug 11 2020 Open vSwitch CI - 2.11.3-63 +- Merging upstream branch-2.11 + [9ae7cb0a10cda8a48cc856d4ff0cf585a5bfdf33] + +* Sun Aug 09 2020 Flavio Leitner - 2.11.3-62 +- redhat: Add support to custom RPM releases. + [570434c6c20efc6a6b027c6f05a2f68d3bd1af83] + +* Sun Aug 09 2020 Flavio Leitner - 2.11.3-61 +- pkgtool: Use OVS static version in package NVR. + [2ed240a84c35f4906a0fd806a5ac1ca678b24603] + * Fri Jul 17 2020 Flavio Leitner - 2.11.3-60 - Merge branch 'fast-datapath-rhel-7' into fast-datapath-rhel-8 [a2d9792f8cea55348a9f263c4f891298ffcb2462]