Skip to content

Commit

Permalink
tests: Speed up "multicast group buffer split".
Browse files Browse the repository at this point in the history
Signed-off-by: Xavier Simonart <xsimonar@redhat.com>
Signed-off-by: Mark Michelson <mmichels@redhat.com>
  • Loading branch information
simonartxavier authored and putnopvut committed Feb 19, 2024
1 parent eb11803 commit b4768e3
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 9 deletions.
14 changes: 8 additions & 6 deletions tests/ovn-controller.at
Original file line number Diff line number Diff line change
Expand Up @@ -2693,19 +2693,20 @@ ovs-vsctl add-br br-phys
ovn_attach n1 br-phys 192.168.0.1

for i in $(seq 1 320); do
ovs-vsctl -- add-port br-int hv1-vif$i -- \
OVS_VSCTL(add-port br-int hv1-vif$i -- \
set interface hv1-vif$i external-ids:iface-id=sw0-p$i \
options:tx_pcap=hv1/vif${i}-tx.pcap \
options:rxq_pcap=hv1/vif${i}-rx.pcap \
ofport-request=$i
ofport-request=$i)
done

RUN_OVS_VSCTL

check ovn-nbctl ls-add sw0
for i in $(seq 1 320); do
check ovn-nbctl lsp-add sw0 sw0-p$i
check ovn-nbctl lsp-set-addresses sw0-p$i "unknown"
OVN_NBCTL(lsp-add sw0 sw0-p$i)
OVN_NBCTL(lsp-set-addresses sw0-p$i "unknown")
done
RUN_OVN_NBCTL

wait_for_ports_up
ovn-nbctl --wait=hv sync
Expand All @@ -2715,8 +2716,9 @@ OVS_WAIT_FOR_OUTPUT([as hv1 ovs-ofctl dump-flows br-int table=40 | grep reg15=0x
])

for i in $(seq 1 280); do
check ovn-nbctl lsp-del sw0-p$i
OVN_NBCTL(lsp-del sw0-p$i)
done
RUN_OVN_NBCTL
ovn-nbctl --wait=hv sync

AT_CHECK([as hv1 ovs-ofctl dump-flows br-int table=40 | grep -q controller], [1])
Expand Down
11 changes: 11 additions & 0 deletions tests/ovn-macros.at
Original file line number Diff line number Diff line change
Expand Up @@ -980,6 +980,17 @@ m4_define([RUN_OVN_NBCTL], [
unset command
])

# OVS_VSCTL(VSCTL_COMMAND) adds VSCTL_COMMAND to list of commands to be run by RUN_OVS_VSCTL().
m4_define([OVS_VSCTL], [
command="${command} -- $1"
])

# RUN_OVS_VSCTL() executes list of commands built by the OVS_VSCTL() macro.
m4_define([RUN_OVS_VSCTL], [
check ovs-vsctl ${command}
unset command
])

m4_define([TAG_UNSTABLE], [
AT_KEYWORDS([unstable])
AT_SKIP_IF([test X"$SKIP_UNSTABLE" = Xyes])
Expand Down
8 changes: 5 additions & 3 deletions tests/ovn.at
Original file line number Diff line number Diff line change
Expand Up @@ -37241,19 +37241,21 @@ ovn_attach n br-phys 192.168.0.1
check ovs-vsctl set open . external-ids:ovn-bridge-mappings=phys:br-phys

for i in $(seq 1 320); do
check ovs-vsctl -- add-port br-int hv1-vif$i -- \
OVS_VSCTL( add-port br-int hv1-vif$i -- \
set interface hv1-vif$i external-ids:iface-id=sw0-port$i \
options:tx_pcap=hv1/vif$i-tx.pcap \
options:rxq_pcap=hv1/vif$i-rx.pcap
options:rxq_pcap=hv1/vif$i-rx.pcap)
done
RUN_OVS_VSCTL

check ovn-nbctl ls-add sw0

check ovn-nbctl lsp-add sw0 sw0-port1
check ovn-nbctl lsp-set-addresses sw0-port1 "50:54:00:00:00:01 10.0.0.2"
for i in $(seq 2 320); do
check ovn-nbctl lsp-add sw0 sw0-port$i -- lsp-set-addresses sw0-port$i "unknown"
OVN_NBCTL(lsp-add sw0 sw0-port$i -- lsp-set-addresses sw0-port$i "unknown")
done
RUN_OVN_NBCTL

check ovn-nbctl --wait=hv sync
wait_for_ports_up
Expand Down

0 comments on commit b4768e3

Please sign in to comment.