From fe66f260100b662710f5f154d59a6e2ec306291a Mon Sep 17 00:00:00 2001 From: Open vSwitch CI Date: Jan 30 2023 22:48:09 +0000 Subject: Import openvswitch2.17-2.17.0-74 from Fast DataPath --- diff --git a/.openvswitch.metadata b/.openvswitch.metadata index aae65b4..53d7d0a 100644 --- a/.openvswitch.metadata +++ b/.openvswitch.metadata @@ -1,5 +1,5 @@ 002450621b33c5690060345b0aac25bc2426d675 SOURCES/docutils-0.12.tar.gz -722b63cd114c21041abda7b38d7f14e46338e3e0 SOURCES/openvswitch-2.17.0.tar.gz +019c0a80416de57f0820850034e17ce2a4768910 SOURCES/openvswitch-2.17.0.tar.gz 8509a716f9f936526f64fb23f313c5a9baf2f123 SOURCES/pyelftools-0.27.tar.gz d34f96421a86004aa5d26ecf975edefd09f948b1 SOURCES/Pygments-1.4.tar.gz 3a11f130c63b057532ca37fe49c8967d0cbae1d5 SOURCES/Sphinx-1.2.3.tar.gz diff --git a/SOURCES/openvswitch-2.17.0.patch b/SOURCES/openvswitch-2.17.0.patch index e27b2d1..d36876f 100644 --- a/SOURCES/openvswitch-2.17.0.patch +++ b/SOURCES/openvswitch-2.17.0.patch @@ -53567,7 +53567,7 @@ index b6b29c75e3..39a1fd388d 100644 free(queue); } diff --git a/lib/netdev-linux.c b/lib/netdev-linux.c -index 620a451dec..5aa8a8ca3c 100644 +index 620a451dec..387773e927 100644 --- a/lib/netdev-linux.c +++ b/lib/netdev-linux.c @@ -247,6 +247,14 @@ enum { @@ -53606,6 +53606,15 @@ index 620a451dec..5aa8a8ca3c 100644 nl_msg_end_nested(request, offset); nl_msg_end_nested(request, act_offset); } +@@ -2721,7 +2732,7 @@ tc_del_matchall_policer(struct netdev *netdev) + } + + id = tc_make_tcf_id(ifindex, block_id, prio, TC_INGRESS); +- err = tc_del_filter(&id); ++ err = tc_del_filter(&id, "matchall"); + if (err) { + return err; + } @@ -2970,12 +2981,18 @@ netdev_linux_set_qos(struct netdev *netdev_, /* Delete existing qdisc. */ error = tc_del_qdisc(netdev_); @@ -53783,7 +53792,7 @@ index 94dc6a9b74..303b99daf4 100644 .queue = rss_data->queue, .key_len = 0, diff --git a/lib/netdev-offload-tc.c b/lib/netdev-offload-tc.c -index 9845e8d3fe..ba40531b5d 100644 +index 9845e8d3fe..057fad412a 100644 --- a/lib/netdev-offload-tc.c +++ b/lib/netdev-offload-tc.c @@ -44,6 +44,7 @@ @@ -53794,7 +53803,25 @@ index 9845e8d3fe..ba40531b5d 100644 static struct hmap ufid_to_tc = HMAP_INITIALIZER(&ufid_to_tc); static struct hmap tc_to_ufid = HMAP_INITIALIZER(&tc_to_ufid); -@@ -417,11 +418,11 @@ delete_chains_from_netdev(struct netdev *netdev, struct tcf_id *id) +@@ -204,7 +205,7 @@ del_filter_and_ufid_mapping(struct tcf_id *id, const ovs_u128 *ufid) + { + int err; + +- err = tc_del_filter(id); ++ err = tc_del_flower_filter(id); + if (!err) { + del_ufid_tc_mapping(ufid); + } +@@ -405,7 +406,7 @@ delete_chains_from_netdev(struct netdev *netdev, struct tcf_id *id) + */ + HMAP_FOR_EACH_POP (chain_node, node, &map) { + id->chain = chain_node->chain; +- tc_del_filter(id); ++ tc_del_flower_filter(id); + free(chain_node); + } + } +@@ -417,16 +418,16 @@ delete_chains_from_netdev(struct netdev *netdev, struct tcf_id *id) static int netdev_tc_flow_flush(struct netdev *netdev) { @@ -53808,6 +53835,12 @@ index 9845e8d3fe..ba40531b5d 100644 if (data->netdev != netdev) { continue; } + +- err = tc_del_filter(&data->id); ++ err = tc_del_flower_filter(&data->id); + if (!err) { + del_ufid_tc_mapping_unlocked(&data->ufid); + } @@ -481,10 +482,10 @@ netdev_tc_flow_dump_destroy(struct netdev_flow_dump *dump) static void @@ -54325,6 +54358,67 @@ index 9845e8d3fe..ba40531b5d 100644 } } +@@ -2077,13 +2224,13 @@ probe_multi_mask_per_prio(int ifindex) + + id2 = tc_make_tcf_id(ifindex, block_id, prio, TC_INGRESS); + error = tc_replace_flower(&id2, &flower); +- tc_del_filter(&id1); ++ tc_del_flower_filter(&id1); + + if (error) { + goto out; + } + +- tc_del_filter(&id2); ++ tc_del_flower_filter(&id2); + + multi_mask_per_prio = true; + VLOG_INFO("probe tc: multiple masks on single tc prio is supported."); +@@ -2135,7 +2282,7 @@ probe_ct_state_support(int ifindex) + goto out_del; + } + +- tc_del_filter(&id); ++ tc_del_flower_filter(&id); + ct_state_support = OVS_CS_F_NEW | + OVS_CS_F_ESTABLISHED | + OVS_CS_F_TRACKED | +@@ -2149,7 +2296,7 @@ probe_ct_state_support(int ifindex) + goto out_del; + } + +- tc_del_filter(&id); ++ tc_del_flower_filter(&id); + + /* Test for ct_state INVALID support */ + memset(&flower, 0, sizeof flower); +@@ -2160,7 +2307,7 @@ probe_ct_state_support(int ifindex) + goto out; + } + +- tc_del_filter(&id); ++ tc_del_flower_filter(&id); + ct_state_support |= OVS_CS_F_INVALID; + + /* Test for ct_state REPLY support */ +@@ -2176,7 +2323,7 @@ probe_ct_state_support(int ifindex) + ct_state_support |= OVS_CS_F_REPLY_DIR; + + out_del: +- tc_del_filter(&id); ++ tc_del_flower_filter(&id); + out: + tc_add_del_qdisc(ifindex, false, 0, TC_INGRESS); + VLOG_INFO("probe tc: supported ovs ct_state bits: 0x%x", ct_state_support); +@@ -2251,7 +2398,7 @@ netdev_tc_init_flow_api(struct netdev *netdev) + + /* fallback here if delete chains fail */ + if (!get_chain_supported) { +- tc_del_filter(&id); ++ tc_del_flower_filter(&id); + } + + /* make sure there is no ingress/egress qdisc */ diff --git a/lib/netdev-offload.c b/lib/netdev-offload.c index fb108c0d50..eea8fadc0e 100644 --- a/lib/netdev-offload.c @@ -56230,7 +56324,7 @@ index fcaddf10ad..71039e24f1 100644 /* Attempts to guess the content type of a stream whose first few bytes were diff --git a/lib/tc.c b/lib/tc.c -index adb2d3182a..8bc999ca83 100644 +index adb2d3182a..485e4834f8 100644 --- a/lib/tc.c +++ b/lib/tc.c @@ -84,6 +84,11 @@ struct flower_key_to_pedit { @@ -56632,7 +56726,38 @@ index adb2d3182a..8bc999ca83 100644 } #define TCA_ACT_MIN_PRIO 1 -@@ -2399,14 +2489,14 @@ nl_msg_put_act_flags(struct ofpbuf *request) { +@@ -1964,14 +2054,21 @@ tc_dump_tc_chain_start(struct tcf_id *id, struct nl_dump *dump) + } + + int +-tc_del_filter(struct tcf_id *id) ++tc_del_filter(struct tcf_id *id, const char *kind) + { + struct ofpbuf request; + + request_from_tcf_id(id, 0, RTM_DELTFILTER, NLM_F_ACK, &request); ++ nl_msg_put_string(&request, TCA_KIND, kind); + return tc_transact(&request, NULL); + } + ++int ++tc_del_flower_filter(struct tcf_id *id) ++{ ++ return tc_del_filter(id, "flower"); ++} ++ + int + tc_get_flower(struct tcf_id *id, struct tc_flower *flower) + { +@@ -1980,6 +2077,7 @@ tc_get_flower(struct tcf_id *id, struct tc_flower *flower) + int error; + + request_from_tcf_id(id, 0, RTM_GETTFILTER, NLM_F_ECHO, &request); ++ nl_msg_put_string(&request, TCA_KIND, "flower"); + error = tc_transact(&request, &reply); + if (error) { + return error; +@@ -2399,14 +2497,14 @@ nl_msg_put_act_flags(struct ofpbuf *request) { * first_word_mask/last_word_mask - the mask to use for the first/last read * (as we read entire words). */ static void @@ -56650,7 +56775,7 @@ index adb2d3182a..8bc999ca83 100644 max_offset = m->offset + m->size; start_offset = ROUND_DOWN(m->offset, 4); -@@ -2473,7 +2563,8 @@ csum_update_flag(struct tc_flower *flower, +@@ -2473,7 +2571,8 @@ csum_update_flag(struct tc_flower *flower, static int nl_msg_put_flower_rewrite_pedits(struct ofpbuf *request, @@ -56660,7 +56785,7 @@ index adb2d3182a..8bc999ca83 100644 { struct { struct tc_pedit sel; -@@ -2497,12 +2588,12 @@ nl_msg_put_flower_rewrite_pedits(struct ofpbuf *request, +@@ -2497,12 +2596,12 @@ nl_msg_put_flower_rewrite_pedits(struct ofpbuf *request, continue; } @@ -56676,7 +56801,7 @@ index adb2d3182a..8bc999ca83 100644 if (j == 0) { mask_word &= first_word_mask; -@@ -2556,6 +2647,29 @@ nl_msg_put_flower_acts_release(struct ofpbuf *request, uint16_t act_index) +@@ -2556,6 +2655,29 @@ nl_msg_put_flower_acts_release(struct ofpbuf *request, uint16_t act_index) nl_msg_end_nested(request, act_offset); } @@ -56706,7 +56831,7 @@ index adb2d3182a..8bc999ca83 100644 static int nl_msg_put_flower_acts(struct ofpbuf *request, struct tc_flower *flower) { -@@ -2572,20 +2686,22 @@ nl_msg_put_flower_acts(struct ofpbuf *request, struct tc_flower *flower) +@@ -2572,20 +2694,22 @@ nl_msg_put_flower_acts(struct ofpbuf *request, struct tc_flower *flower) action = flower->actions; for (i = 0; i < flower->action_count; i++, action++) { @@ -56735,7 +56860,7 @@ index adb2d3182a..8bc999ca83 100644 } } break; -@@ -2792,13 +2908,16 @@ nl_msg_put_flower_tunnel(struct ofpbuf *request, struct tc_flower *flower) +@@ -2792,13 +2916,16 @@ nl_msg_put_flower_tunnel(struct ofpbuf *request, struct tc_flower *flower) struct in6_addr *ipv6_dst_mask = &flower->mask.tunnel.ipv6.ipv6_dst; struct in6_addr *ipv6_src = &flower->key.tunnel.ipv6.ipv6_src; struct in6_addr *ipv6_dst = &flower->key.tunnel.ipv6.ipv6_dst; @@ -56753,7 +56878,7 @@ index adb2d3182a..8bc999ca83 100644 if (ipv4_dst_mask || ipv4_src_mask) { nl_msg_put_be32(request, TCA_FLOWER_KEY_ENC_IPV4_DST_MASK, -@@ -2824,8 +2943,15 @@ nl_msg_put_flower_tunnel(struct ofpbuf *request, struct tc_flower *flower) +@@ -2824,8 +2951,15 @@ nl_msg_put_flower_tunnel(struct ofpbuf *request, struct tc_flower *flower) nl_msg_put_u8(request, TCA_FLOWER_KEY_ENC_IP_TTL, ttl); nl_msg_put_u8(request, TCA_FLOWER_KEY_ENC_IP_TTL_MASK, ttl_mask); } @@ -56770,7 +56895,7 @@ index adb2d3182a..8bc999ca83 100644 } if (id_mask) { nl_msg_put_be32(request, TCA_FLOWER_KEY_ENC_KEY_ID, id); -@@ -2914,13 +3040,13 @@ nl_msg_put_flower_options(struct ofpbuf *request, struct tc_flower *flower) +@@ -2914,13 +3048,13 @@ nl_msg_put_flower_options(struct ofpbuf *request, struct tc_flower *flower) FLOWER_PUT_MASKED_VALUE(icmp_code, TCA_FLOWER_KEY_ICMPV6_CODE); FLOWER_PUT_MASKED_VALUE(icmp_type, TCA_FLOWER_KEY_ICMPV6_TYPE); } @@ -56789,7 +56914,7 @@ index adb2d3182a..8bc999ca83 100644 if (host_eth_type == ETH_P_IP) { FLOWER_PUT_MASKED_VALUE(ipv4.ipv4_src, TCA_FLOWER_KEY_IPV4_SRC); FLOWER_PUT_MASKED_VALUE(ipv4.ipv4_dst, TCA_FLOWER_KEY_IPV4_DST); -@@ -2993,12 +3119,79 @@ nl_msg_put_flower_options(struct ofpbuf *request, struct tc_flower *flower) +@@ -2993,12 +3127,79 @@ nl_msg_put_flower_options(struct ofpbuf *request, struct tc_flower *flower) return 0; } @@ -56870,7 +56995,7 @@ index adb2d3182a..8bc999ca83 100644 return false; } -@@ -3011,8 +3204,8 @@ cmp_tc_flower_match_action(const struct tc_flower *a, +@@ -3011,8 +3212,8 @@ cmp_tc_flower_match_action(const struct tc_flower *a, uint8_t key_b = ((uint8_t *)&b->key)[i] & mask; if (key_a != key_b) { @@ -56881,7 +57006,7 @@ index adb2d3182a..8bc999ca83 100644 return false; } } -@@ -3022,14 +3215,15 @@ cmp_tc_flower_match_action(const struct tc_flower *a, +@@ -3022,14 +3223,15 @@ cmp_tc_flower_match_action(const struct tc_flower *a, const struct tc_action *action_b = b->actions; if (a->action_count != b->action_count) { @@ -56901,7 +57026,7 @@ index adb2d3182a..8bc999ca83 100644 } } diff --git a/lib/tc.h b/lib/tc.h -index a147ca461d..d6cdddd169 100644 +index a147ca461d..55bed0853a 100644 --- a/lib/tc.h +++ b/lib/tc.h @@ -256,11 +256,23 @@ struct tc_action { @@ -56946,7 +57071,7 @@ index a147ca461d..d6cdddd169 100644 uint32_t csum_update_flags; bool tunnel; -@@ -352,13 +359,6 @@ struct tc_flower { +@@ -352,15 +359,9 @@ struct tc_flower { enum tc_offload_policy tc_policy; }; @@ -56958,8 +57083,12 @@ index a147ca461d..d6cdddd169 100644 - + sizeof(uint32_t) - 2 < sizeof(struct tc_flower)); - int tc_replace_flower(struct tcf_id *id, struct tc_flower *flower); - int tc_del_filter(struct tcf_id *id); +-int tc_del_filter(struct tcf_id *id); ++int tc_del_filter(struct tcf_id *id, const char *kind); ++int tc_del_flower_filter(struct tcf_id *id); int tc_get_flower(struct tcf_id *id, struct tc_flower *flower); + int tc_dump_flower_start(struct tcf_id *id, struct nl_dump *dump, bool terse); + int tc_dump_tc_chain_start(struct tcf_id *id, struct nl_dump *dump); diff --git a/lib/tnl-ports.c b/lib/tnl-ports.c index 58269d3b16..050eafa6b8 100644 --- a/lib/tnl-ports.c diff --git a/SPECS/openvswitch2.17.spec b/SPECS/openvswitch2.17.spec index 1702ec3..ae3bb43 100644 --- a/SPECS/openvswitch2.17.spec +++ b/SPECS/openvswitch2.17.spec @@ -57,7 +57,7 @@ Summary: Open vSwitch Group: System Environment/Daemons daemon/database/utilities URL: http://www.openvswitch.org/ Version: 2.17.0 -Release: 73%{?dist} +Release: 74%{?dist} # Nearly all of openvswitch is ASL 2.0. The bugtool is LGPLv2+, and the # lib/sflow*.[ch] files are SISSL @@ -743,6 +743,12 @@ exit 0 %endif %changelog +* Mon Jan 30 2023 Open vSwitch CI - 2.17.0-74 +- Merging upstream branch-2.17 [RH git: 0310c25060] + Commit list: + 32853c0844 tc: Add TCA_KIND flower to delete and get operation to avoid rtnl_lock(). + + * Fri Jan 27 2023 Open vSwitch CI - 2.17.0-73 - Merging upstream branch-2.17 [RH git: 013a2a32fa] Commit list: