From 58d42236620fc9023f00c9717c87a02b4f11888e Mon Sep 17 00:00:00 2001 From: Open vSwitch CI Date: Nov 24 2023 15:55:57 +0000 Subject: Import openvswitch3.1-3.1.0-74 from Fast DataPath --- diff --git a/SOURCES/openvswitch-3.1.0.patch b/SOURCES/openvswitch-3.1.0.patch index a4f4a2c..7a6ade6 100644 --- a/SOURCES/openvswitch-3.1.0.patch +++ b/SOURCES/openvswitch-3.1.0.patch @@ -3056,6 +3056,41 @@ index 8102475ca..cdf42935c 100644 po.buffer_id = buffer_id; if (buffer_id == UINT32_MAX) { po.packet = dp_packet_data(&pkt); +diff --git a/lib/mcast-snooping.c b/lib/mcast-snooping.c +index 029ca2855..43805ae4d 100644 +--- a/lib/mcast-snooping.c ++++ b/lib/mcast-snooping.c +@@ -946,8 +946,9 @@ mcast_snooping_wait(struct mcast_snooping *ms) + void + mcast_snooping_flush_bundle(struct mcast_snooping *ms, void *port) + { +- struct mcast_group *g; + struct mcast_mrouter_bundle *m; ++ struct mcast_port_bundle *p; ++ struct mcast_group *g; + + if (!mcast_snooping_enabled(ms)) { + return; +@@ -971,5 +972,19 @@ mcast_snooping_flush_bundle(struct mcast_snooping *ms, void *port) + } + } + ++ LIST_FOR_EACH_SAFE (p, node, &ms->fport_list) { ++ if (p->port == port) { ++ mcast_snooping_flush_port(p); ++ ms->need_revalidate = true; ++ } ++ } ++ ++ LIST_FOR_EACH_SAFE (p, node, &ms->rport_list) { ++ if (p->port == port) { ++ mcast_snooping_flush_port(p); ++ ms->need_revalidate = true; ++ } ++ } ++ + ovs_rwlock_unlock(&ms->rwlock); + } diff --git a/lib/meta-flow.c b/lib/meta-flow.c index c576ae620..474344194 100644 --- a/lib/meta-flow.c @@ -7567,6 +7602,339 @@ index 000000000..ac2fc1b80 +OVS_WAIT_UNTIL([! test -e controller]) +OVS_VSWITCHD_STOP(["/cannot find route for controller/d"]) +AT_CLEANUP +diff --git a/tests/mcast-snooping.at b/tests/mcast-snooping.at +index fe475e7b3..77b3acddb 100644 +--- a/tests/mcast-snooping.at ++++ b/tests/mcast-snooping.at +@@ -105,6 +105,328 @@ AT_CHECK([ovs-appctl mdb/show br0], [0], [dnl + OVS_VSWITCHD_STOP + AT_CLEANUP + ++ ++AT_SETUP([mcast - check multicast per port flooding]) ++OVS_VSWITCHD_START([]) ++ ++AT_CHECK([ ++ ovs-vsctl set bridge br0 \ ++ datapath_type=dummy \ ++ mcast_snooping_enable=true \ ++ other-config:mcast-snooping-disable-flood-unregistered=false ++], [0]) ++ ++AT_CHECK([ovs-ofctl add-flow br0 action=normal]) ++ ++AT_CHECK([ ++ ovs-vsctl add-port br0 p1 \ ++ -- set Interface p1 type=dummy other-config:hwaddr=aa:55:aa:55:00:01 ofport_request=1 \ ++ -- add-port br0 p2 \ ++ -- set Interface p2 type=dummy other-config:hwaddr=aa:55:aa:55:00:02 ofport_request=2 \ ++ -- add-port br0 p3 \ ++ -- set Interface p3 type=dummy other-config:hwaddr=aa:55:aa:55:00:03 ofport_request=3 \ ++], [0]) ++ ++ovs-appctl time/stop ++ ++AT_CHECK([ovs-appctl ofproto/trace "in_port(3),eth(src=aa:55:aa:55:00:ff,dst=01:00:5e:01:01:01),eth_type(0x0800),ipv4(src=10.0.0.1,dst=224.1.1.1,proto=17,tos=0,ttl=64,frag=no),udp(src=0,dst=8000)"], [0], [stdout]) ++AT_CHECK([grep -v 'Datapath actions:' stdout], [0], [dnl ++Flow: udp,in_port=3,vlan_tci=0x0000,dl_src=aa:55:aa:55:00:ff,dl_dst=01:00:5e:01:01:01,nw_src=10.0.0.1,nw_dst=224.1.1.1,nw_tos=0,nw_ecn=0,nw_ttl=64,nw_frag=no,tp_src=0,tp_dst=8000 ++ ++bridge("br0") ++------------- ++ 0. priority 32768 ++ NORMAL ++ -> unregistered multicast, flooding ++ ++Final flow: unchanged ++Megaflow: recirc_id=0,eth,udp,in_port=3,dl_src=aa:55:aa:55:00:ff,dl_dst=01:00:5e:01:01:01,nw_dst=224.1.1.1,nw_frag=no ++]) ++AT_CHECK([sed -ne 's/^Datapath actions: \(.*\)$/\1/p' stdout | tr "," "\n" | sort -n], [0], [dnl ++1 ++2 ++100 ++]) ++ ++# Send report packets. ++AT_CHECK([ ++ ovs-appctl netdev-dummy/receive p1 \ ++ '01005E010101000C29A027A108004500001C000100004002CBAEAC10221EE001010112140CE9E0010101' ++], [0]) ++AT_CHECK([ovs-appctl mdb/show br0], [0], [dnl ++ port VLAN GROUP Age ++ 1 0 224.1.1.1 0 ++]) ++ ++AT_CHECK([ovs-appctl ofproto/trace "in_port(3),eth(src=aa:55:aa:55:00:ff,dst=01:00:5e:01:01:01),eth_type(0x0800),ipv4(src=10.0.0.1,dst=224.1.1.1,proto=17,tos=0,ttl=64,frag=no),udp(src=0,dst=8000)"], [0], [dnl ++Flow: udp,in_port=3,vlan_tci=0x0000,dl_src=aa:55:aa:55:00:ff,dl_dst=01:00:5e:01:01:01,nw_src=10.0.0.1,nw_dst=224.1.1.1,nw_tos=0,nw_ecn=0,nw_ttl=64,nw_frag=no,tp_src=0,tp_dst=8000 ++ ++bridge("br0") ++------------- ++ 0. priority 32768 ++ NORMAL ++ -> forwarding to mcast group port ++ ++Final flow: unchanged ++Megaflow: recirc_id=0,eth,udp,in_port=3,dl_src=aa:55:aa:55:00:ff,dl_dst=01:00:5e:01:01:01,nw_dst=224.1.1.1,nw_frag=no ++Datapath actions: 1 ++]) ++ ++AT_CHECK([ovs-vsctl set port p2 other_config:mcast-snooping-flood=true]) ++ ++AT_CHECK([ovs-appctl ofproto/trace "in_port(3),eth(src=aa:55:aa:55:00:ff,dst=01:00:5e:01:01:01),eth_type(0x0800),ipv4(src=10.0.0.1,dst=224.1.1.1,proto=17,tos=0,ttl=64,frag=no),udp(src=0,dst=8000)"], [0], [dnl ++Flow: udp,in_port=3,vlan_tci=0x0000,dl_src=aa:55:aa:55:00:ff,dl_dst=01:00:5e:01:01:01,nw_src=10.0.0.1,nw_dst=224.1.1.1,nw_tos=0,nw_ecn=0,nw_ttl=64,nw_frag=no,tp_src=0,tp_dst=8000 ++ ++bridge("br0") ++------------- ++ 0. priority 32768 ++ NORMAL ++ -> forwarding to mcast group port ++ -> forwarding to mcast flood port ++ ++Final flow: unchanged ++Megaflow: recirc_id=0,eth,udp,in_port=3,dl_src=aa:55:aa:55:00:ff,dl_dst=01:00:5e:01:01:01,nw_dst=224.1.1.1,nw_frag=no ++Datapath actions: 1,2 ++]) ++ ++AT_CHECK([ovs-vsctl set port p3 other_config:mcast-snooping-flood=true]) ++ ++AT_CHECK([ovs-appctl ofproto/trace "in_port(3),eth(src=aa:55:aa:55:00:ff,dst=01:00:5e:01:01:01),eth_type(0x0800),ipv4(src=10.0.0.1,dst=224.1.1.1,proto=17,tos=0,ttl=64,frag=no),udp(src=0,dst=8000)"], [0], [dnl ++Flow: udp,in_port=3,vlan_tci=0x0000,dl_src=aa:55:aa:55:00:ff,dl_dst=01:00:5e:01:01:01,nw_src=10.0.0.1,nw_dst=224.1.1.1,nw_tos=0,nw_ecn=0,nw_ttl=64,nw_frag=no,tp_src=0,tp_dst=8000 ++ ++bridge("br0") ++------------- ++ 0. priority 32768 ++ NORMAL ++ -> forwarding to mcast group port ++ -> forwarding to mcast flood port ++ -> mcast flood port is input port, dropping ++ ++Final flow: unchanged ++Megaflow: recirc_id=0,eth,udp,in_port=3,dl_src=aa:55:aa:55:00:ff,dl_dst=01:00:5e:01:01:01,nw_dst=224.1.1.1,nw_frag=no ++Datapath actions: 1,2 ++]) ++ ++# Change p2 ofport to force a ofbundle change and check that the mdb contains ++# no stale port. ++AT_CHECK([ovs-vsctl set interface p2 ofport_request=4]) ++ ++AT_CHECK([ovs-appctl ofproto/trace "in_port(3),eth(src=aa:55:aa:55:00:ff,dst=01:00:5e:01:01:01),eth_type(0x0800),ipv4(src=10.0.0.1,dst=224.1.1.1,proto=17,tos=0,ttl=64,frag=no),udp(src=0,dst=8000)"], [0], [dnl ++Flow: udp,in_port=3,vlan_tci=0x0000,dl_src=aa:55:aa:55:00:ff,dl_dst=01:00:5e:01:01:01,nw_src=10.0.0.1,nw_dst=224.1.1.1,nw_tos=0,nw_ecn=0,nw_ttl=64,nw_frag=no,tp_src=0,tp_dst=8000 ++ ++bridge("br0") ++------------- ++ 0. priority 32768 ++ NORMAL ++ -> forwarding to mcast group port ++ -> mcast flood port is input port, dropping ++ -> forwarding to mcast flood port ++ ++Final flow: unchanged ++Megaflow: recirc_id=0,eth,udp,in_port=3,dl_src=aa:55:aa:55:00:ff,dl_dst=01:00:5e:01:01:01,nw_dst=224.1.1.1,nw_frag=no ++Datapath actions: 1,2 ++]) ++ ++OVS_VSWITCHD_STOP ++AT_CLEANUP ++ ++ ++AT_SETUP([mcast - check multicast per port flooding (unregistered flood disabled)]) ++OVS_VSWITCHD_START([]) ++ ++AT_CHECK([ ++ ovs-vsctl set bridge br0 \ ++ datapath_type=dummy \ ++ mcast_snooping_enable=true \ ++ other-config:mcast-snooping-disable-flood-unregistered=true ++], [0]) ++ ++AT_CHECK([ovs-ofctl add-flow br0 action=normal]) ++ ++AT_CHECK([ ++ ovs-vsctl add-port br0 p1 \ ++ -- set Interface p1 type=dummy other-config:hwaddr=aa:55:aa:55:00:01 ofport_request=1 \ ++ -- add-port br0 p2 \ ++ -- set Interface p2 type=dummy other-config:hwaddr=aa:55:aa:55:00:02 ofport_request=2 \ ++ -- add-port br0 p3 \ ++ -- set Interface p3 type=dummy other-config:hwaddr=aa:55:aa:55:00:03 ofport_request=3 \ ++], [0]) ++ ++ovs-appctl time/stop ++ ++AT_CHECK([ovs-appctl ofproto/trace "in_port(3),eth(src=aa:55:aa:55:00:ff,dst=01:00:5e:01:01:01),eth_type(0x0800),ipv4(src=10.0.0.1,dst=224.1.1.1,proto=17,tos=0,ttl=64,frag=no),udp(src=0,dst=8000)"], [0], [dnl ++Flow: udp,in_port=3,vlan_tci=0x0000,dl_src=aa:55:aa:55:00:ff,dl_dst=01:00:5e:01:01:01,nw_src=10.0.0.1,nw_dst=224.1.1.1,nw_tos=0,nw_ecn=0,nw_ttl=64,nw_frag=no,tp_src=0,tp_dst=8000 ++ ++bridge("br0") ++------------- ++ 0. priority 32768 ++ NORMAL ++ ++Final flow: unchanged ++Megaflow: recirc_id=0,eth,udp,in_port=3,dl_src=aa:55:aa:55:00:ff,dl_dst=01:00:5e:01:01:01,nw_dst=224.1.1.1,nw_frag=no ++Datapath actions: drop ++]) ++ ++AT_CHECK([ovs-vsctl set port p2 other_config:mcast-snooping-flood=true]) ++ ++AT_CHECK([ovs-appctl ofproto/trace "in_port(3),eth(src=aa:55:aa:55:00:ff,dst=01:00:5e:01:01:01),eth_type(0x0800),ipv4(src=10.0.0.1,dst=224.1.1.1,proto=17,tos=0,ttl=64,frag=no),udp(src=0,dst=8000)"], [0], [dnl ++Flow: udp,in_port=3,vlan_tci=0x0000,dl_src=aa:55:aa:55:00:ff,dl_dst=01:00:5e:01:01:01,nw_src=10.0.0.1,nw_dst=224.1.1.1,nw_tos=0,nw_ecn=0,nw_ttl=64,nw_frag=no,tp_src=0,tp_dst=8000 ++ ++bridge("br0") ++------------- ++ 0. priority 32768 ++ NORMAL ++ -> forwarding to mcast flood port ++ ++Final flow: unchanged ++Megaflow: recirc_id=0,eth,udp,in_port=3,dl_src=aa:55:aa:55:00:ff,dl_dst=01:00:5e:01:01:01,nw_dst=224.1.1.1,nw_frag=no ++Datapath actions: 2 ++]) ++ ++AT_CHECK([ovs-vsctl set port p3 other_config:mcast-snooping-flood=true]) ++ ++AT_CHECK([ovs-appctl ofproto/trace "in_port(3),eth(src=aa:55:aa:55:00:ff,dst=01:00:5e:01:01:01),eth_type(0x0800),ipv4(src=10.0.0.1,dst=224.1.1.1,proto=17,tos=0,ttl=64,frag=no),udp(src=0,dst=8000)"], [0], [dnl ++Flow: udp,in_port=3,vlan_tci=0x0000,dl_src=aa:55:aa:55:00:ff,dl_dst=01:00:5e:01:01:01,nw_src=10.0.0.1,nw_dst=224.1.1.1,nw_tos=0,nw_ecn=0,nw_ttl=64,nw_frag=no,tp_src=0,tp_dst=8000 ++ ++bridge("br0") ++------------- ++ 0. priority 32768 ++ NORMAL ++ -> forwarding to mcast flood port ++ -> mcast flood port is input port, dropping ++ ++Final flow: unchanged ++Megaflow: recirc_id=0,eth,udp,in_port=3,dl_src=aa:55:aa:55:00:ff,dl_dst=01:00:5e:01:01:01,nw_dst=224.1.1.1,nw_frag=no ++Datapath actions: 2 ++]) ++ ++OVS_VSWITCHD_STOP ++AT_CLEANUP ++ ++ ++AT_SETUP([mcast - check reports per port flooding]) ++OVS_VSWITCHD_START([]) ++ ++AT_CHECK([ ++ ovs-vsctl set bridge br0 \ ++ datapath_type=dummy \ ++ mcast_snooping_enable=true \ ++ other-config:mcast-snooping-disable-flood-unregistered=false ++], [0]) ++ ++AT_CHECK([ovs-ofctl add-flow br0 action=normal]) ++ ++AT_CHECK([ ++ ovs-vsctl add-port br0 p1 \ ++ -- set Interface p1 type=dummy other-config:hwaddr=aa:55:aa:55:00:01 ofport_request=1 \ ++ -- add-port br0 p2 \ ++ -- set Interface p2 type=dummy other-config:hwaddr=aa:55:aa:55:00:02 ofport_request=2 \ ++ -- add-port br0 p3 \ ++ -- set Interface p3 type=dummy other-config:hwaddr=aa:55:aa:55:00:03 ofport_request=3 \ ++], [0]) ++ ++ovs-appctl time/stop ++ ++AT_CHECK([ovs-appctl ofproto/trace "in_port(1)" '01005E010101000C29A027A108004500001C000100004002CBAEAC10221EE001010112140CE9E0010101'], [0], [dnl ++Flow: ip,in_port=1,vlan_tci=0x0000,dl_src=00:0c:29:a0:27:a1,dl_dst=01:00:5e:01:01:01,nw_src=172.16.34.30,nw_dst=224.1.1.1,nw_proto=2,nw_tos=0,nw_ecn=0,nw_ttl=64,nw_frag=no,tp_src=18,tp_dst=20 ++ ++bridge("br0") ++------------- ++ 0. priority 32768 ++ NORMAL ++ -> learned that 00:0c:29:a0:27:a1 is on port p1 in VLAN 0 ++ -> multicast snooping learned that 224.1.1.1 is on port p1 in VLAN 0 ++ ++Final flow: unchanged ++Megaflow: recirc_id=0,eth,ip,in_port=1,dl_src=00:0c:29:a0:27:a1,dl_dst=01:00:5e:01:01:01,nw_proto=2,nw_frag=no ++Datapath actions: drop ++This flow is handled by the userspace slow path because it: ++ - Uses action(s) not supported by datapath. ++]) ++ ++AT_CHECK([ovs-vsctl set port p3 other_config:mcast-snooping-flood-reports=true]) ++ ++AT_CHECK([ovs-appctl ofproto/trace "in_port(1)" '01005E010101000C29A027A108004500001C000100004002CBAEAC10221EE001010112140CE9E0010101'], [0], [dnl ++Flow: ip,in_port=1,vlan_tci=0x0000,dl_src=00:0c:29:a0:27:a1,dl_dst=01:00:5e:01:01:01,nw_src=172.16.34.30,nw_dst=224.1.1.1,nw_proto=2,nw_tos=0,nw_ecn=0,nw_ttl=64,nw_frag=no,tp_src=18,tp_dst=20 ++ ++bridge("br0") ++------------- ++ 0. priority 32768 ++ NORMAL ++ -> forwarding report to mcast flagged port ++ ++Final flow: unchanged ++Megaflow: recirc_id=0,eth,ip,in_port=1,dl_src=00:0c:29:a0:27:a1,dl_dst=01:00:5e:01:01:01,nw_proto=2,nw_frag=no ++Datapath actions: 3 ++This flow is handled by the userspace slow path because it: ++ - Uses action(s) not supported by datapath. ++]) ++ ++AT_CHECK([ovs-vsctl set port p2 other_config:mcast-snooping-flood-reports=true]) ++ ++AT_CHECK([ovs-appctl ofproto/trace "in_port(1)" '01005E010101000C29A027A108004500001C000100004002CBAEAC10221EE001010112140CE9E0010101'], [0], [dnl ++Flow: ip,in_port=1,vlan_tci=0x0000,dl_src=00:0c:29:a0:27:a1,dl_dst=01:00:5e:01:01:01,nw_src=172.16.34.30,nw_dst=224.1.1.1,nw_proto=2,nw_tos=0,nw_ecn=0,nw_ttl=64,nw_frag=no,tp_src=18,tp_dst=20 ++ ++bridge("br0") ++------------- ++ 0. priority 32768 ++ NORMAL ++ -> forwarding report to mcast flagged port ++ -> forwarding report to mcast flagged port ++ ++Final flow: unchanged ++Megaflow: recirc_id=0,eth,ip,in_port=1,dl_src=00:0c:29:a0:27:a1,dl_dst=01:00:5e:01:01:01,nw_proto=2,nw_frag=no ++Datapath actions: 3,2 ++This flow is handled by the userspace slow path because it: ++ - Uses action(s) not supported by datapath. ++]) ++ ++AT_CHECK([ovs-vsctl set port p1 other_config:mcast-snooping-flood-reports=true]) ++ ++AT_CHECK([ovs-appctl ofproto/trace "in_port(1)" '01005E010101000C29A027A108004500001C000100004002CBAEAC10221EE001010112140CE9E0010101'], [0], [dnl ++Flow: ip,in_port=1,vlan_tci=0x0000,dl_src=00:0c:29:a0:27:a1,dl_dst=01:00:5e:01:01:01,nw_src=172.16.34.30,nw_dst=224.1.1.1,nw_proto=2,nw_tos=0,nw_ecn=0,nw_ttl=64,nw_frag=no,tp_src=18,tp_dst=20 ++ ++bridge("br0") ++------------- ++ 0. priority 32768 ++ NORMAL ++ -> forwarding report to mcast flagged port ++ -> forwarding report to mcast flagged port ++ -> mcast port is input port, dropping the Report ++ ++Final flow: unchanged ++Megaflow: recirc_id=0,eth,ip,in_port=1,dl_src=00:0c:29:a0:27:a1,dl_dst=01:00:5e:01:01:01,nw_proto=2,nw_frag=no ++Datapath actions: 3,2 ++This flow is handled by the userspace slow path because it: ++ - Uses action(s) not supported by datapath. ++]) ++ ++# Change p2 ofport to force a ofbundle change and check that the mdb contains ++# no stale port. ++AT_CHECK([ovs-vsctl set interface p3 ofport_request=4]) ++ ++AT_CHECK([ovs-appctl ofproto/trace "in_port(1)" '01005E010101000C29A027A108004500001C000100004002CBAEAC10221EE001010112140CE9E0010101'], [0], [dnl ++Flow: ip,in_port=1,vlan_tci=0x0000,dl_src=00:0c:29:a0:27:a1,dl_dst=01:00:5e:01:01:01,nw_src=172.16.34.30,nw_dst=224.1.1.1,nw_proto=2,nw_tos=0,nw_ecn=0,nw_ttl=64,nw_frag=no,tp_src=18,tp_dst=20 ++ ++bridge("br0") ++------------- ++ 0. priority 32768 ++ NORMAL ++ -> forwarding report to mcast flagged port ++ -> mcast port is input port, dropping the Report ++ -> forwarding report to mcast flagged port ++ ++Final flow: unchanged ++Megaflow: recirc_id=0,eth,ip,in_port=1,dl_src=00:0c:29:a0:27:a1,dl_dst=01:00:5e:01:01:01,nw_proto=2,nw_frag=no ++Datapath actions: 2,3 ++This flow is handled by the userspace slow path because it: ++ - Uses action(s) not supported by datapath. ++]) ++ ++OVS_VSWITCHD_STOP ++AT_CLEANUP ++ ++ + AT_SETUP([mcast - delete the port mdb when vlan configuration changed]) + OVS_VSWITCHD_START([]) + diff --git a/tests/ofproto-dpif.at b/tests/ofproto-dpif.at index fa6111c1e..450483bee 100644 --- a/tests/ofproto-dpif.at diff --git a/SPECS/openvswitch3.1.spec b/SPECS/openvswitch3.1.spec index e6aac91..09b91a3 100644 --- a/SPECS/openvswitch3.1.spec +++ b/SPECS/openvswitch3.1.spec @@ -63,7 +63,7 @@ Summary: Open vSwitch Group: System Environment/Daemons daemon/database/utilities URL: http://www.openvswitch.org/ Version: 3.1.0 -Release: 73%{?dist} +Release: 74%{?dist} # Nearly all of openvswitch is ASL 2.0. The bugtool is LGPLv2+, and the # lib/sflow*.[ch] files are SISSL @@ -757,6 +757,13 @@ exit 0 %endif %changelog +* Fri Nov 24 2023 Open vSwitch CI - 3.1.0-74 +- Merging upstream branch-3.1 [RH git: 55bed59ce6] + Commit list: + e646b392b3 mcast-snooping: Flush flood and report ports when deleting interfaces. + 1a6192011f mcast-snooping: Test per port explicit flooding. + + * Wed Nov 01 2023 Open vSwitch CI - 3.1.0-73 - Merging upstream branch-3.1 [RH git: 8873feec2d] Commit list: