diff --git a/SOURCES/openvswitch-3.1.0.patch b/SOURCES/openvswitch-3.1.0.patch index e385346..b0d6f19 100644 --- a/SOURCES/openvswitch-3.1.0.patch +++ b/SOURCES/openvswitch-3.1.0.patch @@ -4726,7 +4726,7 @@ index b3421c0996..2180b5fb5f 100644 return 0; } diff --git a/lib/netdev-offload-tc.c b/lib/netdev-offload-tc.c -index 4c78c48163..94c17e41a4 100644 +index 4c78c48163..5f63f52049 100644 --- a/lib/netdev-offload-tc.c +++ b/lib/netdev-offload-tc.c @@ -276,8 +276,9 @@ del_filter_and_ufid_mapping(struct tcf_id *id, const ovs_u128 *ufid, @@ -4740,7 +4740,16 @@ index 4c78c48163..94c17e41a4 100644 } return err; } -@@ -524,7 +525,11 @@ delete_chains_from_netdev(struct netdev *netdev, struct tcf_id *id) +@@ -398,6 +399,8 @@ get_next_available_prio(ovs_be16 protocol) + return TC_RESERVED_PRIORITY_IPV4; + } else if (protocol == htons(ETH_P_IPV6)) { + return TC_RESERVED_PRIORITY_IPV6; ++ } else if (protocol == htons(ETH_P_8021Q)) { ++ return TC_RESERVED_PRIORITY_VLAN; + } + } + +@@ -524,7 +527,11 @@ delete_chains_from_netdev(struct netdev *netdev, struct tcf_id *id) */ HMAP_FOR_EACH_POP (chain_node, node, &map) { id->chain = chain_node->chain; @@ -4753,7 +4762,7 @@ index 4c78c48163..94c17e41a4 100644 free(chain_node); } } -@@ -871,7 +876,7 @@ parse_tc_flower_to_actions__(struct tc_flower *flower, struct ofpbuf *buf, +@@ -871,7 +878,7 @@ parse_tc_flower_to_actions__(struct tc_flower *flower, struct ofpbuf *buf, outport = netdev_ifindex_to_odp_port(action->out.ifindex_out); if (!outport) { @@ -4762,7 +4771,7 @@ index 4c78c48163..94c17e41a4 100644 } } nl_msg_put_u32(buf, OVS_ACTION_ATTR_OUTPUT, odp_to_u32(outport)); -@@ -964,7 +969,7 @@ parse_tc_flower_to_actions__(struct tc_flower *flower, struct ofpbuf *buf, +@@ -964,7 +971,7 @@ parse_tc_flower_to_actions__(struct tc_flower *flower, struct ofpbuf *buf, uint32_t meter_id; if (police_idx_lookup(action->police.index, &meter_id)) { @@ -4771,7 +4780,7 @@ index 4c78c48163..94c17e41a4 100644 } nl_msg_put_u32(buf, OVS_ACTION_ATTR_METER, meter_id); } -@@ -983,6 +988,9 @@ parse_tc_flower_to_actions__(struct tc_flower *flower, struct ofpbuf *buf, +@@ -983,6 +990,9 @@ parse_tc_flower_to_actions__(struct tc_flower *flower, struct ofpbuf *buf, buf, OVS_CHECK_PKT_LEN_ATTR_ACTIONS_IF_GREATER); i = parse_tc_flower_to_actions__(flower, buf, i + 1, action->police.result_jump); @@ -4781,7 +4790,7 @@ index 4c78c48163..94c17e41a4 100644 nl_msg_end_nested(buf, act_offset); act_offset = nl_msg_start_nested( -@@ -994,6 +1002,9 @@ parse_tc_flower_to_actions__(struct tc_flower *flower, struct ofpbuf *buf, +@@ -994,6 +1004,9 @@ parse_tc_flower_to_actions__(struct tc_flower *flower, struct ofpbuf *buf, } if (jump != 0) { i = parse_tc_flower_to_actions__(flower, buf, i, jump); @@ -4791,7 +4800,7 @@ index 4c78c48163..94c17e41a4 100644 } nl_msg_end_nested(buf, act_offset); -@@ -1013,11 +1024,11 @@ parse_tc_flower_to_actions__(struct tc_flower *flower, struct ofpbuf *buf, +@@ -1013,11 +1026,11 @@ parse_tc_flower_to_actions__(struct tc_flower *flower, struct ofpbuf *buf, return i; } @@ -4805,7 +4814,7 @@ index 4c78c48163..94c17e41a4 100644 } static int -@@ -1030,9 +1041,10 @@ parse_tc_flower_to_match(const struct netdev *netdev, +@@ -1030,9 +1043,10 @@ parse_tc_flower_to_match(const struct netdev *netdev, struct ofpbuf *buf, bool terse) { @@ -4817,7 +4826,7 @@ index 4c78c48163..94c17e41a4 100644 if (terse) { return parse_tc_flower_terse_to_match(flower, match, stats, attrs); -@@ -1229,7 +1241,10 @@ parse_tc_flower_to_match(const struct netdev *netdev, +@@ -1229,7 +1243,10 @@ parse_tc_flower_to_match(const struct netdev *netdev, } act_off = nl_msg_start_nested(buf, OVS_FLOW_ATTR_ACTIONS); @@ -4829,7 +4838,7 @@ index 4c78c48163..94c17e41a4 100644 nl_msg_end_nested(buf, act_off); *actions = ofpbuf_at_assert(buf, act_off, sizeof(struct nlattr)); -@@ -1272,8 +1287,8 @@ netdev_tc_flow_dump_next(struct netdev_flow_dump *dump, +@@ -1272,8 +1289,8 @@ netdev_tc_flow_dump_next(struct netdev_flow_dump *dump, continue; } @@ -4840,7 +4849,7 @@ index 4c78c48163..94c17e41a4 100644 } else if (!find_ufid(netdev, &id, ufid)) { continue; } -@@ -1576,7 +1591,9 @@ parse_put_flow_set_action(struct tc_flower *flower, struct tc_action *action, +@@ -1576,7 +1593,9 @@ parse_put_flow_set_action(struct tc_flower *flower, struct tc_action *action, } break; case OVS_TUNNEL_KEY_ATTR_TP_SRC: { @@ -4851,7 +4860,7 @@ index 4c78c48163..94c17e41a4 100644 } break; case OVS_TUNNEL_KEY_ATTR_TP_DST: { -@@ -1719,12 +1736,12 @@ test_key_and_mask(struct match *match) +@@ -1719,12 +1738,12 @@ test_key_and_mask(struct match *match) return 0; } @@ -4866,7 +4875,7 @@ index 4c78c48163..94c17e41a4 100644 /* 'flower' always has an exact match on tunnel metadata length, so having * it in a wrong format is not acceptable unless it is empty. */ -@@ -1740,7 +1757,7 @@ flower_match_to_tun_opt(struct tc_flower *flower, const struct flow_tnl *tnl, +@@ -1740,7 +1759,7 @@ flower_match_to_tun_opt(struct tc_flower *flower, const struct flow_tnl *tnl, memset(&tnl_mask->metadata.present.map, 0, sizeof tnl_mask->metadata.present.map); } @@ -4875,7 +4884,7 @@ index 4c78c48163..94c17e41a4 100644 } tnl_mask->flags &= ~FLOW_TNL_F_UDPIF; -@@ -1754,7 +1771,7 @@ flower_match_to_tun_opt(struct tc_flower *flower, const struct flow_tnl *tnl, +@@ -1754,7 +1773,7 @@ flower_match_to_tun_opt(struct tc_flower *flower, const struct flow_tnl *tnl, sizeof tnl_mask->metadata.present.len); if (!tnl->metadata.present.len) { @@ -4884,7 +4893,7 @@ index 4c78c48163..94c17e41a4 100644 } memcpy(flower->key.tunnel.metadata.opts.gnv, tnl->metadata.opts.gnv, -@@ -1768,7 +1785,16 @@ flower_match_to_tun_opt(struct tc_flower *flower, const struct flow_tnl *tnl, +@@ -1768,7 +1787,16 @@ flower_match_to_tun_opt(struct tc_flower *flower, const struct flow_tnl *tnl, * also not masks, but actual lengths in the 'flower' structure. */ len = flower->key.tunnel.metadata.present.len; while (len) { @@ -4901,7 +4910,7 @@ index 4c78c48163..94c17e41a4 100644 opt_mask = &flower->mask.tunnel.metadata.opts.gnv[cnt]; opt_mask->length = opt->length; -@@ -1776,6 +1802,8 @@ flower_match_to_tun_opt(struct tc_flower *flower, const struct flow_tnl *tnl, +@@ -1776,6 +1804,8 @@ flower_match_to_tun_opt(struct tc_flower *flower, const struct flow_tnl *tnl, cnt += sizeof(struct geneve_opt) / 4 + opt->length; len -= sizeof(struct geneve_opt) + opt->length * 4; } @@ -4910,7 +4919,7 @@ index 4c78c48163..94c17e41a4 100644 } static void -@@ -2213,7 +2241,11 @@ netdev_tc_flow_put(struct netdev *netdev, struct match *match, +@@ -2213,7 +2243,11 @@ netdev_tc_flow_put(struct netdev *netdev, struct match *match, tnl_mask->flags &= ~(FLOW_TNL_F_DONT_FRAGMENT | FLOW_TNL_F_CSUM); if (!strcmp(netdev_get_type(netdev), "geneve")) { @@ -4923,7 +4932,7 @@ index 4c78c48163..94c17e41a4 100644 } flower.tunnel = true; } else { -@@ -2490,15 +2522,23 @@ netdev_tc_flow_get(struct netdev *netdev, +@@ -2490,15 +2524,23 @@ netdev_tc_flow_get(struct netdev *netdev, err = tc_get_flower(&id, &flower); if (err) { @@ -4950,7 +4959,7 @@ index 4c78c48163..94c17e41a4 100644 if (stats) { struct dpif_flow_stats adjust_stats; -@@ -2860,8 +2900,9 @@ netdev_tc_init_flow_api(struct netdev *netdev) +@@ -2860,8 +2902,9 @@ netdev_tc_init_flow_api(struct netdev *netdev) error = tc_add_del_qdisc(ifindex, true, block_id, hook); if (error && error != EEXIST) { @@ -6727,10 +6736,18 @@ index 4c07e22162..5b193bc395 100644 id->prio = tc_get_major(tc->tcm_info); id->handle = tc->tcm_handle; diff --git a/lib/tc.h b/lib/tc.h -index cdd3b4f60e..ea2c5adc19 100644 +index cdd3b4f60e..44f34dfc80 100644 --- a/lib/tc.h +++ b/lib/tc.h -@@ -227,7 +227,8 @@ struct tc_action { +@@ -51,6 +51,7 @@ enum tc_flower_reserved_prio { + TC_RESERVED_PRIORITY_POLICE, + TC_RESERVED_PRIORITY_IPV4, + TC_RESERVED_PRIORITY_IPV6, ++ TC_RESERVED_PRIORITY_VLAN, + __TC_RESERVED_PRIORITY_MAX + }; + #define TC_RESERVED_PRIORITY_MAX (__TC_RESERVED_PRIORITY_MAX -1) +@@ -227,7 +228,8 @@ struct tc_action { struct { bool id_present; ovs_be64 id; diff --git a/SPECS/openvswitch3.1.spec b/SPECS/openvswitch3.1.spec index 4f095ba..c1904e1 100644 --- a/SPECS/openvswitch3.1.spec +++ b/SPECS/openvswitch3.1.spec @@ -57,7 +57,7 @@ Summary: Open vSwitch Group: System Environment/Daemons daemon/database/utilities URL: http://www.openvswitch.org/ Version: 3.1.0 -Release: 120%{?dist} +Release: 121%{?dist} # Nearly all of openvswitch is ASL 2.0. The bugtool is LGPLv2+, and the # lib/sflow*.[ch] files are SISSL @@ -754,6 +754,21 @@ exit 0 %endif %changelog +* Tue Jul 02 2024 Michael Santana - 3.1.0-121 +- netdev-offload-tc: Reserve lower tc prio for vlan ethertype. [RH git: fbbb88704b] + The cited commit reserved lower tc priorities for IP ethertypes in order + to give IP traffic higher priority than other management traffic. + In case of of vlan encap traffic, IP traffic will still get lower + priority. + + Fix it by also reserving low priority tc prio for vlan. + + Fixes: c230c7579c14 ("netdev-offload-tc: Reserve lower tc prios for ip ethertypes") + Signed-off-by: Maor Dickman + Acked-by: Roi Dayan + Signed-off-by: Simon Horman + + * Tue Jun 25 2024 Open vSwitch CI - 3.1.0-120 - Merging upstream branch-3.1 [RH git: 60e85c06d2] Commit list: