From ea115be17a29a5d8aad8f01611f68023e640c610 Mon Sep 17 00:00:00 2001 From: Open vSwitch CI Date: Oct 27 2021 23:39:32 +0000 Subject: Import openvswitch2.15-2.15.0-50 from Fast DataPath --- diff --git a/SOURCES/openvswitch-2.15.0.patch b/SOURCES/openvswitch-2.15.0.patch index 50e78af..f24aad2 100644 --- a/SOURCES/openvswitch-2.15.0.patch +++ b/SOURCES/openvswitch-2.15.0.patch @@ -20735,7 +20735,7 @@ index f0cac8e0fa..7f5561f827 100644 } diff --git a/lib/tc.c b/lib/tc.c -index 3192207984..2eb271d621 100644 +index 3192207984..f173daa421 100644 --- a/lib/tc.c +++ b/lib/tc.c @@ -2557,6 +2557,7 @@ nl_msg_put_flower_acts(struct ofpbuf *request, struct tc_flower *flower) @@ -20746,6 +20746,79 @@ index 3192207984..2eb271d621 100644 nl_msg_end_nested(request, act_offset); released = true; } +@@ -2892,6 +2893,50 @@ nl_msg_put_flower_options(struct ofpbuf *request, struct tc_flower *flower) + return 0; + } + ++static bool ++cmp_tc_flower_match_action(const struct tc_flower *a, ++ const struct tc_flower *b) ++{ ++ if (memcmp(&a->mask, &b->mask, sizeof a->mask)) { ++ VLOG_DBG_RL(&error_rl, "tc flower compare failed mask compare"); ++ return false; ++ } ++ ++ /* We can not memcmp() the key as some keys might be set while the mask ++ * is not.*/ ++ ++ for (int i = 0; i < sizeof a->key; i++) { ++ uint8_t mask = ((uint8_t *)&a->mask)[i]; ++ uint8_t key_a = ((uint8_t *)&a->key)[i] & mask; ++ uint8_t key_b = ((uint8_t *)&b->key)[i] & mask; ++ ++ if (key_a != key_b) { ++ VLOG_DBG_RL(&error_rl, "tc flower compare failed key compare at " ++ "%d", i); ++ return false; ++ } ++ } ++ ++ /* Compare the actions. */ ++ const struct tc_action *action_a = a->actions; ++ const struct tc_action *action_b = b->actions; ++ ++ if (a->action_count != b->action_count) { ++ VLOG_DBG_RL(&error_rl, "tc flower compare failed action length check"); ++ return false; ++ } ++ ++ for (int i = 0; i < a->action_count; i++, action_a++, action_b++) { ++ if (memcmp(action_a, action_b, sizeof *action_a)) { ++ VLOG_DBG_RL(&error_rl, "tc flower compare failed action compare " ++ "for %d", i); ++ return false; ++ } ++ } ++ ++ return true; ++} ++ + int + tc_replace_flower(struct tcf_id *id, struct tc_flower *flower) + { +@@ -2923,6 +2968,21 @@ tc_replace_flower(struct tcf_id *id, struct tc_flower *flower) + + id->prio = tc_get_major(tc->tcm_info); + id->handle = tc->tcm_handle; ++ ++ if (id->prio != TC_RESERVED_PRIORITY_POLICE) { ++ struct tc_flower flower_out; ++ struct tcf_id id_out; ++ int ret; ++ ++ ret = parse_netlink_to_tc_flower(reply, &id_out, &flower_out, ++ false); ++ ++ if (ret || !cmp_tc_flower_match_action(flower, &flower_out)) { ++ VLOG_WARN_RL(&error_rl, "Kernel flower acknowledgment does " ++ "not match request! Set dpif_netlink to dbg to " ++ "see which rule caused this error."); ++ } ++ } + ofpbuf_delete(reply); + } + diff --git a/lib/tun-metadata.c b/lib/tun-metadata.c index c0b0ae0448..af0bcbde8d 100644 --- a/lib/tun-metadata.c diff --git a/SPECS/openvswitch2.15.spec b/SPECS/openvswitch2.15.spec index e60a61d..0072ce0 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: 49%{?dist} +Release: 50%{?dist} # Nearly all of openvswitch is ASL 2.0. The bugtool is LGPLv2+, and the # lib/sflow*.[ch] files are SISSL @@ -699,6 +699,12 @@ exit 0 %endif %changelog +* Wed Oct 27 2021 Open vSwitch CI - 2.15.0-50 +- Merging upstream branch-2.15 [RH git: 16dad85706] + Commit list: + 031cf67e09 netdev-offload-tc: Verify the flower rule installed. + + * Wed Oct 27 2021 Open vSwitch CI - 2.15.0-49 - Merging upstream branch-2.15 [RH git: 2502ca29b0] Commit list: