On 17 Feb 2021, at 9:23, Eelco Chaudron wrote:

On 17 Feb 2021, at 4:39, William Tu wrote:

RFC4115 says "The CIR and EIR are both measured in bits/s."
Fix the example use case based on the decription.
64-Byte packet * 8 * 1000 pps = 512000

Did you run some tests to verify the changes you made?

Fixes: e61bdffc2a98 ("netdev-dpdk: Add new DPDK RFC 4115 egress policer")
Signed-off-by: William Tu <u9012...@gmail.com>
---
 Documentation/topics/dpdk/qos.rst | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/Documentation/topics/dpdk/qos.rst b/Documentation/topics/dpdk/qos.rst
index 103495415a9c..e9a51ab3a3f0 100644
--- a/Documentation/topics/dpdk/qos.rst
+++ b/Documentation/topics/dpdk/qos.rst
@@ -69,22 +69,22 @@ to prioritize certain traffic over others at a port level.

For example, the following configuration will limit the traffic rate at a port level to a maximum of 2000 packets a second (64 bytes IPv4 packets). -100pps as CIR (Committed Information Rate) and 1000pps as EIR (Excess +1000pps as CIR (Committed Information Rate) and 1000pps as EIR (Excess

Ack this should be 1000

Information Rate). High priority traffic is routed to queue 10, which marks all traffic as CIR, i.e. Green. All low priority traffic, queue 20, is
 marked as EIR, i.e. Yellow::

     $ ovs-vsctl --timeout=5 set port dpdk1 qos=@myqos -- \
         --id=@myqos create qos type=trtcm-policer \
-        other-config:cir=52000 other-config:cbs=2048 \
-        other-config:eir=52000 other-config:ebs=2048  \

52000 is fine as our documentation states cir, eir are in bytes per second, minus the ethernet header.
So (64-12) * 1000 = 52000

+        other-config:cir=512000 other-config:cbs=2048 \
+        other-config:eir=512000 other-config:ebs=2048  \
         queues:10=@dpdk1Q10 queues:20=@dpdk1Q20 -- \
          --id=@dpdk1Q10 create queue \
-          other-config:cir=41600000 other-config:cbs=2048 \

This one should change to cir 2*52000 = 104000 also.

-          other-config:eir=0 other-config:ebs=0 -- \

This should change unaltered.

+          other-config:cir=512000 other-config:cbs=2048 \
+          other-config:eir=512000 other-config:ebs=0 -- \

The eir should stay zero here

          --id=@dpdk1Q20 create queue \
            other-config:cir=0 other-config:cbs=0 \
-           other-config:eir=41600000 other-config:ebs=2048 \
+           other-config:eir=512000 other-config:ebs=2048 \

This should be 52000 also the trailing backslash can be removed.

 This configuration accomplishes that the high priority traffic has a
guaranteed bandwidth egressing the ports at CIR (1000pps), but it can also

I’ll re-run some of my tests if you have not done so with the new config. Hopefully next week or the week after.

I found some time to re-test this, and with the new values it works as expected.
To be clear this is the correct set:

$ ovs-vsctl --timeout=5 set port dpdk1 qos=@myqos -- \
    --id=@myqos create qos type=trtcm-policer \
    other-config:cir=52000 other-config:cbs=2048 \
    other-config:eir=52000 other-config:ebs=2048  \
    queues:10=@dpdk1Q10 queues:20=@dpdk1Q20 -- \
     --id=@dpdk1Q10 create queue \
      other-config:cir=104000 other-config:cbs=2048 \
      other-config:eir=0 other-config:ebs=0 -- \
     --id=@dpdk1Q20 create queue \
       other-config:cir=0 other-config:cbs=0 \
       other-config:eir=52000 other-config:ebs=2048

_______________________________________________
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

_______________________________________________
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to