> Hi Lorenzo,
>
> I find the ovn.at test to not be very exhaustive. It seems to only test the
> following:
ack, my intention was to add just an integration to the existing system-ovn test
(in fact I think some of the missing cases reported below are already covered
by system-ovn test) but I agree we can improve it in the next version of the
series
>
> * Records exist in the OVS database when QoS is added in full to a logical
> switch port.
> * Records do not exist in the OVS database when QoS is removed in full from
> a logical switch port or a logical switch port is deleted.
>
> This doesn't test any of the following:
> * Invalid configuration (e.g. What happens if min_rate > max_rate?).
I think this logic is missing from the original implementation in ovn-northd
but we can add it.
> * Partial configuration (e.g. What happens if only min_rate is configured on
> a logical switch port, but nothing else is? What happens if QoS is
> completely configured on a vif but the localnet port doesn't have its
> network_name set?)
> * Partial change (e.g. what happens when QoS is configured successfully, but
> then the min_rate is removed from the LSP?)
I think this is already covered by system-ovn test
>
> Also, someone can speak up if they disagree with me on this, but I think the
> system-ovn.at test should be removed (including the pre-existing parts).
> From OVN's perspective, once QoS has been successfully configured in the OVS
> DB, we're done. We shouldn't care about the implementation details within
> OVS. OVS could switch from tc to something else and we shouldn't have our
> tests suddenly fail because of that. If we really wanted to have a system
> test, a better test would be to send traffic and ensure the configured
> bandwidth and burst are applied as expected. This way, no matter the
> implementation within OVS, we can ensure that the outcome is what we expect.
> Having said that, I don't think we need to add such a system test as part of
> this patch series since presumably this should be tested already at the
> lower layers (e.g. OVS and/or tc). However, I think it would benefit us to
> have such a test as part of a later change.
I do not have a strong opinion about it, I am fine to remove it and just have
QoS tests in ovn.at
>
> See below for one more comment from me.
>
> On 5/15/23 06:03, Lorenzo Bianconi wrote:
> > This patch allows to apply QoS rules on the localnet port related to
> > logical switch ports running on the same datapath. Considering the
> > following netowrk configuration:
> >
> > LSP{0,1} -- LogicalSwitch -- Localnet0
> >
> > It is possible to apply the following QoS rules on Localnet0 on egress
> > traffic
> > entering the cluster from LSP{0,1}:
> > - LSP0: min-rate r0, max_rate R0
> > - LSP1: min-rate r1, max_rate R1
> >
> > Acked-By: Ihar Hrachyshka <[email protected]>
> > Tested-by: Rodolfo Alonso <[email protected]>
> > Signed-off-by: Lorenzo Bianconi <[email protected]>
> > ---
> > controller/binding.c | 6 +-
> > northd/northd.c | 26 +++++++--
> > northd/ovn-northd.8.xml | 12 ++++
> > tests/ovn-northd.at | 2 +
> > tests/ovn-performance.at | 5 --
> > tests/ovn.at | 121 +++++++++++++++++++++++++++++++++++++++
> > tests/system-ovn.at | 86 +++++++++++++++++++++++++++-
> > 7 files changed, 242 insertions(+), 16 deletions(-)
> >
> > diff --git a/controller/binding.c b/controller/binding.c
> > index 9ee145b54..931db8068 100644
> > --- a/controller/binding.c
> > +++ b/controller/binding.c
> > @@ -202,9 +202,9 @@ get_qos_egress_port_interface(struct shash
> > *bridge_mappings,
> > continue;
> > }
> > - bool is_egress_iface = smap_get_bool(&iface->external_ids,
> > - "ovn-egress-iface",
> > false);
> > - if (is_egress_iface) {
> > + if (smap_get_bool(&iface->external_ids,
> > + "ovn-egress-iface", false) ||
> > + !strcmp(iface->type, "")) {
> > *pport = port;
> > return iface;
> > }
> > diff --git a/northd/northd.c b/northd/northd.c
> > index 53217347d..80aad25a0 100644
> > --- a/northd/northd.c
> > +++ b/northd/northd.c
> > @@ -5784,15 +5784,29 @@ build_lswitch_port_sec_op(struct ovn_port *op,
> > struct hmap *lflows,
> > ds_cstr(match),
> > ds_cstr(actions),
> > op->key, &op->nbsp->header_);
> > + if (!lsp_is_localnet(op->nbsp) && !op->od->n_localnet_ports) {
> > + return;
> > + }
> > +
> > + ds_clear(actions);
> > + ds_put_format(actions, "set_queue(%s); output;", queue_id);
> > +
> > + ds_clear(match);
> > if (lsp_is_localnet(op->nbsp)) {
> > - ds_clear(match);
> > - ds_clear(actions);
> > ds_put_format(match, "outport == %s", op->json_key);
> > - ds_put_format(actions, "set_queue(%s); output;", queue_id);
> > ovn_lflow_add_with_lport_and_hint(lflows, op->od,
> > - S_SWITCH_OUT_APPLY_PORT_SEC,
> > 100,
> > - ds_cstr(match),
> > ds_cstr(actions),
> > - op->key, &op->nbsp->header_);
> > + S_SWITCH_OUT_APPLY_PORT_SEC,
> > 100,
> > + ds_cstr(match),
> > ds_cstr(actions),
> > + op->key, &op->nbsp->header_);
> > + } else if (op->od->n_localnet_ports) {
> > + ds_put_format(match, "outport == %s && inport == %s",
> > + op->od->localnet_ports[0]->json_key,
> > + op->json_key);
> > + ovn_lflow_add_with_lport_and_hint(lflows, op->od,
> > + S_SWITCH_OUT_APPLY_PORT_SEC, 110,
> > + ds_cstr(match), ds_cstr(actions),
> > + op->od->localnet_ports[0]->key,
> > + &op->od->localnet_ports[0]->nbsp->header_);
> > }
> > }
> > }
> > diff --git a/northd/ovn-northd.8.xml b/northd/ovn-northd.8.xml
> > index 70153dc9e..7da912da3 100644
> > --- a/northd/ovn-northd.8.xml
> > +++ b/northd/ovn-northd.8.xml
> > @@ -2223,6 +2223,18 @@ output;
> > </p>
> > <ul>
> > + <li>
> > + <p>
> > + For each port configured with egress qos in the
> > + <ref column="options:qdisc_queue_id" table="Logical_Switch_Port"
> > + db="OVN_Northbound"/> column of <ref table="Logical_Switch_Port"
> > + db="OVN_Northbound"/>, running a localnet port on the same logical
> > + switch, a priority 110 flow is added which matches on the localnet
> > + <code>outport</code> and on the port <code>inport</code> and
> > + applies the action <code>set_queue(id); output;"</code>.
> > + </p>
> > + </li>
> > +
> > <li>
> > <p>
> > For each localnet port configured with egress qos in the
> > diff --git a/tests/ovn-northd.at b/tests/ovn-northd.at
> > index 047b8b6ad..8005c09b8 100644
> > --- a/tests/ovn-northd.at
> > +++ b/tests/ovn-northd.at
> > @@ -8065,6 +8065,7 @@ sort | sed 's/table=../table=??/' ], [0], [dnl
> > table=??(ls_out_check_port_sec), priority=0 , match=(1),
> > action=(reg0[[15]] = check_out_port_sec(); next;)
> > table=??(ls_out_check_port_sec), priority=100 , match=(eth.mcast),
> > action=(reg0[[15]] = 0; next;)
> > table=??(ls_out_apply_port_sec), priority=0 , match=(1),
> > action=(output;)
> > + table=??(ls_out_apply_port_sec), priority=110 , match=(outport ==
> > "localnetport" && inport == "sw0p2"), action=(set_queue(10); output;)
> > table=??(ls_out_apply_port_sec), priority=50 , match=(reg0[[15]] ==
> > 1), action=(drop;)
> > ])
> > @@ -8095,6 +8096,7 @@ sort | sed 's/table=../table=??/' ], [0], [dnl
> > table=??(ls_out_check_port_sec), priority=100 , match=(eth.mcast),
> > action=(reg0[[15]] = 0; next;)
> > table=??(ls_out_apply_port_sec), priority=0 , match=(1),
> > action=(output;)
> > table=??(ls_out_apply_port_sec), priority=100 , match=(outport ==
> > "localnetport"), action=(set_queue(10); output;)
> > + table=??(ls_out_apply_port_sec), priority=110 , match=(outport ==
> > "localnetport" && inport == "sw0p2"), action=(set_queue(10); output;)
> > table=??(ls_out_apply_port_sec), priority=50 , match=(reg0[[15]] ==
> > 1), action=(drop;)
> > ])
> > diff --git a/tests/ovn-performance.at b/tests/ovn-performance.at
> > index 8ac0a392c..ba329f0f6 100644
> > --- a/tests/ovn-performance.at
> > +++ b/tests/ovn-performance.at
> > @@ -559,11 +559,6 @@ OVN_CONTROLLER_EXPECT_NO_HIT(
> > [ovn-nbctl --wait=hv set Logical_Switch_Port ln-public
> > options:qos_burst=1000]
> > )
> > -OVN_CONTROLLER_EXPECT_HIT(
> > - [hv3], [lflow_run],
> > - [as hv3 ovs-vsctl set interface vgw3
> > external-ids:ovn-egress-iface=true]
> > -)
> > -
> > ovn-nbctl --wait=hv meter-add meter0 drop 100 pktps 10
> > OVN_CONTROLLER_EXPECT_NO_HIT(
> > diff --git a/tests/ovn.at b/tests/ovn.at
> > index 2ba7c7ce5..625e7814b 100644
> > --- a/tests/ovn.at
> > +++ b/tests/ovn.at
> > @@ -35659,3 +35659,124 @@ check test "$current_id2" = "$prev_id2"
> > OVN_CLEANUP([hv1])
> > AT_CLEANUP
> > ])
> > +
> > +OVN_FOR_EACH_NORTHD([
> > +AT_SETUP([OVN QoS])
> > +ovn_start
> > +
> > +check ovn-nbctl ls-add ls
> > +check ovn-nbctl lsp-add ls public
> > +check ovn-nbctl lsp-set-addresses public unknown
> > +check ovn-nbctl lsp-set-type public localnet
> > +check ovn-nbctl lsp-set-options public network_name=phys
> > +net_add n
> > +
> > +# two hypervisors, each connected to the same network
> > +for i in 1 2; do
> > + sim_add hv-$i
> > + as hv-$i
> > + ovs-vsctl add-br br-phys
> > + ovs-vsctl set open . external-ids:ovn-bridge-mappings=phys:br-phys
> > + ovn_attach n br-phys 192.168.0.$i
> > +done
> > +
> > +for i in 1 2; do
> > + check ovn-nbctl lsp-add ls lsp$i
> > + check ovn-nbctl lsp-set-addresses lsp$i f0:00:00:00:00:0$i
> > +done
> > +
> > +for i in 1 2; do
> > + as hv-$i
> > + ovs-vsctl add-port br-int vif$i -- set Interface vif$i
> > external-ids:iface-id=lsp$i \
> > + ofport-request=$i
> > + OVS_WAIT_UNTIL([test x`ovn-nbctl lsp-get-up lsp$i` = xup])
> > +
> > + # Patch port might be created after ports are reported up
> > + # Wait for a flow outputing to patch port
> > + OVN_WAIT_PATCH_PORT_FLOWS(["public"], ["hv-$i"])
> > +done
> > +
> > +check ovn-nbctl --wait=hv set Logical_Switch_Port lsp1
> > options:qos_min_rate=200000
>
> Throughout this test, --wait=hv is used too much. We don't need to wait for
> the change to get propagated to the hypervisors after every ovn-nbctl call.
> We can either:
>
> 1) Only apply it to the final call in a chain of ovn-nbctl commands.
> 2) Do away with it entirely since we're using OVS_WAIT_UNTIL afterwards
> anyway.
ack, I will fix it.
Regards,
Lorenzo
>
> > +check ovn-nbctl --wait=hv set Logical_Switch_Port lsp1
> > options:qos_max_rate=350000
> > +check ovn-nbctl --wait=hv set Logical_Switch_Port lsp1
> > options:qos_burst=3000000
> > +
> > +OVS_WAIT_UNTIL([test $(as hv-1 ovs-vsctl list qos | grep -c linux-htb) -eq
> > 1])
> > +OVS_WAIT_UNTIL([test $(as hv-1 ovs-vsctl list queue | grep -c
> > 'min-rate="200000"') -eq 1])
> > +OVS_WAIT_UNTIL([test $(as hv-1 ovs-vsctl list queue | grep -c
> > 'max-rate="350000"') -eq 1])
> > +OVS_WAIT_UNTIL([test $(as hv-1 ovs-vsctl list queue | grep -c
> > 'burst="3000000"') -eq 1])
> > +
> > +check ovn-nbctl --wait=hv set Logical_Switch_Port lsp2
> > options:qos_min_rate=400000
> > +check ovn-nbctl --wait=hv set Logical_Switch_Port lsp2
> > options:qos_max_rate=500000
> > +check ovn-nbctl --wait=hv set Logical_Switch_Port lsp2
> > options:qos_burst=3000000
> > +
> > +OVS_WAIT_UNTIL([test $(as hv-2 ovs-vsctl list qos | grep -c linux-htb) -eq
> > 1])
> > +OVS_WAIT_UNTIL([test $(as hv-2 ovs-vsctl list queue | grep -c
> > 'min-rate="400000"') -eq 1])
> > +OVS_WAIT_UNTIL([test $(as hv-2 ovs-vsctl list queue | grep -c
> > 'max-rate="500000"') -eq 1])
> > +OVS_WAIT_UNTIL([test $(as hv-2 ovs-vsctl list queue | grep -c
> > 'burst="3000000"') -eq 1])
> > +
> > +check ovn-nbctl lsp-add ls lsp3
> > +check ovn-nbctl lsp-set-addresses lsp3 f0:00:00:00:00:03
> > +as hv-1
> > +ovs-vsctl add-port br-int vif3 -- \
> > + set Interface vif3 external-ids:iface-id=lsp3 \
> > + ofport-request=3
> > +OVS_WAIT_UNTIL([test x`ovn-nbctl lsp-get-up lsp3` = xup])
> > +
> > +check ovn-nbctl --wait=hv set Logical_Switch_Port lsp3
> > options:qos_min_rate=700000
> > +check ovn-nbctl --wait=hv set Logical_Switch_Port lsp3
> > options:qos_max_rate=800000
> > +check ovn-nbctl --wait=hv set Logical_Switch_Port lsp3
> > options:qos_burst=9000000
> > +
> > +OVS_WAIT_UNTIL([test $(as hv-1 ovs-vsctl list qos | grep -c linux-htb) -eq
> > 1])
> > +OVS_WAIT_UNTIL([test $(as hv-1 ovs-vsctl list queue | grep -c
> > 'min-rate="200000"') -eq 1])
> > +OVS_WAIT_UNTIL([test $(as hv-1 ovs-vsctl list queue | grep -c
> > 'max-rate="350000"') -eq 1])
> > +OVS_WAIT_UNTIL([test $(as hv-1 ovs-vsctl list queue | grep -c
> > 'burst="3000000"') -eq 1])
> > +OVS_WAIT_UNTIL([test $(as hv-1 ovs-vsctl list queue | grep -c
> > 'min-rate="700000"') -eq 1])
> > +OVS_WAIT_UNTIL([test $(as hv-1 ovs-vsctl list queue | grep -c
> > 'max-rate="800000"') -eq 1])
> > +OVS_WAIT_UNTIL([test $(as hv-1 ovs-vsctl list queue | grep -c
> > 'burst="9000000"') -eq 1])
> > +
> > +check ovn-nbctl --wait=hv remove Logical_Switch_Port lsp3 options
> > qos_min_rate=700000
> > +check ovn-nbctl --wait=hv remove Logical_Switch_Port lsp3 options
> > qos_max_rate=800000
> > +check ovn-nbctl --wait=hv remove Logical_Switch_Port lsp3 options
> > qos_burst=9000000
> > +
> > +OVS_WAIT_UNTIL([test $(as hv-1 ovs-vsctl list qos | grep -c linux-htb) -eq
> > 1])
> > +OVS_WAIT_UNTIL([test $(as hv-1 ovs-vsctl list queue | grep -c
> > 'min-rate="200000"') -eq 1])
> > +OVS_WAIT_UNTIL([test $(as hv-1 ovs-vsctl list queue | grep -c
> > 'max-rate="350000"') -eq 1])
> > +OVS_WAIT_UNTIL([test $(as hv-1 ovs-vsctl list queue | grep -c
> > 'burst="3000000"') -eq 1])
> > +OVS_WAIT_UNTIL([test $(as hv-1 ovs-vsctl list queue | grep -c
> > 'min-rate="700000"') -eq 0])
> > +OVS_WAIT_UNTIL([test $(as hv-1 ovs-vsctl list queue | grep -c
> > 'max-rate="800000"') -eq 0])
> > +OVS_WAIT_UNTIL([test $(as hv-1 ovs-vsctl list queue | grep -c
> > 'burst="9000000"') -eq 0])
> > +
> > +check ovn-nbctl --wait=hv set Logical_Switch_Port lsp2
> > options:qos_min_rate=410000
> > +OVS_WAIT_UNTIL([test $(as hv-2 ovs-vsctl list queue | grep -c
> > 'min-rate="410000"') -eq 1])
> > +
> > +check ovn-nbctl --wait=hv remove Logical_Switch_Port lsp2 options
> > qos_min_rate=410000
> > +check ovn-nbctl --wait=hv remove Logical_Switch_Port lsp2 options
> > qos_max_rate=500000
> > +check ovn-nbctl --wait=hv remove Logical_Switch_Port lsp2 options
> > qos_burst=3000000
> > +
> > +OVS_WAIT_UNTIL([test $(as hv-2 ovs-vsctl list qos | grep -c linux-htb) -eq
> > 0])
> > +OVS_WAIT_UNTIL([test $(as hv-2 ovs-vsctl list queue | grep -c
> > 'min-rate="410000"') -eq 0])
> > +OVS_WAIT_UNTIL([test $(as hv-2 ovs-vsctl list queue | grep -c
> > 'max-rate="500000"') -eq 0])
> > +OVS_WAIT_UNTIL([test $(as hv-2 ovs-vsctl list queue | grep -c
> > 'burst="3000000"') -eq 0])
> > +
> > +check ovn-nbctl --wait=hv lsp-del lsp1
> > +OVS_WAIT_UNTIL([test $(as hv-1 ovs-vsctl list qos | grep -c linux-htb) -eq
> > 0])
> > +OVS_WAIT_UNTIL([test $(as hv-1 ovs-vsctl list queue | grep -c
> > 'min-rate="200000"') -eq 0])
> > +OVS_WAIT_UNTIL([test $(as hv-1 ovs-vsctl list queue | grep -c
> > 'max-rate="350000"') -eq 0])
> > +OVS_WAIT_UNTIL([test $(as hv-1 ovs-vsctl list queue | grep -c
> > 'burst="3000000"') -eq 0])
> > +
> > +check ovn-nbctl --wait=hv set Logical_Switch_Port public
> > options:qos_min_rate=100000
> > +check ovn-nbctl --wait=hv set Logical_Switch_Port public
> > options:qos_max_rate=200000
> > +check ovn-nbctl --wait=hv set Logical_Switch_Port public
> > options:qos_burst=3000000
> > +OVS_WAIT_UNTIL([test $(as hv-1 ovs-vsctl list qos | grep -c linux-htb) -eq
> > 1])
> > +OVS_WAIT_UNTIL([test $(as hv-1 ovs-vsctl list queue | grep -c
> > 'min-rate="100000"') -eq 1])
> > +OVS_WAIT_UNTIL([test $(as hv-1 ovs-vsctl list queue | grep -c
> > 'max-rate="200000"') -eq 1])
> > +OVS_WAIT_UNTIL([test $(as hv-1 ovs-vsctl list queue | grep -c
> > 'burst="3000000"') -eq 1])
> > +
> > +check ovn-nbctl --wait=hv lsp-del public
> > +OVS_WAIT_UNTIL([test $(as hv-1 ovs-vsctl list qos | grep -c linux-htb) -eq
> > 0])
> > +OVS_WAIT_UNTIL([test $(as hv-1 ovs-vsctl list queue | grep -c
> > 'min-rate="100000"') -eq 0])
> > +OVS_WAIT_UNTIL([test $(as hv-1 ovs-vsctl list queue | grep -c
> > 'max-rate="200000"') -eq 0])
> > +OVS_WAIT_UNTIL([test $(as hv-1 ovs-vsctl list queue | grep -c
> > 'burst="3000000"') -eq 0])
> > +
> > +AT_CLEANUP
> > +])
> > diff --git a/tests/system-ovn.at b/tests/system-ovn.at
> > index a4387349c..8fe8e4d28 100644
> > --- a/tests/system-ovn.at
> > +++ b/tests/system-ovn.at
> > @@ -6553,6 +6553,11 @@ ADD_VETH(sw01, sw01, br-int, "192.168.1.2/24",
> > "f0:00:00:01:02:03")
> > ovn-nbctl lsp-add sw0 sw01 \
> > -- lsp-set-addresses sw01 "f0:00:00:01:02:03 192.168.1.2"
> > +ADD_NAMESPACES(sw02)
> > +ADD_VETH(sw02, sw02, br-int, "192.168.1.3/24", "f0:00:00:01:02:44")
> > +ovn-nbctl lsp-add sw0 sw02 \
> > + -- lsp-set-addresses sw02 "f0:00:00:01:02:44 192.168.1.3"
> > +
> > ovn-nbctl ls-add sw1
> > ADD_NAMESPACES(sw11)
> > @@ -6560,6 +6565,11 @@ ADD_VETH(sw11, sw11, br-int, "192.168.4.2/24",
> > "f0:00:00:01:04:03")
> > ovn-nbctl lsp-add sw1 sw11 \
> > -- lsp-set-addresses sw11 "f0:00:00:01:04:03 192.168.4.2"
> > +ADD_NAMESPACES(sw12)
> > +ADD_VETH(sw12, sw12, br-int, "192.168.4.3/24", "f0:00:00:03:04:03")
> > +ovn-nbctl lsp-add sw1 sw12 \
> > + -- lsp-set-addresses sw11 "f0:00:00:03:04:03 192.168.4.3"
> > +
> > ADD_NAMESPACES(public)
> > ADD_VETH(public, public, br-public, "192.168.2.2/24", "f0:00:00:01:02:05")
> > AT_CHECK([ovs-vsctl remove interface ovs-public external-ids
> > iface-id=public])
> > @@ -6582,12 +6592,10 @@ ovn-nbctl lsp-add sw1 ext \
> > AT_CHECK([ovn-nbctl set Logical_Switch_Port public
> > options:qos_min_rate=200000])
> > AT_CHECK([ovn-nbctl set Logical_Switch_Port public
> > options:qos_max_rate=300000])
> > AT_CHECK([ovn-nbctl set Logical_Switch_Port public
> > options:qos_burst=3000000])
> > -AT_CHECK([ovs-vsctl set interface ovs-public
> > external-ids:ovn-egress-iface=true])
> > AT_CHECK([ovn-nbctl set Logical_Switch_Port ext
> > options:qos_min_rate=400000])
> > AT_CHECK([ovn-nbctl set Logical_Switch_Port ext
> > options:qos_max_rate=600000])
> > AT_CHECK([ovn-nbctl set Logical_Switch_Port ext
> > options:qos_burst=6000000])
> > -AT_CHECK([ovs-vsctl set interface ovs-ext
> > external-ids:ovn-egress-iface=true])
> > OVS_WAIT_UNTIL([tc qdisc show | grep -q 'htb 1: dev ovs-public'])
> > OVS_WAIT_UNTIL([tc class show dev ovs-public | \
> > @@ -6634,6 +6642,80 @@ AT_CHECK([ovn-nbctl remove Logical_Switch_Port
> > public options qos_burst=6000000]
> > OVS_WAIT_UNTIL([test "$(tc qdisc show | grep 'htb 1: dev ovs-public')" =
> > ""])
> > +AT_CHECK([ovn-nbctl set Logical_Switch_Port sw01
> > options:qos_min_rate=200000])
> > +AT_CHECK([ovn-nbctl set Logical_Switch_Port sw01
> > options:qos_max_rate=350000])
> > +AT_CHECK([ovn-nbctl set Logical_Switch_Port sw01
> > options:qos_burst=3000000])
> > +
> > +AT_CHECK([ovn-nbctl set Logical_Switch_Port sw11
> > options:qos_min_rate=400000])
> > +AT_CHECK([ovn-nbctl set Logical_Switch_Port sw11
> > options:qos_max_rate=700000])
> > +AT_CHECK([ovn-nbctl set Logical_Switch_Port sw11
> > options:qos_burst=6000000])
> > +
> > +OVS_WAIT_UNTIL([tc qdisc show | grep -q 'htb 1: dev ovs-public'])
> > +OVS_WAIT_UNTIL([tc class show dev ovs-public | \
> > + grep -q 'class htb .* rate 200Kbit ceil 350Kbit burst
> > 375000b cburst 374999b'])
> > +
> > +OVS_WAIT_UNTIL([tc qdisc show | grep -q 'htb 1: dev ovs-ext'])
> > +OVS_WAIT_UNTIL([tc class show dev ovs-ext | \
> > + grep -q 'class htb .* prio 0 rate 400Kbit ceil 700Kbit
> > burst 750000b cburst 749999b'])
> > +
> > +AT_CHECK([ovn-nbctl set Logical_Switch_Port sw02
> > options:qos_min_rate=300000])
> > +AT_CHECK([ovn-nbctl set Logical_Switch_Port sw02
> > options:qos_max_rate=500000])
> > +AT_CHECK([ovn-nbctl set Logical_Switch_Port sw02
> > options:qos_burst=3000000])
> > +
> > +OVS_WAIT_UNTIL([tc class show dev ovs-public | \
> > + grep -q 'class htb .* prio 0 rate 300Kbit ceil 500Kbit
> > burst 375000b cburst 375000b'])
> > +
> > +AT_CHECK([ovn-nbctl set Logical_Switch_Port sw12
> > options:qos_min_rate=400000])
> > +AT_CHECK([ovn-nbctl set Logical_Switch_Port sw12
> > options:qos_max_rate=500000])
> > +AT_CHECK([ovn-nbctl set Logical_Switch_Port sw12
> > options:qos_burst=3000000])
> > +
> > +OVS_WAIT_UNTIL([tc class show dev ovs-ext | \
> > + grep -q 'class htb .* prio 0 rate 400Kbit ceil 500Kbit
> > burst 375000b cburst 375000b'])
> > +
> > +AT_CHECK([ovn-nbctl remove Logical_Switch_Port sw02 options
> > qos_min_rate=300000])
> > +AT_CHECK([ovn-nbctl remove Logical_Switch_Port sw02 options
> > qos_max_rate=500000])
> > +AT_CHECK([ovn-nbctl remove Logical_Switch_Port sw02 options
> > qos_burst=3000000])
> > +
> > +OVS_WAIT_UNTIL([tc qdisc show | grep -q 'htb 1: dev ovs-public'])
> > +OVS_WAIT_UNTIL([tc class show dev ovs-public | \
> > + grep -q 'class htb .* rate 200Kbit ceil 350Kbit burst
> > 375000b cburst 374999b'])
> > +OVS_WAIT_UNTIL([test "$(tc class show dev ovs-public | \
> > + grep 'class htb .* prio 0 rate 300Kbit ceil 500Kbit burst
> > 375000b cburst 375000b')" = ""])
> > +
> > +AT_CHECK([ovn-nbctl remove Logical_Switch_Port sw01 options
> > qos_min_rate=200000])
> > +AT_CHECK([ovn-nbctl remove Logical_Switch_Port sw01 options
> > qos_max_rate=350000])
> > +AT_CHECK([ovn-nbctl remove Logical_Switch_Port sw01 options
> > qos_burst=3000000])
> > +OVS_WAIT_UNTIL([test "$(tc qdisc show | grep 'htb 1: dev ovs-public')" =
> > ""])
> > +
> > +OVS_WAIT_UNTIL([tc qdisc show | grep -q 'htb 1: dev ovs-ext'])
> > +OVS_WAIT_UNTIL([tc class show dev ovs-ext | \
> > + grep -q 'class htb .* prio 0 rate 400Kbit ceil 700Kbit
> > burst 750000b cburst 749999b'])
> > +OVS_WAIT_UNTIL([tc class show dev ovs-ext | \
> > + grep -q 'class htb .* prio 0 rate 400Kbit ceil 500Kbit
> > burst 375000b cburst 375000b'])
> > +
> > +AT_CHECK([ovn-nbctl remove Logical_Switch_Port sw11 options
> > qos_min_rate=400000])
> > +AT_CHECK([ovn-nbctl remove Logical_Switch_Port sw11 options
> > qos_max_rate=700000])
> > +AT_CHECK([ovn-nbctl remove Logical_Switch_Port sw11 options
> > qos_burst=6000000])
> > +
> > +OVS_WAIT_UNTIL([tc qdisc show | grep -q 'htb 1: dev ovs-ext'])
> > +OVS_WAIT_UNTIL([test "$(tc class show dev ovs-ext | \
> > + grep 'class htb .* prio 0 rate 400Kbit ceil 700Kbit burst
> > 750000b cburst 749999b')" = ""])
> > +OVS_WAIT_UNTIL([tc class show dev ovs-ext | \
> > + grep -q 'class htb .* prio 0 rate 400Kbit ceil 500Kbit
> > burst 375000b cburst 375000b'])
> > +
> > +AT_CHECK([ovn-nbctl remove Logical_Switch_Port sw12 options
> > qos_min_rate=400000])
> > +AT_CHECK([ovn-nbctl remove Logical_Switch_Port sw12 options
> > qos_max_rate=500000])
> > +AT_CHECK([ovn-nbctl remove Logical_Switch_Port sw12 options
> > qos_burst=3000000])
> > +
> > +OVS_WAIT_UNTIL([test "$(tc qdisc show | grep 'htb 1: dev ovs-ext')" = ""])
> > +
> > +AT_CHECK([ovn-nbctl set Logical_Switch_Port sw02
> > options:qos_min_rate=5000000000])
> > +AT_CHECK([ovn-nbctl set Logical_Switch_Port sw02
> > options:qos_max_rate=6000000000])
> > +AT_CHECK([ovn-nbctl set Logical_Switch_Port sw02
> > options:qos_burst=1000000])
> > +
> > +OVS_WAIT_UNTIL([tc class show dev ovs-public | \
> > + grep -q 'class htb .* prio 0 rate 5Gbit ceil 6Gbit burst
> > 125000b cburst 124500b'])
> > +
> > kill $(pidof ovn-controller)
> > as ovn-sb
>
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev