diff --git a/SOURCES/openvswitch-2.17.0.patch b/SOURCES/openvswitch-2.17.0.patch index bb4ef2a..e27b2d1 100644 --- a/SOURCES/openvswitch-2.17.0.patch +++ b/SOURCES/openvswitch-2.17.0.patch @@ -53783,7 +53783,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..93321989a9 100644 +index 9845e8d3fe..ba40531b5d 100644 --- a/lib/netdev-offload-tc.c +++ b/lib/netdev-offload-tc.c @@ -44,6 +44,7 @@ @@ -53934,6 +53934,26 @@ index 9845e8d3fe..93321989a9 100644 } break; case TC_ACT_ENCAP: { +@@ -965,13 +987,13 @@ parse_tc_flower_to_match(struct tc_flower *flower, + struct { + ovs_u128 key; + ovs_u128 mask; +- } *ct_label; ++ } ct_label = { ++ .key = action->ct.label, ++ .mask = action->ct.label_mask, ++ }; + +- ct_label = nl_msg_put_unspec_uninit(buf, +- OVS_CT_ATTR_LABELS, +- sizeof *ct_label); +- ct_label->key = action->ct.label; +- ct_label->mask = action->ct.label_mask; ++ nl_msg_put_unspec(buf, OVS_CT_ATTR_LABELS, ++ &ct_label, sizeof ct_label); + } + + if (action->ct.nat_type) { @@ -1054,8 +1076,8 @@ netdev_tc_flow_dump_next(struct netdev_flow_dump *dump, continue; } @@ -53945,7 +53965,26 @@ index 9845e8d3fe..93321989a9 100644 continue; } -@@ -1222,8 +1244,8 @@ parse_put_flow_set_masked_action(struct tc_flower *flower, +@@ -1194,13 +1216,14 @@ parse_put_flow_ct_action(struct tc_flower *flower, + break; + case OVS_CT_ATTR_LABELS: { + const struct { +- ovs_u128 key; +- ovs_u128 mask; ++ ovs_32aligned_u128 key; ++ ovs_32aligned_u128 mask; + } *ct_label; + + ct_label = nl_attr_get_unspec(ct_attr, sizeof *ct_label); +- action->ct.label = ct_label->key; +- action->ct.label_mask = ct_label->mask; ++ action->ct.label = get_32aligned_u128(&ct_label->key); ++ action->ct.label_mask = ++ get_32aligned_u128(&ct_label->mask); + } + break; + } +@@ -1222,8 +1245,8 @@ parse_put_flow_set_masked_action(struct tc_flower *flower, uint64_t set_stub[1024 / 8]; struct ofpbuf set_buf = OFPBUF_STUB_INITIALIZER(set_stub); char *set_data, *set_mask; @@ -53956,7 +53995,7 @@ index 9845e8d3fe..93321989a9 100644 const struct nlattr *attr; int i, j, type; size_t size; -@@ -1265,14 +1287,6 @@ parse_put_flow_set_masked_action(struct tc_flower *flower, +@@ -1265,14 +1288,6 @@ parse_put_flow_set_masked_action(struct tc_flower *flower, } } @@ -53971,7 +54010,7 @@ index 9845e8d3fe..93321989a9 100644 if (hasmask && !is_all_zeros(set_mask, size)) { VLOG_DBG_RL(&rl, "unsupported sub attribute of set action type %d", type); -@@ -1281,6 +1295,8 @@ parse_put_flow_set_masked_action(struct tc_flower *flower, +@@ -1281,6 +1296,8 @@ parse_put_flow_set_masked_action(struct tc_flower *flower, } ofpbuf_uninit(&set_buf); @@ -53980,7 +54019,7 @@ index 9845e8d3fe..93321989a9 100644 return 0; } -@@ -1288,6 +1304,7 @@ static int +@@ -1288,6 +1305,7 @@ static int parse_put_flow_set_action(struct tc_flower *flower, struct tc_action *action, const struct nlattr *set, size_t set_len) { @@ -53988,7 +54027,7 @@ index 9845e8d3fe..93321989a9 100644 const struct nlattr *tunnel; const struct nlattr *tun_attr; size_t tun_left, tunnel_len; -@@ -1306,6 +1323,7 @@ parse_put_flow_set_action(struct tc_flower *flower, struct tc_action *action, +@@ -1306,6 +1324,7 @@ parse_put_flow_set_action(struct tc_flower *flower, struct tc_action *action, action->type = TC_ACT_ENCAP; action->encap.id_present = false; @@ -53996,7 +54035,7 @@ index 9845e8d3fe..93321989a9 100644 flower->action_count++; NL_ATTR_FOR_EACH_UNSAFE(tun_attr, tun_left, tunnel, tunnel_len) { switch (nl_attr_type(tun_attr)) { -@@ -1330,6 +1348,18 @@ parse_put_flow_set_action(struct tc_flower *flower, struct tc_action *action, +@@ -1330,6 +1349,18 @@ parse_put_flow_set_action(struct tc_flower *flower, struct tc_action *action, action->encap.ttl = nl_attr_get_u8(tun_attr); } break; @@ -54015,7 +54054,7 @@ index 9845e8d3fe..93321989a9 100644 case OVS_TUNNEL_KEY_ATTR_IPV6_SRC: { action->encap.ipv6.ipv6_src = nl_attr_get_in6_addr(tun_attr); -@@ -1354,12 +1384,31 @@ parse_put_flow_set_action(struct tc_flower *flower, struct tc_action *action, +@@ -1354,12 +1385,31 @@ parse_put_flow_set_action(struct tc_flower *flower, struct tc_action *action, action->encap.data.present.len = nl_attr_get_size(tun_attr); } break; @@ -54047,7 +54086,7 @@ index 9845e8d3fe..93321989a9 100644 static int test_key_and_mask(struct match *match) { -@@ -1442,8 +1491,23 @@ test_key_and_mask(struct match *match) +@@ -1442,8 +1492,23 @@ test_key_and_mask(struct match *match) return EOPNOTSUPP; } @@ -54072,7 +54111,7 @@ index 9845e8d3fe..93321989a9 100644 return EOPNOTSUPP; } -@@ -1452,18 +1516,51 @@ test_key_and_mask(struct match *match) +@@ -1452,18 +1517,51 @@ test_key_and_mask(struct match *match) static void flower_match_to_tun_opt(struct tc_flower *flower, const struct flow_tnl *tnl, @@ -54127,7 +54166,7 @@ index 9845e8d3fe..93321989a9 100644 len = flower->key.tunnel.metadata.present.len; while (len) { opt = &flower->key.tunnel.metadata.opts.gnv[cnt]; -@@ -1474,8 +1571,6 @@ flower_match_to_tun_opt(struct tc_flower *flower, const struct flow_tnl *tnl, +@@ -1474,8 +1572,6 @@ 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; } @@ -54136,7 +54175,7 @@ index 9845e8d3fe..93321989a9 100644 } static void -@@ -1541,6 +1636,12 @@ parse_match_ct_state_to_flower(struct tc_flower *flower, struct match *match) +@@ -1541,6 +1637,12 @@ parse_match_ct_state_to_flower(struct tc_flower *flower, struct match *match) flower->key.ct_state &= ~(TCA_FLOWER_KEY_CT_FLAGS_NEW); flower->mask.ct_state &= ~(TCA_FLOWER_KEY_CT_FLAGS_NEW); } @@ -54149,7 +54188,7 @@ index 9845e8d3fe..93321989a9 100644 } if (mask->ct_zone) { -@@ -1574,7 +1675,7 @@ netdev_tc_flow_put(struct netdev *netdev, struct match *match, +@@ -1574,7 +1676,7 @@ netdev_tc_flow_put(struct netdev *netdev, struct match *match, const struct flow *key = &match->flow; struct flow *mask = &match->wc.masks; const struct flow_tnl *tnl = &match->flow.tunnel; @@ -54158,7 +54197,7 @@ index 9845e8d3fe..93321989a9 100644 struct tc_action *action; bool recirc_act = false; uint32_t block_id = 0; -@@ -1615,17 +1716,49 @@ netdev_tc_flow_put(struct netdev *netdev, struct match *match, +@@ -1615,17 +1717,49 @@ netdev_tc_flow_put(struct netdev *netdev, struct match *match, flower.key.tunnel.ttl = tnl->ip_ttl; flower.key.tunnel.tp_src = tnl->tp_src; flower.key.tunnel.tp_dst = tnl->tp_dst; @@ -54210,7 +54249,7 @@ index 9845e8d3fe..93321989a9 100644 flower.key.eth_type = key->dl_type; flower.mask.eth_type = mask->dl_type; -@@ -1638,7 +1771,7 @@ netdev_tc_flow_put(struct netdev *netdev, struct match *match, +@@ -1638,7 +1772,7 @@ netdev_tc_flow_put(struct netdev *netdev, struct match *match, if (mask->vlans[0].tpid && eth_type_vlan(key->vlans[0].tpid)) { flower.key.encap_eth_type[0] = flower.key.eth_type; @@ -54219,7 +54258,7 @@ index 9845e8d3fe..93321989a9 100644 flower.key.eth_type = key->vlans[0].tpid; flower.mask.eth_type = mask->vlans[0].tpid; } -@@ -1734,7 +1867,7 @@ netdev_tc_flow_put(struct netdev *netdev, struct match *match, +@@ -1734,7 +1868,7 @@ netdev_tc_flow_put(struct netdev *netdev, struct match *match, memset(&mask->arp_tha, 0, sizeof mask->arp_tha); } @@ -54228,7 +54267,7 @@ index 9845e8d3fe..93321989a9 100644 flower.key.ip_proto = key->nw_proto; flower.mask.ip_proto = mask->nw_proto; mask->nw_proto = 0; -@@ -1841,7 +1974,25 @@ netdev_tc_flow_put(struct netdev *netdev, struct match *match, +@@ -1841,7 +1975,25 @@ netdev_tc_flow_put(struct netdev *netdev, struct match *match, VLOG_DBG_RL(&rl, "Can't find netdev for output port %d", port); return ENODEV; } @@ -54254,7 +54293,7 @@ index 9845e8d3fe..93321989a9 100644 action->out.ingress = is_internal_port(netdev_get_type(outdev)); action->type = TC_ACT_OUTPUT; flower.action_count++; -@@ -1879,10 +2030,6 @@ netdev_tc_flow_put(struct netdev *netdev, struct match *match, +@@ -1879,10 +2031,6 @@ netdev_tc_flow_put(struct netdev *netdev, struct match *match, if (err) { return err; } @@ -54265,7 +54304,7 @@ index 9845e8d3fe..93321989a9 100644 } else if (nl_attr_type(nla) == OVS_ACTION_ATTR_SET_MASKED) { const struct nlattr *set = nl_attr_get(nla); const size_t set_len = nl_attr_get_size(nla); -@@ -1989,7 +2136,8 @@ netdev_tc_flow_get(struct netdev *netdev, +@@ -1989,7 +2137,8 @@ netdev_tc_flow_get(struct netdev *netdev, } in_port = netdev_ifindex_to_odp_port(id.ifindex); @@ -54275,7 +54314,7 @@ index 9845e8d3fe..93321989a9 100644 match->wc.masks.in_port.odp_port = u32_to_odp(UINT32_MAX); match->flow.in_port.odp_port = in_port; -@@ -2015,9 +2163,7 @@ netdev_tc_flow_del(struct netdev *netdev OVS_UNUSED, +@@ -2015,9 +2164,7 @@ netdev_tc_flow_del(struct netdev *netdev OVS_UNUSED, if (stats) { memset(stats, 0, sizeof *stats); if (!tc_get_flower(&id, &flower)) { diff --git a/SPECS/openvswitch2.17.spec b/SPECS/openvswitch2.17.spec index 74a7520..1702ec3 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: 72%{?dist} +Release: 73%{?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 +* Fri Jan 27 2023 Open vSwitch CI - 2.17.0-73 +- Merging upstream branch-2.17 [RH git: 013a2a32fa] + Commit list: + 037131229b netdev-offload-tc: Fix misaligned access to ct label. + + * Wed Jan 18 2023 Open vSwitch CI - 2.17.0-72 - Merging upstream branch-2.17 [RH git: 2a84e6d692] Commit list: