From 07ea17d188ca2739d48daa7e0c00b3f32db4c26d Mon Sep 17 00:00:00 2001 From: Open vSwitch CI Date: Jun 28 2022 22:45:24 +0000 Subject: Import openvswitch2.13-2.13.0-190 from Fast DataPath --- diff --git a/SOURCES/openvswitch-2.13.0.patch b/SOURCES/openvswitch-2.13.0.patch index 5b14184..48975dd 100644 --- a/SOURCES/openvswitch-2.13.0.patch +++ b/SOURCES/openvswitch-2.13.0.patch @@ -84293,10 +84293,27 @@ index 74f747fcdc..dfeb2a8002 100644 } if (pos > tlv + tlv_size) { diff --git a/lib/lldp/lldpd.c b/lib/lldp/lldpd.c -index 19e9305266..34738535db 100644 +index 19e9305266..c377204b3d 100644 --- a/lib/lldp/lldpd.c +++ b/lib/lldp/lldpd.c -@@ -244,6 +244,7 @@ lldpd_decode(struct lldpd *cfg, char *frame, int s, +@@ -140,13 +140,9 @@ lldpd_cleanup(struct lldpd *cfg) + VLOG_DBG("cleanup all ports"); + + LIST_FOR_EACH_SAFE (hw, hw_next, h_entries, &cfg->g_hardware) { +- if (!hw->h_flags) { +- ovs_list_remove(&hw->h_entries); +- lldpd_remote_cleanup(hw, NULL, true); +- lldpd_hardware_cleanup(cfg, hw); +- } else { +- lldpd_remote_cleanup(hw, NULL, false); +- } ++ ovs_list_remove(&hw->h_entries); ++ lldpd_remote_cleanup(hw, NULL, true); ++ lldpd_hardware_cleanup(cfg, hw); + } + + VLOG_DBG("cleanup all chassis"); +@@ -244,6 +240,7 @@ lldpd_decode(struct lldpd *cfg, char *frame, int s, if (s < sizeof(struct eth_header) + 4) { /* Too short, just discard it */ @@ -84304,7 +84321,7 @@ index 19e9305266..34738535db 100644 return; } -@@ -284,6 +285,7 @@ lldpd_decode(struct lldpd *cfg, char *frame, int s, +@@ -284,6 +281,7 @@ lldpd_decode(struct lldpd *cfg, char *frame, int s, VLOG_DBG("function for %s protocol did not " "decode this frame", cfg->g_protocols[i].name); @@ -85554,7 +85571,7 @@ index 42d3335f0f..97320a4dba 100644 } else { a = attrs[OVS_CHECK_PKT_LEN_ATTR_ACTIONS_IF_LESS_EQUAL]; diff --git a/lib/odp-util.c b/lib/odp-util.c -index 746d1e97d4..fa6287f6db 100644 +index 746d1e97d4..7751aba143 100644 --- a/lib/odp-util.c +++ b/lib/odp-util.c @@ -390,7 +390,8 @@ format_odp_push_nsh_action(struct ds *ds, @@ -85730,7 +85747,76 @@ index 746d1e97d4..fa6287f6db 100644 } if (is_mask && expected_bit != OVS_KEY_ATTR_UNSPEC) { if ((flow->tp_src || flow->tp_dst) && flow->nw_proto != 0xff) { -@@ -7416,15 +7432,18 @@ odp_key_fitness_to_string(enum odp_key_fitness fitness) +@@ -7069,6 +7085,14 @@ parse_8021q_onward(const struct nlattr *attrs[OVS_KEY_ATTR_MAX + 1], + } + expected_attrs = 0; + ++ /* For OVS to be backward compatible with newer datapath ++ * implementations, we should ignore out of range attributes. */ ++ if (out_of_range_attr) { ++ VLOG_DBG("Flow key decode found unknown OVS_KEY_ATTR, %d", ++ out_of_range_attr); ++ out_of_range_attr = 0; ++ } ++ + if (!parse_ethertype(attrs, present_attrs, &expected_attrs, + flow, src_flow, errorp)) { + return ODP_FIT_ERROR; +@@ -7118,6 +7142,14 @@ odp_flow_key_to_flow__(const struct nlattr *key, size_t key_len, + } + expected_attrs = 0; + ++ /* For OVS to be backward compatible with newer datapath implementations, ++ * we should ignore out of range attributes. */ ++ if (out_of_range_attr) { ++ VLOG_DBG("Flow key decode found unknown OVS_KEY_ATTR, %d", ++ out_of_range_attr); ++ out_of_range_attr = 0; ++ } ++ + /* Metadata. */ + if (present_attrs & (UINT64_C(1) << OVS_KEY_ATTR_RECIRC_ID)) { + flow->recirc_id = nl_attr_get_u32(attrs[OVS_KEY_ATTR_RECIRC_ID]); +@@ -7352,10 +7384,12 @@ parse_key_and_mask_to_match(const struct nlattr *key, size_t key_len, + + fitness = odp_flow_key_to_flow(key, key_len, &match->flow, NULL); + if (fitness) { +- /* This should not happen: it indicates that +- * odp_flow_key_from_flow() and odp_flow_key_to_flow() disagree on +- * the acceptable form of a flow. Log the problem as an error, +- * with enough details to enable debugging. */ ++ /* This will happen when the odp_flow_key_to_flow() function can't ++ * parse the netlink message to a match structure. It will return ++ * ODP_FIT_TOO_LITTLE if there is not enough information to parse the ++ * content successfully, ODP_FIT_TOO_MUCH if there is too much netlink ++ * data and we do not know how to safely ignore it, and ODP_FIT_ERROR ++ * in any other case. */ + static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(1, 5); + + if (!VLOG_DROP_ERR(&rl)) { +@@ -7363,7 +7397,8 @@ parse_key_and_mask_to_match(const struct nlattr *key, size_t key_len, + + ds_init(&s); + odp_flow_format(key, key_len, NULL, 0, NULL, &s, true); +- VLOG_ERR("internal error parsing flow key %s", ds_cstr(&s)); ++ VLOG_ERR("internal error parsing flow key %s (%s)", ++ ds_cstr(&s), odp_key_fitness_to_string(fitness)); + ds_destroy(&s); + } + +@@ -7373,10 +7408,7 @@ parse_key_and_mask_to_match(const struct nlattr *key, size_t key_len, + fitness = odp_flow_key_to_mask(mask, mask_len, &match->wc, &match->flow, + NULL); + if (fitness) { +- /* This should not happen: it indicates that +- * odp_flow_key_from_mask() and odp_flow_key_to_mask() +- * disagree on the acceptable form of a mask. Log the problem +- * as an error, with enough details to enable debugging. */ ++ /* This should not happen, see comment above. */ + static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(1, 5); + + if (!VLOG_DROP_ERR(&rl)) { +@@ -7416,15 +7448,18 @@ odp_key_fitness_to_string(enum odp_key_fitness fitness) /* Appends an OVS_ACTION_ATTR_USERSPACE action to 'odp_actions' that specifies * Netlink PID 'pid'. If 'userdata' is nonnull, adds a userdata attribute @@ -85754,7 +85840,7 @@ index 746d1e97d4..fa6287f6db 100644 { size_t userdata_ofs; size_t offset; -@@ -7432,6 +7451,9 @@ odp_put_userspace_action(uint32_t pid, +@@ -7432,6 +7467,9 @@ odp_put_userspace_action(uint32_t pid, offset = nl_msg_start_nested(odp_actions, OVS_ACTION_ATTR_USERSPACE); nl_msg_put_u32(odp_actions, OVS_USERSPACE_ATTR_PID, pid); if (userdata) { @@ -85764,7 +85850,7 @@ index 746d1e97d4..fa6287f6db 100644 userdata_ofs = odp_actions->size + NLA_HDRLEN; /* The OVS kernel module before OVS 1.11 and the upstream Linux kernel -@@ -7457,9 +7479,16 @@ odp_put_userspace_action(uint32_t pid, +@@ -7457,9 +7495,16 @@ odp_put_userspace_action(uint32_t pid, if (include_actions) { nl_msg_put_flag(odp_actions, OVS_USERSPACE_ATTR_ACTIONS); } @@ -85782,7 +85868,7 @@ index 746d1e97d4..fa6287f6db 100644 } void -@@ -7565,6 +7594,28 @@ struct offsetof_sizeof { +@@ -7565,6 +7610,28 @@ struct offsetof_sizeof { int size; }; @@ -85811,7 +85897,7 @@ index 746d1e97d4..fa6287f6db 100644 /* Compares each of the fields in 'key0' and 'key1'. The fields are specified * in 'offsetof_sizeof_arr', which is an array terminated by a 0-size field. * Returns true if all of the fields are equal, false if at least one differs. -@@ -7643,9 +7694,10 @@ commit_set_ether_action(const struct flow *flow, struct flow *base_flow, +@@ -7643,9 +7710,10 @@ commit_set_ether_action(const struct flow *flow, struct flow *base_flow, struct flow_wildcards *wc, bool use_masked) { @@ -85823,7 +85909,7 @@ index 746d1e97d4..fa6287f6db 100644 if (flow->packet_type != htonl(PT_ETH)) { return; } -@@ -7653,11 +7705,13 @@ commit_set_ether_action(const struct flow *flow, struct flow *base_flow, +@@ -7653,11 +7721,13 @@ commit_set_ether_action(const struct flow *flow, struct flow *base_flow, get_ethernet_key(flow, &key); get_ethernet_key(base_flow, &base); get_ethernet_key(&wc->masks, &mask); @@ -85837,7 +85923,7 @@ index 746d1e97d4..fa6287f6db 100644 put_ethernet_key(&mask, &wc->masks); } } -@@ -7781,7 +7835,7 @@ commit_set_ipv4_action(const struct flow *flow, struct flow *base_flow, +@@ -7781,7 +7851,7 @@ commit_set_ipv4_action(const struct flow *flow, struct flow *base_flow, struct ofpbuf *odp_actions, struct flow_wildcards *wc, bool use_masked) { @@ -85846,7 +85932,7 @@ index 746d1e97d4..fa6287f6db 100644 struct offsetof_sizeof ovs_key_ipv4_offsetof_sizeof_arr[] = OVS_KEY_IPV4_OFFSETOF_SIZEOF_ARR; -@@ -7792,6 +7846,7 @@ commit_set_ipv4_action(const struct flow *flow, struct flow *base_flow, +@@ -7792,6 +7862,7 @@ commit_set_ipv4_action(const struct flow *flow, struct flow *base_flow, get_ipv4_key(flow, &key, false); get_ipv4_key(base_flow, &base, false); get_ipv4_key(&wc->masks, &mask, true); @@ -85854,7 +85940,7 @@ index 746d1e97d4..fa6287f6db 100644 mask.ipv4_proto = 0; /* Not writeable. */ mask.ipv4_frag = 0; /* Not writable. */ -@@ -7803,9 +7858,8 @@ commit_set_ipv4_action(const struct flow *flow, struct flow *base_flow, +@@ -7803,9 +7874,8 @@ commit_set_ipv4_action(const struct flow *flow, struct flow *base_flow, if (commit(OVS_KEY_ATTR_IPV4, use_masked, &key, &base, &mask, sizeof key, ovs_key_ipv4_offsetof_sizeof_arr, odp_actions)) { put_ipv4_key(&base, base_flow, false); @@ -85866,7 +85952,7 @@ index 746d1e97d4..fa6287f6db 100644 } } -@@ -7838,7 +7892,7 @@ commit_set_ipv6_action(const struct flow *flow, struct flow *base_flow, +@@ -7838,7 +7908,7 @@ commit_set_ipv6_action(const struct flow *flow, struct flow *base_flow, struct ofpbuf *odp_actions, struct flow_wildcards *wc, bool use_masked) { @@ -85875,7 +85961,7 @@ index 746d1e97d4..fa6287f6db 100644 struct offsetof_sizeof ovs_key_ipv6_offsetof_sizeof_arr[] = OVS_KEY_IPV6_OFFSETOF_SIZEOF_ARR; -@@ -7849,6 +7903,7 @@ commit_set_ipv6_action(const struct flow *flow, struct flow *base_flow, +@@ -7849,6 +7919,7 @@ commit_set_ipv6_action(const struct flow *flow, struct flow *base_flow, get_ipv6_key(flow, &key, false); get_ipv6_key(base_flow, &base, false); get_ipv6_key(&wc->masks, &mask, true); @@ -85883,7 +85969,7 @@ index 746d1e97d4..fa6287f6db 100644 mask.ipv6_proto = 0; /* Not writeable. */ mask.ipv6_frag = 0; /* Not writable. */ mask.ipv6_label &= htonl(IPV6_LABEL_MASK); /* Not writable. */ -@@ -7861,9 +7916,8 @@ commit_set_ipv6_action(const struct flow *flow, struct flow *base_flow, +@@ -7861,9 +7932,8 @@ commit_set_ipv6_action(const struct flow *flow, struct flow *base_flow, if (commit(OVS_KEY_ATTR_IPV6, use_masked, &key, &base, &mask, sizeof key, ovs_key_ipv6_offsetof_sizeof_arr, odp_actions)) { put_ipv6_key(&base, base_flow, false); @@ -85895,7 +85981,7 @@ index 746d1e97d4..fa6287f6db 100644 } } -@@ -7894,17 +7948,19 @@ static enum slow_path_reason +@@ -7894,17 +7964,19 @@ static enum slow_path_reason commit_set_arp_action(const struct flow *flow, struct flow *base_flow, struct ofpbuf *odp_actions, struct flow_wildcards *wc) { @@ -85916,7 +86002,7 @@ index 746d1e97d4..fa6287f6db 100644 put_arp_key(&mask, &wc->masks); return SLOW_ACTION; } -@@ -7931,7 +7987,7 @@ static enum slow_path_reason +@@ -7931,7 +8003,7 @@ static enum slow_path_reason commit_set_icmp_action(const struct flow *flow, struct flow *base_flow, struct ofpbuf *odp_actions, struct flow_wildcards *wc) { @@ -85925,7 +86011,7 @@ index 746d1e97d4..fa6287f6db 100644 struct offsetof_sizeof ovs_key_icmp_offsetof_sizeof_arr[] = OVS_KEY_ICMP_OFFSETOF_SIZEOF_ARR; enum ovs_key_attr attr; -@@ -7947,10 +8003,12 @@ commit_set_icmp_action(const struct flow *flow, struct flow *base_flow, +@@ -7947,10 +8019,12 @@ commit_set_icmp_action(const struct flow *flow, struct flow *base_flow, get_icmp_key(flow, &key); get_icmp_key(base_flow, &base); get_icmp_key(&wc->masks, &mask); @@ -85938,7 +86024,7 @@ index 746d1e97d4..fa6287f6db 100644 put_icmp_key(&mask, &wc->masks); return SLOW_ACTION; } -@@ -7998,17 +8056,19 @@ commit_set_nd_action(const struct flow *flow, struct flow *base_flow, +@@ -7998,17 +8072,19 @@ commit_set_nd_action(const struct flow *flow, struct flow *base_flow, struct ofpbuf *odp_actions, struct flow_wildcards *wc, bool use_masked) { @@ -85959,7 +86045,7 @@ index 746d1e97d4..fa6287f6db 100644 put_nd_key(&mask, &wc->masks); return SLOW_ACTION; } -@@ -8022,18 +8082,20 @@ commit_set_nd_extensions_action(const struct flow *flow, +@@ -8022,18 +8098,20 @@ commit_set_nd_extensions_action(const struct flow *flow, struct ofpbuf *odp_actions, struct flow_wildcards *wc, bool use_masked) { @@ -85981,7 +86067,7 @@ index 746d1e97d4..fa6287f6db 100644 put_nd_extensions_key(&mask, &wc->masks); return SLOW_ACTION; } -@@ -8248,7 +8310,7 @@ commit_set_port_action(const struct flow *flow, struct flow *base_flow, +@@ -8248,7 +8326,7 @@ commit_set_port_action(const struct flow *flow, struct flow *base_flow, bool use_masked) { enum ovs_key_attr key_type; @@ -85990,7 +86076,7 @@ index 746d1e97d4..fa6287f6db 100644 struct offsetof_sizeof ovs_key_tp_offsetof_sizeof_arr[] = OVS_KEY_TCP_OFFSETOF_SIZEOF_ARR; -@@ -8274,10 +8336,12 @@ commit_set_port_action(const struct flow *flow, struct flow *base_flow, +@@ -8274,10 +8352,12 @@ commit_set_port_action(const struct flow *flow, struct flow *base_flow, get_tp_key(flow, &key); get_tp_key(base_flow, &base); get_tp_key(&wc->masks, &mask); @@ -86003,7 +86089,7 @@ index 746d1e97d4..fa6287f6db 100644 put_tp_key(&mask, &wc->masks); } } -@@ -8301,7 +8365,7 @@ commit_set_priority_action(const struct flow *flow, struct flow *base_flow, +@@ -8301,7 +8381,7 @@ commit_set_priority_action(const struct flow *flow, struct flow *base_flow, if (commit(OVS_KEY_ATTR_PRIORITY, use_masked, &key, &base, &mask, sizeof key, ovs_key_prio_offsetof_sizeof_arr, odp_actions)) { base_flow->skb_priority = base; @@ -86012,7 +86098,7 @@ index 746d1e97d4..fa6287f6db 100644 } } -@@ -8325,7 +8389,7 @@ commit_set_pkt_mark_action(const struct flow *flow, struct flow *base_flow, +@@ -8325,7 +8405,7 @@ commit_set_pkt_mark_action(const struct flow *flow, struct flow *base_flow, sizeof key, ovs_key_pkt_mark_offsetof_sizeof_arr, odp_actions)) { base_flow->pkt_mark = base; @@ -88761,6 +88847,172 @@ index 0be719967d..dcecdab212 100755 import getopt import re import sys +diff --git a/ofproto/ofproto-dpif-ipfix.c b/ofproto/ofproto-dpif-ipfix.c +index b413768ef0..bdd19de2d4 100644 +--- a/ofproto/ofproto-dpif-ipfix.c ++++ b/ofproto/ofproto-dpif-ipfix.c +@@ -926,17 +926,21 @@ dpif_ipfix_bridge_exporter_destroy(struct dpif_ipfix_bridge_exporter *exporter) + static void + dpif_ipfix_bridge_exporter_set_options( + struct dpif_ipfix_bridge_exporter *exporter, +- const struct ofproto_ipfix_bridge_exporter_options *options) ++ const struct ofproto_ipfix_bridge_exporter_options *options, ++ bool *options_changed) + { +- bool options_changed; +- + if (!options || sset_is_empty(&options->targets)) { + /* No point in doing any work if there are no targets. */ +- dpif_ipfix_bridge_exporter_clear(exporter); ++ if (exporter->options) { ++ dpif_ipfix_bridge_exporter_clear(exporter); ++ *options_changed = true; ++ } else { ++ *options_changed = false; ++ } + return; + } + +- options_changed = ( ++ *options_changed = ( + !exporter->options + || !ofproto_ipfix_bridge_exporter_options_equal( + options, exporter->options)); +@@ -945,7 +949,7 @@ dpif_ipfix_bridge_exporter_set_options( + * shortchanged in collectors (which indicates that opening one or + * more of the configured collectors failed, so that we should + * retry). */ +- if (options_changed ++ if (*options_changed + || collectors_count(exporter->exporter.collectors) + < sset_count(&options->targets)) { + if (!dpif_ipfix_exporter_set_options( +@@ -957,7 +961,7 @@ dpif_ipfix_bridge_exporter_set_options( + } + + /* Avoid reconfiguring if options didn't change. */ +- if (!options_changed) { ++ if (!*options_changed) { + return; + } + +@@ -1015,17 +1019,21 @@ dpif_ipfix_flow_exporter_destroy(struct dpif_ipfix_flow_exporter *exporter) + static bool + dpif_ipfix_flow_exporter_set_options( + struct dpif_ipfix_flow_exporter *exporter, +- const struct ofproto_ipfix_flow_exporter_options *options) ++ const struct ofproto_ipfix_flow_exporter_options *options, ++ bool *options_changed) + { +- bool options_changed; +- + if (sset_is_empty(&options->targets)) { + /* No point in doing any work if there are no targets. */ +- dpif_ipfix_flow_exporter_clear(exporter); ++ if (exporter->options) { ++ dpif_ipfix_flow_exporter_clear(exporter); ++ *options_changed = true; ++ } else { ++ *options_changed = false; ++ } + return true; + } + +- options_changed = ( ++ *options_changed = ( + !exporter->options + || !ofproto_ipfix_flow_exporter_options_equal( + options, exporter->options)); +@@ -1034,7 +1042,7 @@ dpif_ipfix_flow_exporter_set_options( + * shortchanged in collectors (which indicates that opening one or + * more of the configured collectors failed, so that we should + * retry). */ +- if (options_changed ++ if (*options_changed + || collectors_count(exporter->exporter.collectors) + < sset_count(&options->targets)) { + if (!dpif_ipfix_exporter_set_options( +@@ -1046,7 +1054,7 @@ dpif_ipfix_flow_exporter_set_options( + } + + /* Avoid reconfiguring if options didn't change. */ +- if (!options_changed) { ++ if (!*options_changed) { + return true; + } + +@@ -1069,7 +1077,7 @@ remove_flow_exporter(struct dpif_ipfix *di, + free(node); + } + +-void ++bool + dpif_ipfix_set_options( + struct dpif_ipfix *di, + const struct ofproto_ipfix_bridge_exporter_options *bridge_exporter_options, +@@ -1077,16 +1085,19 @@ dpif_ipfix_set_options( + size_t n_flow_exporters_options) OVS_EXCLUDED(mutex) + { + int i; ++ bool beo_changed, feo_changed, entry_changed; + struct ofproto_ipfix_flow_exporter_options *options; + struct dpif_ipfix_flow_exporter_map_node *node, *next; + + ovs_mutex_lock(&mutex); + dpif_ipfix_bridge_exporter_set_options(&di->bridge_exporter, +- bridge_exporter_options); ++ bridge_exporter_options, ++ &beo_changed); + + /* Add new flow exporters and update current flow exporters. */ + options = (struct ofproto_ipfix_flow_exporter_options *) + flow_exporters_options; ++ feo_changed = false; + for (i = 0; i < n_flow_exporters_options; i++) { + node = dpif_ipfix_find_flow_exporter_map_node( + di, options->collector_set_id); +@@ -1095,10 +1106,14 @@ dpif_ipfix_set_options( + dpif_ipfix_flow_exporter_init(&node->exporter); + hmap_insert(&di->flow_exporter_map, &node->node, + hash_int(options->collector_set_id, 0)); ++ feo_changed = true; + } +- if (!dpif_ipfix_flow_exporter_set_options(&node->exporter, options)) { ++ if (!dpif_ipfix_flow_exporter_set_options(&node->exporter, ++ options, ++ &entry_changed)) { + remove_flow_exporter(di, node); + } ++ feo_changed = entry_changed ? true : feo_changed; + options++; + } + +@@ -1117,10 +1132,12 @@ dpif_ipfix_set_options( + } + if (i == n_flow_exporters_options) { /* Not found. */ + remove_flow_exporter(di, node); ++ feo_changed = true; + } + } + + ovs_mutex_unlock(&mutex); ++ return beo_changed || feo_changed; + } + + struct dpif_ipfix * +diff --git a/ofproto/ofproto-dpif-ipfix.h b/ofproto/ofproto-dpif-ipfix.h +index 1f42cd5275..75c0ab81ac 100644 +--- a/ofproto/ofproto-dpif-ipfix.h ++++ b/ofproto/ofproto-dpif-ipfix.h +@@ -48,7 +48,7 @@ bool dpif_ipfix_get_bridge_exporter_output_sampling(const struct dpif_ipfix *); + bool dpif_ipfix_get_flow_exporter_tunnel_sampling(const struct dpif_ipfix *, + const uint32_t); + bool dpif_ipfix_is_tunnel_port(const struct dpif_ipfix *, odp_port_t); +-void dpif_ipfix_set_options( ++bool dpif_ipfix_set_options( + struct dpif_ipfix *, + const struct ofproto_ipfix_bridge_exporter_options *, + const struct ofproto_ipfix_flow_exporter_options *, size_t); diff --git a/ofproto/ofproto-dpif-rid.h b/ofproto/ofproto-dpif-rid.h index 147ef9c333..97699cb905 100644 --- a/ofproto/ofproto-dpif-rid.h @@ -89390,7 +89642,7 @@ index 3426a27b2d..e4959ec686 100644 void xlate_bundle_set(struct ofproto_dpif *, struct ofbundle *, const char *name, enum port_vlan_mode, diff --git a/ofproto/ofproto-dpif.c b/ofproto/ofproto-dpif.c -index d3cb392077..0bf5eeb403 100644 +index d3cb392077..f66a623e6d 100644 --- a/ofproto/ofproto-dpif.c +++ b/ofproto/ofproto-dpif.c @@ -215,10 +215,6 @@ struct shash all_dpif_backers = SHASH_INITIALIZER(&all_dpif_backers); @@ -89465,20 +89717,35 @@ index d3cb392077..0bf5eeb403 100644 close_dpif_backer(ofproto->backer, del); } -@@ -2298,6 +2310,12 @@ set_ipfix( +@@ -2273,6 +2285,7 @@ set_ipfix( + struct dpif_ipfix *di = ofproto->ipfix; + bool has_options = bridge_exporter_options || flow_exporters_options; + bool new_di = false; ++ bool options_changed = false; + + if (has_options && !di) { + di = ofproto->ipfix = dpif_ipfix_create(); +@@ -2282,7 +2295,7 @@ set_ipfix( + if (di) { + /* Call set_options in any case to cleanly flush the flow + * caches in the last exporters that are to be destroyed. */ +- dpif_ipfix_set_options( ++ options_changed = dpif_ipfix_set_options( + di, bridge_exporter_options, flow_exporters_options, + n_flow_exporters_options); + +@@ -2298,6 +2311,10 @@ set_ipfix( dpif_ipfix_unref(di); ofproto->ipfix = NULL; } + -+ /* TODO: need to consider ipfix option changes more than -+ * enable/disable */ -+ if (new_di || !ofproto->ipfix) { ++ if (new_di || options_changed) { + ofproto->backer->need_revalidate = REV_RECONFIGURE; + } } return 0; -@@ -4376,12 +4394,14 @@ rule_dpif_lookup_from_table(struct ofproto_dpif *ofproto, +@@ -4376,12 +4393,14 @@ rule_dpif_lookup_from_table(struct ofproto_dpif *ofproto, atomic_add_relaxed(&tbl->n_matched, stats->n_packets, &orig); } if (xcache) { @@ -89498,7 +89765,7 @@ index d3cb392077..0bf5eeb403 100644 } return rule; } -@@ -4412,12 +4432,14 @@ rule_dpif_lookup_from_table(struct ofproto_dpif *ofproto, +@@ -4412,12 +4431,14 @@ rule_dpif_lookup_from_table(struct ofproto_dpif *ofproto, stats->n_packets, &orig); } if (xcache) { @@ -89518,7 +89785,7 @@ index d3cb392077..0bf5eeb403 100644 } if (rule) { goto out; /* Match. */ -@@ -5375,6 +5397,8 @@ ct_add_timeout_policy_to_dpif(struct dpif *dpif, +@@ -5375,6 +5396,8 @@ ct_add_timeout_policy_to_dpif(struct dpif *dpif, struct ct_dpif_timeout_policy cdtp; struct simap_node *node; @@ -89527,7 +89794,7 @@ index d3cb392077..0bf5eeb403 100644 cdtp.id = ct_tp->tp_id; SIMAP_FOR_EACH (node, &ct_tp->tp) { ct_dpif_set_timeout_policy_attr_by_name(&cdtp, node->name, node->data); -@@ -5496,6 +5520,7 @@ ct_set_zone_timeout_policy(const char *datapath_type, uint16_t zone_id, +@@ -5496,6 +5519,7 @@ ct_set_zone_timeout_policy(const char *datapath_type, uint16_t zone_id, ct_timeout_policy_unref(backer, ct_zone->ct_tp); ct_zone->ct_tp = ct_tp; ct_tp->ref_count++; @@ -89535,7 +89802,7 @@ index d3cb392077..0bf5eeb403 100644 } } else { struct ct_zone *new_ct_zone = ct_zone_alloc(zone_id); -@@ -5503,6 +5528,7 @@ ct_set_zone_timeout_policy(const char *datapath_type, uint16_t zone_id, +@@ -5503,6 +5527,7 @@ ct_set_zone_timeout_policy(const char *datapath_type, uint16_t zone_id, cmap_insert(&backer->ct_zones, &new_ct_zone->node, hash_int(zone_id, 0)); ct_tp->ref_count++; @@ -89543,7 +89810,7 @@ index d3cb392077..0bf5eeb403 100644 } } -@@ -5519,6 +5545,7 @@ ct_del_zone_timeout_policy(const char *datapath_type, uint16_t zone_id) +@@ -5519,6 +5544,7 @@ ct_del_zone_timeout_policy(const char *datapath_type, uint16_t zone_id) if (ct_zone) { ct_timeout_policy_unref(backer, ct_zone->ct_tp); ct_zone_remove_and_destroy(backer, ct_zone); @@ -89551,7 +89818,7 @@ index d3cb392077..0bf5eeb403 100644 } } -@@ -5563,6 +5590,7 @@ get_datapath_cap(const char *datapath_type, struct smap *cap) +@@ -5563,6 +5589,7 @@ get_datapath_cap(const char *datapath_type, struct smap *cap) smap_add(cap, "ct_timeout", s.ct_timeout ? "true" : "false"); smap_add(cap, "explicit_drop_action", s.explicit_drop_action ? "true" :"false"); @@ -89559,7 +89826,7 @@ index d3cb392077..0bf5eeb403 100644 } /* Gets timeout policy name in 'backer' based on 'zone', 'dl_type' and -@@ -5717,15 +5745,7 @@ ofproto_dpif_lookup_by_name(const char *name) +@@ -5717,15 +5744,7 @@ ofproto_dpif_lookup_by_name(const char *name) struct ofproto_dpif * ofproto_dpif_lookup_by_uuid(const struct uuid *uuid) { @@ -89576,7 +89843,7 @@ index d3cb392077..0bf5eeb403 100644 } static void -@@ -6335,6 +6355,7 @@ ofproto_unixctl_dpif_show_dp_features(struct unixctl_conn *conn, +@@ -6335,6 +6354,7 @@ ofproto_unixctl_dpif_show_dp_features(struct unixctl_conn *conn, dpif_show_support(&ofproto->backer->bt_support, &ds); unixctl_command_reply(conn, ds_cstr(&ds)); @@ -90069,6 +90336,18 @@ index e45f3d6796..3a0dad5d0a 100644 if (timeout_msec < 0) { error = ovsdb_syntax_error(timeout, NULL, "timeout must be nonnegative"); +diff --git a/ovsdb/file.c b/ovsdb/file.c +index 0af077fcec..b86763c422 100644 +--- a/ovsdb/file.c ++++ b/ovsdb/file.c +@@ -458,6 +458,7 @@ ovsdb_file_read__(const char *filename, bool rw, + + error = ovsdb_txn_replay_commit(txn); + if (error) { ++ ovsdb_error_destroy(error); + ovsdb_storage_unread(storage); + break; + } diff --git a/ovsdb/log.c b/ovsdb/log.c index c82a79c9ff..f35faadfe0 100644 --- a/ovsdb/log.c @@ -92664,7 +92943,7 @@ index 4893280a99..a0487341c9 100644 bad_action 'fin_timeout(foo=bar)' "invalid key 'foo' in 'fin_timeout' argument" diff --git a/tests/ofproto-dpif.at b/tests/ofproto-dpif.at -index ff1cc93707..48bb50f259 100644 +index ff1cc93707..272fef8009 100644 --- a/tests/ofproto-dpif.at +++ b/tests/ofproto-dpif.at @@ -4534,6 +4534,54 @@ recirc_id(0),in_port(90),packet_type(ns=0,id=0),eth_type(0x0800),ipv4(proto=6,fr @@ -92788,16 +93067,38 @@ index ff1cc93707..48bb50f259 100644 AT_SETUP([ofproto-dpif - debug_slow action]) OVS_VSWITCHD_START -@@ -7067,7 +7174,7 @@ dnl configure bridge IPFIX and ensure that sample action generation works at the +@@ -7067,13 +7174,28 @@ dnl configure bridge IPFIX and ensure that sample action generation works at the dnl datapath level. AT_SETUP([ofproto-dpif - Bridge IPFIX sanity check]) OVS_VSWITCHD_START -add_of_ports br0 1 2 ++dnl first revalidation triggered by add interface ++AT_CHECK([ovs-appctl coverage/read-counter rev_reconfigure], [0], [dnl ++1 ++]) ++ +add_of_ports br0 1 2 3 ++AT_CHECK([ovs-appctl coverage/read-counter rev_reconfigure], [0], [dnl ++2 ++]) dnl Sample every packet using bridge-based sampling. AT_CHECK([ovs-vsctl -- set bridge br0 ipfix=@fix -- \ -@@ -7083,6 +7190,28 @@ flow-dump from the main thread: + --id=@fix create ipfix targets=\"127.0.0.1:4739\" \ +- sampling=1], [0], [ignore]) ++ sampling=2], [0], [ignore]) ++AT_CHECK([ovs-appctl coverage/read-counter rev_reconfigure], [0], [dnl ++3 ++]) + ++AT_CHECK([ovs-vsctl set ipfix `ovs-vsctl get bridge br0 ipfix` sampling=1], [0]) ++AT_CHECK([ovs-appctl coverage/read-counter rev_reconfigure], [0], [dnl ++4 ++]) + dnl Send some packets that should be sampled. + for i in `seq 1 3`; do + AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800)']) +@@ -7083,6 +7205,28 @@ flow-dump from the main thread: packets:2, bytes:68, used:0.001s, actions:userspace(pid=0,ipfix(output_port=4294967295)) ]) @@ -92826,7 +93127,7 @@ index ff1cc93707..48bb50f259 100644 AT_CHECK([ovs-appctl revalidator/purge]) dnl dnl Add a slowpath meter. The userspace action should be metered. -@@ -8134,6 +8263,34 @@ AT_CHECK([sed -n 's/=[[0-9]][[0-9]]\(\.[[0-9]][[0-9]]*\)\{0,1\}s/=?s/p' stdout], +@@ -8134,6 +8278,34 @@ AT_CHECK([sed -n 's/=[[0-9]][[0-9]]\(\.[[0-9]][[0-9]]*\)\{0,1\}s/=?s/p' stdout], OVS_VSWITCHD_STOP AT_CLEANUP @@ -92861,7 +93162,7 @@ index ff1cc93707..48bb50f259 100644 dnl ---------------------------------------------------------------------- AT_BANNER([ofproto-dpif -- megaflows]) -@@ -8632,6 +8789,29 @@ recirc_id(0),in_port(1),packet_type(ns=0,id=0),eth(dst=50:54:00:00:00:0c),eth_ty +@@ -8632,6 +8804,29 @@ recirc_id(0),in_port(1),packet_type(ns=0,id=0),eth(dst=50:54:00:00:00:0c),eth_ty OVS_VSWITCHD_STOP AT_CLEANUP @@ -92891,7 +93192,7 @@ index ff1cc93707..48bb50f259 100644 m4_define([OFPROTO_DPIF_MEGAFLOW_DISABLED], [AT_SETUP([ofproto-dpif megaflow - disabled$1]) OVS_VSWITCHD_START([], [], [], [m4_if([$1], [], [], [--dummy-numa="0,0,0,0,1,1,1,1"])]) -@@ -9215,6 +9395,26 @@ OFPST_TABLE reply (OF1.3) (xid=0x2): +@@ -9215,6 +9410,26 @@ OFPST_TABLE reply (OF1.3) (xid=0x2): OVS_VSWITCHD_STOP AT_CLEANUP @@ -92918,7 +93219,7 @@ index ff1cc93707..48bb50f259 100644 AT_SETUP([ofproto-dpif - ICMPv6]) OVS_VSWITCHD_START add_of_ports br0 1 -@@ -10537,6 +10737,87 @@ dnl +@@ -10537,6 +10752,87 @@ dnl NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=106 in_port=2 (via action) data_len=106 (unbuffered) udp,vlan_tci=0x0000,dl_src=50:54:00:00:00:0a,dl_dst=50:54:00:00:00:09,nw_src=10.1.1.2,nw_dst=10.1.1.1,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=2,tp_dst=1 udp_csum:553 ]) @@ -93006,7 +93307,7 @@ index ff1cc93707..48bb50f259 100644 OVS_VSWITCHD_STOP AT_CLEANUP -@@ -10807,6 +11088,23 @@ Megaflow: recirc_id=0x3,eth,ip,in_port=1,nw_frag=no +@@ -10807,6 +11103,23 @@ Megaflow: recirc_id=0x3,eth,ip,in_port=1,nw_frag=no Datapath actions: 4 ]) diff --git a/SPECS/openvswitch2.13.spec b/SPECS/openvswitch2.13.spec index a0a7d50..4410d4b 100644 --- a/SPECS/openvswitch2.13.spec +++ b/SPECS/openvswitch2.13.spec @@ -59,7 +59,7 @@ Summary: Open vSwitch Group: System Environment/Daemons daemon/database/utilities URL: http://www.openvswitch.org/ Version: 2.13.0 -Release: 189%{?commit0:.%{date}git%{shortcommit0}}%{?commit1:dpdk%{shortcommit1}}%{?dist} +Release: 190%{?commit0:.%{date}git%{shortcommit0}}%{?commit1:dpdk%{shortcommit1}}%{?dist} # Nearly all of openvswitch is ASL 2.0. The bugtool is LGPLv2+, and the # lib/sflow*.[ch] files are SISSL @@ -715,6 +715,15 @@ exit 0 %endif %changelog +* Tue Jun 28 2022 Open vSwitch CI - 2.13.0-190 +- Merging upstream branch-2.13 [RH git: 611c3165f3] + Commit list: + e1f59874d9 ovsdb: Fix memory leak on error path in ovsdb_file_read__(). + f4f51a53c1 odp-util: Ignore unknown attributes in parse_key_and_mask_to_match(). (#2089331) + 94fd5f5600 lldp: Fix lldp memory leak. + 1f2253ff2a ipfix: Trigger revalidation if ipfix options changes. + + * Mon Jun 27 2022 Open vSwitch CI - 2.13.0-189 - Merging upstream branch-2.13 [RH git: bf0662bc0f] Commit list: