diff --git a/SOURCES/openvswitch-2.13.0.patch b/SOURCES/openvswitch-2.13.0.patch index 3e1249f..894ff5e 100644 --- a/SOURCES/openvswitch-2.13.0.patch +++ b/SOURCES/openvswitch-2.13.0.patch @@ -85104,7 +85104,7 @@ index eda265dfc5..a635ff7689 100644 #define SHA1_FMT \ "%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x" \ diff --git a/lib/tc.c b/lib/tc.c -index 12af0192b6..1acca38218 100644 +index 12af0192b6..9f4f5e3c8a 100644 --- a/lib/tc.c +++ b/lib/tc.c @@ -60,12 +60,6 @@ VLOG_DEFINE_THIS_MODULE(tc); @@ -85192,6 +85192,78 @@ index 12af0192b6..1acca38218 100644 if (flower->tunnel) { nl_msg_put_flower_tunnel(request, flower); +@@ -2771,6 +2775,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) + { +@@ -2802,6 +2850,20 @@ 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); ++ ++ 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/tc.h b/lib/tc.h index d31c0953ed..0dc62bd83f 100644 --- a/lib/tc.h diff --git a/SPECS/openvswitch2.13.spec b/SPECS/openvswitch2.13.spec index 7367d39..61935a2 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: 135%{?commit0:.%{date}git%{shortcommit0}}%{?commit1:dpdk%{shortcommit1}}%{?dist} +Release: 136%{?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 @@ -712,6 +712,12 @@ exit 0 %endif %changelog +* Wed Oct 27 2021 Open vSwitch CI - 2.13.0-136 +- Merging upstream branch-2.13 [RH git: 25cc09c60a] + Commit list: + 2c1369aa6d netdev-offload-tc: Verify the flower rule installed. + + * Wed Oct 27 2021 Open vSwitch CI - 2.13.0-135 - Merging upstream branch-2.13 [RH git: 1b6734e549] Commit list: