Message ID | 20160519125956.GA28957@indiana.gru.redhat.com |
---|---|
State | Deferred |
Headers | show |
On Thu, May 19, 2016 at 09:59:57AM -0300, Thadeu Lima de Souza Cascardo wrote: > On Wed, May 18, 2016 at 05:56:02PM -0700, Ben Pfaff wrote: > > Jarno, I think that you'd be a good person to review this. Would you > > mind taking a look? > > > > Thanks, > > > > Ben. > > Hi, Ben. > > I still need to find some time to try to reproduce the scenarios this solves, > but I have at least one test that is fixed by the section replaced by > is_ip_local_multicast. > > I was planning on writing more tests to reproduce the other cases in order to > send a patch, but here it is as a starting point. I'm very happy to see a start at some tests for multicast snooping. I am unsure whether you intend that I should fold your test into the bug fix patch, or whether you intend to submit it later as a separate patch? Thanks, Ben.
On Thu, May 19, 2016 at 08:35:42AM -0700, Ben Pfaff wrote: > On Thu, May 19, 2016 at 09:59:57AM -0300, Thadeu Lima de Souza Cascardo wrote: > > On Wed, May 18, 2016 at 05:56:02PM -0700, Ben Pfaff wrote: > > > Jarno, I think that you'd be a good person to review this. Would you > > > mind taking a look? > > > > > > Thanks, > > > > > > Ben. > > > > Hi, Ben. > > > > I still need to find some time to try to reproduce the scenarios this solves, > > but I have at least one test that is fixed by the section replaced by > > is_ip_local_multicast. > > > > I was planning on writing more tests to reproduce the other cases in order to > > send a patch, but here it is as a starting point. > > I'm very happy to see a start at some tests for multicast snooping. > I am unsure whether you intend that I should fold your test into the bug > fix patch, or whether you intend to submit it later as a separate patch? > Either way works for me. Can you unfold it as it is now, and I will send any new tests I come up with later? Thanks. Cascardo. > Thanks, > > Ben.
On Thu, May 19, 2016 at 09:59:57AM -0300, Thadeu Lima de Souza Cascardo wrote: > On Wed, May 18, 2016 at 05:56:02PM -0700, Ben Pfaff wrote: > > Jarno, I think that you'd be a good person to review this. Would you > > mind taking a look? > > > > Thanks, > > > > Ben. > > Hi, Ben. > > I still need to find some time to try to reproduce the scenarios this solves, > but I have at least one test that is fixed by the section replaced by > is_ip_local_multicast. Thanks. I took this as approval, so I applied this to master, branch-2.5, and branch-2.4.
On Thu, May 19, 2016 at 03:06:15PM -0300, Thadeu Lima de Souza Cascardo wrote: > On Thu, May 19, 2016 at 08:35:42AM -0700, Ben Pfaff wrote: > > On Thu, May 19, 2016 at 09:59:57AM -0300, Thadeu Lima de Souza Cascardo wrote: > > > On Wed, May 18, 2016 at 05:56:02PM -0700, Ben Pfaff wrote: > > > > Jarno, I think that you'd be a good person to review this. Would you > > > > mind taking a look? > > > > > > > > Thanks, > > > > > > > > Ben. > > > > > > Hi, Ben. > > > > > > I still need to find some time to try to reproduce the scenarios this solves, > > > but I have at least one test that is fixed by the section replaced by > > > is_ip_local_multicast. > > > > > > I was planning on writing more tests to reproduce the other cases in order to > > > send a patch, but here it is as a starting point. > > > > I'm very happy to see a start at some tests for multicast snooping. > > I am unsure whether you intend that I should fold your test into the bug > > fix patch, or whether you intend to submit it later as a separate patch? > > > > Either way works for me. Can you unfold it as it is now, and I will send any new > tests I come up with later? I wasn't sure how to interpret that, so I left the test out for now. I'll look forward to a later test patch.
On Fri, May 20, 2016 at 03:53:41PM -0700, Ben Pfaff wrote: > On Thu, May 19, 2016 at 03:06:15PM -0300, Thadeu Lima de Souza Cascardo wrote: > > On Thu, May 19, 2016 at 08:35:42AM -0700, Ben Pfaff wrote: > > > On Thu, May 19, 2016 at 09:59:57AM -0300, Thadeu Lima de Souza Cascardo wrote: > > > > On Wed, May 18, 2016 at 05:56:02PM -0700, Ben Pfaff wrote: > > > > > Jarno, I think that you'd be a good person to review this. Would you > > > > > mind taking a look? > > > > > > > > > > Thanks, > > > > > > > > > > Ben. > > > > > > > > Hi, Ben. > > > > > > > > I still need to find some time to try to reproduce the scenarios this solves, > > > > but I have at least one test that is fixed by the section replaced by > > > > is_ip_local_multicast. > > > > > > > > I was planning on writing more tests to reproduce the other cases in order to > > > > send a patch, but here it is as a starting point. > > > > > > I'm very happy to see a start at some tests for multicast snooping. > > > I am unsure whether you intend that I should fold your test into the bug > > > fix patch, or whether you intend to submit it later as a separate patch? > > > > > > > Either way works for me. Can you unfold it as it is now, and I will send any new > > tests I come up with later? > > I wasn't sure how to interpret that, so I left the test out for now. > I'll look forward to a later test patch. Sorry about that. I meant fold, that is, include the test. No problem, I will try to send a more complete one later this week. Thanks. Cascardo.
diff --git a/tests/automake.mk b/tests/automake.mk index a5c6074..ae9a436 100644 --- a/tests/automake.mk +++ b/tests/automake.mk @@ -51,6 +51,7 @@ TESTSUITE_AT = \ tests/tunnel.at \ tests/tunnel-push-pop.at \ tests/tunnel-push-pop-ipv6.at \ + tests/mcast-snooping.at \ tests/lockfile.at \ tests/reconnect.at \ tests/ovs-vswitchd.at \ diff --git a/tests/mcast-snooping.at b/tests/mcast-snooping.at new file mode 100644 index 0000000..7369e2b --- /dev/null +++ b/tests/mcast-snooping.at @@ -0,0 +1,76 @@ +AT_BANNER([mcast snooping]) + +AT_SETUP([mcast snooping]) + +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-vsctl add-port br0 p0 -- set Interface p0 type=dummy \ + other-config:hwaddr=aa:55:aa:55:00:00 ofport_request=1 \ + -- add-port br0 p1 -- set Interface p1 type=dummy \ + other-config:hwaddr=aa:55:aa:55:00:01 ofport_request=2 \ + ], [0]) + +AT_CHECK([ovs-appctl dpif/show], [0], [dnl +dummy@ovs-dummy: hit:0 missed:0 + br0: + br0 65534/100: (dummy) + p0 1/1: (dummy) + p1 2/2: (dummy) +]) + +AT_CHECK([ovs-ofctl add-flow br0 action=normal]) + +dnl Verify this will not output to the other port +AT_CHECK([ovs-vsctl set Interface p1 options:tx_pcap=p1.pcap]) +AT_CHECK([ovs-appctl netdev-dummy/receive p0 'in_port(1),eth(src=aa:55:aa:55:00:00,dst=a1:55:aa:55:00:00),eth_type(0x0800),ipv4(src=1.1.3.93,dst=225.0.0.1,proto=17,tos=0,ttl=64,frag=no),udp(src=0,dst=8000)']) +AT_CHECK([ovs-pcap p1.pcap > p1.pcap.txt 2>&1]) +AT_CHECK([cat p1.pcap.txt], [0], [dnl +]) + +dnl Verify local multicast will output to the other port +AT_CHECK([ovs-appctl netdev-dummy/receive p0 'in_port(1),eth(src=aa:55:aa:55:00:00,dst=a1:55:aa:55:00:00),eth_type(0x0800),ipv4(src=1.1.3.92,dst=224.0.0.1,proto=17,tos=0,ttl=64,frag=no),udp(src=0,dst=8000)']) +AT_CHECK([ovs-pcap p1.pcap > p1.pcap.txt 2>&1]) +AT_CHECK([cat p1.pcap.txt], [0], [dnl +a155aa550000aa55aa55000008004500001c00000000401196730101035ce000000100001f4000000000000000000000000000000000000000000000 +]) + +dnl Send IGMP join and verify mdb +AT_CHECK([ovs-appctl netdev-dummy/receive p1 '01005e000016525400aabbcc080046c00028000040000102fc04e00000160000000094040000220017010000000104000000efff0101']) +AT_CHECK([ovs-appctl mdb/show br0], [0], [dnl + port VLAN GROUP Age + 2 0 239.255.1.1 0 +]) + +dnl Verify packet to joined address will be output +AT_CHECK([ovs-appctl netdev-dummy/receive p0 'in_port(1),eth(src=aa:55:aa:55:00:00,dst=a1:55:aa:55:00:00),eth_type(0x0800),ipv4(src=1.1.3.92,dst=239.255.1.1,proto=17,tos=0,ttl=64,frag=no),udp(src=0,dst=8000)']) +AT_CHECK([ovs-pcap p1.pcap > p1.pcap.txt 2>&1]) +AT_CHECK([cat p1.pcap.txt], [0], [dnl +a155aa550000aa55aa55000008004500001c00000000401196730101035ce000000100001f4000000000000000000000000000000000000000000000 +a155aa550000aa55aa55000008004500001c00000000401185740101035cefff010100001f4000000000000000000000000000000000000000000000 +]) + +dnl Send IGMP leave and verify mdb +AT_CHECK([ovs-appctl netdev-dummy/receive p1 '01005e000016525400aabbcc080046c00028000040000102fc04e00000160000000094040000220014010000000101000000efff0101']) +AT_CHECK([ovs-appctl mdb/show br0], [0], [dnl + port VLAN GROUP Age +]) + +dnl Send IGMP join and verify mdb +AT_CHECK([ovs-appctl netdev-dummy/receive p1 '01005e000016525400aabbcc080046c00028000040000102fc04e00000160000000094040000220017010000000104000000efff0101']) +AT_CHECK([ovs-appctl mdb/show br0], [0], [dnl + port VLAN GROUP Age + 2 0 239.255.1.1 0 +]) + +dnl Verify packet to joined address will be output +AT_CHECK([ovs-appctl netdev-dummy/receive p0 'in_port(1),eth(src=aa:55:aa:55:00:00,dst=a1:55:aa:55:00:00),eth_type(0x0800),ipv4(src=1.1.3.92,dst=239.255.1.1,proto=17,tos=0,ttl=64,frag=no),udp(src=0,dst=8000)']) +AT_CHECK([ovs-pcap p1.pcap > p1.pcap.txt 2>&1]) +AT_CHECK([cat p1.pcap.txt], [0], [dnl +a155aa550000aa55aa55000008004500001c00000000401196730101035ce000000100001f4000000000000000000000000000000000000000000000 +a155aa550000aa55aa55000008004500001c00000000401185740101035cefff010100001f4000000000000000000000000000000000000000000000 +a155aa550000aa55aa55000008004500001c00000000401185740101035cefff010100001f4000000000000000000000000000000000000000000000 +]) + + +OVS_VSWITCHD_STOP +AT_CLEANUP diff --git a/tests/testsuite.at b/tests/testsuite.at index 7ac74df..02502d0 100644 --- a/tests/testsuite.at +++ b/tests/testsuite.at @@ -49,6 +49,7 @@ m4_include([tests/jsonrpc-py.at]) m4_include([tests/tunnel.at]) m4_include([tests/tunnel-push-pop.at]) m4_include([tests/tunnel-push-pop-ipv6.at]) +m4_include([tests/mcast-snooping.at]) m4_include([tests/lockfile.at]) m4_include([tests/reconnect.at]) m4_include([tests/ovs-vswitchd.at])