From 41bc02adf6aeae9100e2fd3594bda9bdd7efd4ce Mon Sep 17 00:00:00 2001 From: Open vSwitch CI Date: Jan 30 2025 01:47:49 +0000 Subject: Import openvswitch3.3-3.3.0-34 from Fast DataPath --- diff --git a/SOURCES/openvswitch-3.3.0.patch b/SOURCES/openvswitch-3.3.0.patch index 2085c61..9f60285 100644 --- a/SOURCES/openvswitch-3.3.0.patch +++ b/SOURCES/openvswitch-3.3.0.patch @@ -3680,7 +3680,7 @@ index eb55dd0417..5d8f1672a8 100644 void * netdev_tnl_ip_extract_tnl_md(struct dp_packet *packet, struct flow_tnl *tnl, diff --git a/lib/netdev-offload-tc.c b/lib/netdev-offload-tc.c -index 921d523177..44b056535f 100644 +index 921d523177..31f3726509 100644 --- a/lib/netdev-offload-tc.c +++ b/lib/netdev-offload-tc.c @@ -400,6 +400,8 @@ get_next_available_prio(ovs_be16 protocol) @@ -3739,16 +3739,51 @@ index 921d523177..44b056535f 100644 for (i = 0; i < ARRAY_SIZE(set_flower_map[type]); i++) { struct netlink_field *f = &set_flower_map[type][i]; -@@ -2445,6 +2480,12 @@ netdev_tc_flow_put(struct netdev *netdev, struct match *match, +@@ -2218,6 +2253,7 @@ netdev_tc_flow_put(struct netdev *netdev, struct match *match, + const struct flow_tnl *tnl = &match->flow.tunnel; + struct flow_tnl *tnl_mask = &mask->tunnel; + struct dpif_flow_stats adjust_stats; ++ bool exact_match_on_dl_type; + bool recirc_act = false; + uint32_t block_id = 0; + struct tcf_id id; +@@ -2235,6 +2271,7 @@ netdev_tc_flow_put(struct netdev *netdev, struct match *match, + + memset(&flower, 0, sizeof flower); + ++ exact_match_on_dl_type = mask->dl_type == htons(0xffff); + chain = key->recirc_id; + mask->recirc_id = 0; + +@@ -2399,7 +2436,7 @@ netdev_tc_flow_put(struct netdev *netdev, struct match *match, + mask->dl_type = 0; + mask->in_port.odp_port = 0; + +- if (key->dl_type == htons(ETH_P_ARP)) { ++ if (exact_match_on_dl_type && key->dl_type == htons(ETH_P_ARP)) { + flower.key.arp.spa = key->nw_src; + flower.key.arp.tpa = key->nw_dst; + flower.key.arp.sha = key->arp_sha; +@@ -2418,7 +2455,8 @@ netdev_tc_flow_put(struct netdev *netdev, struct match *match, + memset(&mask->arp_tha, 0, sizeof mask->arp_tha); + } + +- if (is_ip_any(key) && !is_ipv6_fragment_and_masked(key, mask)) { ++ if (exact_match_on_dl_type && is_ip_any(key) ++ && !is_ipv6_fragment_and_masked(key, mask)) { + flower.key.ip_proto = key->nw_proto; + flower.mask.ip_proto = mask->nw_proto; + mask->nw_proto = 0; +@@ -2445,6 +2483,12 @@ netdev_tc_flow_put(struct netdev *netdev, struct match *match, } mask->nw_frag = 0; + } else { + /* This scenario should not occur. Currently, all installed IP DP + * flows perform a fully masked match on the fragmentation bits. -+ * However, since TC depends on this behavior, we return ENOTSUPP ++ * However, since TC depends on this behavior, we return EOPNOTSUPP + * for now in case this behavior changes in the future. */ -+ return EOPNOTSUPP; ++ return EOPNOTSUPP; } if (key->nw_proto == IPPROTO_TCP) { @@ -8074,7 +8109,7 @@ index 6fbdedb64f..5dcdd2afae 100644 OVS_CHECK_BAREUDP() OVS_TRAFFIC_VSWITCHD_START([_ADD_BR([br1])]) diff --git a/tests/system-offloads-traffic.at b/tests/system-offloads-traffic.at -index 6bd49a3eef..d33c782cf4 100644 +index 6bd49a3eef..7648d55946 100644 --- a/tests/system-offloads-traffic.at +++ b/tests/system-offloads-traffic.at @@ -812,6 +812,7 @@ OVS_CHECK_VXLAN() @@ -8120,6 +8155,40 @@ index 6bd49a3eef..d33c782cf4 100644 dnl First, check the underlay. NS_CHECK_EXEC([at_ns0], [ping -q -c 3 -i 0.3 -W 2 172.31.1.100 | FORMAT_PING], [0], [dnl +@@ -921,3 +946,33 @@ AT_CHECK([tc -d filter show dev ovs-p0 ingress | grep -q "csum (iph)"], [0]) + + OVS_TRAFFIC_VSWITCHD_STOP + AT_CLEANUP ++ ++AT_SETUP([offloads - 802.1ad should be offloaded]) ++OVS_TRAFFIC_VSWITCHD_START( ++ [], [], [-- set Open_vSwitch . other_config:hw-offload=true]) ++OVS_CHECK_8021AD() ++ ++ADD_NAMESPACES(at_ns0, at_ns1) ++ ++ADD_VETH(p0, at_ns0, br0, "10.1.1.1/24") ++ADD_VETH(p1, at_ns1, br0, "10.1.1.2/24") ++ ++ADD_SVLAN(p0, at_ns0, 4094, "10.255.2.1/24") ++ADD_SVLAN(p1, at_ns1, 4094, "10.255.2.2/24") ++ ++ADD_CVLAN(p0.4094, at_ns0, 100, "10.2.2.1/24") ++ADD_CVLAN(p1.4094, at_ns1, 100, "10.2.2.2/24") ++ ++AT_CHECK([ovs-ofctl add-flow br0 "priority=1 action=normal"]) ++ ++OVS_WAIT_UNTIL([ip netns exec at_ns0 ping -c 1 10.2.2.2]) ++ ++AT_CHECK([ovs-appctl dpctl/dump-flows type=tc,offloaded | grep "eth_type(0x0800)" | DUMP_CLEAN_SORTED], [0], [dnl ++in_port(2),eth(macs),eth_type(0x88a8),vlan(vid=4094,pcp=0),encap(eth_type(0x0800)), packets:0, bytes:0, used:0.001s, actions:output ++in_port(3),eth(macs),eth_type(0x88a8),vlan(vid=4094,pcp=0),encap(eth_type(0x0800)), packets:0, bytes:0, used:0.001s, actions:output ++]) ++ ++AT_CHECK([ovs-appctl dpctl/dump-flows type=ovs | grep "eth_type(0x0800)" | DUMP_CLEAN_SORTED], [0], []) ++ ++OVS_TRAFFIC_VSWITCHD_STOP ++AT_CLEANUP diff --git a/tests/system-route.at b/tests/system-route.at index 114aaebc77..c0ecad6cfb 100644 --- a/tests/system-route.at diff --git a/SPECS/openvswitch3.3.spec b/SPECS/openvswitch3.3.spec index 1814a8e..d476191 100644 --- a/SPECS/openvswitch3.3.spec +++ b/SPECS/openvswitch3.3.spec @@ -57,7 +57,7 @@ Summary: Open vSwitch Group: System Environment/Daemons daemon/database/utilities URL: http://www.openvswitch.org/ Version: 3.3.0 -Release: 33%{?dist} +Release: 34%{?dist} # Nearly all of openvswitch is ASL 2.0. The bugtool is LGPLv2+, and the # lib/sflow*.[ch] files are SISSL @@ -769,6 +769,12 @@ exit 0 %endif %changelog +* Wed Jan 29 2025 Open vSwitch CI - 3.3.0-34 +- Merging upstream branch-3.3 [RH git: 1a153eee11] + Commit list: + 0ea53574aa netdev-offload-tc: Fix ignore of dl type mask when installing flows. (FDP-1114) + + * Fri Jan 24 2025 Open vSwitch CI - 3.3.0-33 - Merging upstream branch-3.3 [RH git: 83b78a542c] Commit list: