From patchwork Mon Apr 16 14:30:22 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Finucane X-Patchwork-Id: 898651 X-Patchwork-Delegate: ian.stokes@intel.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=openvswitch.org (client-ip=140.211.169.12; helo=mail.linuxfoundation.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=that.guru Authentication-Results: ozlabs.org; dkim=fail reason="key not found in DNS" (0-bit key; unprotected) header.d=that.guru header.i=@that.guru header.b="HetCAoyq"; dkim-atps=neutral Received: from mail.linuxfoundation.org (mail.linuxfoundation.org [140.211.169.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 40PrRV69d5z9s1l for ; Tue, 17 Apr 2018 00:31:34 +1000 (AEST) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id 08976E76; Mon, 16 Apr 2018 14:30:45 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@mail.linuxfoundation.org Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id D6BCCD86 for ; Mon, 16 Apr 2018 14:30:42 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from glass.birch.relay.mailchannels.net (glass.birch.relay.mailchannels.net [23.83.209.70]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 81D79680 for ; Mon, 16 Apr 2018 14:30:41 +0000 (UTC) X-Sender-Id: 5xi41l16bi|x-authuser|stephen@that.guru Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id A4A5B4071A; Mon, 16 Apr 2018 14:30:40 +0000 (UTC) Received: from one.mxroute.com (unknown [100.96.12.37]) (Authenticated sender: 5xi41l16bi) by relay.mailchannels.net (Postfix) with ESMTPA id 20C4A41C01; Mon, 16 Apr 2018 14:30:40 +0000 (UTC) X-Sender-Id: 5xi41l16bi|x-authuser|stephen@that.guru Received: from one.mxroute.com (one-outgoing.mxroute.com [172.19.36.130]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384) by 0.0.0.0:2500 (trex/5.14.1); Mon, 16 Apr 2018 14:30:40 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: 5xi41l16bi|x-authuser|stephen@that.guru X-MailChannels-Auth-Id: 5xi41l16bi X-Unite-Irritate: 636f1ed65af1f9a7_1523889040465_2366022619 X-MC-Loop-Signature: 1523889040465:1684535447 X-MC-Ingress-Time: 1523889040465 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=that.guru; s=default; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Sender:Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=6Ff/Q5uBoiOhNSDf+ZuMLLhwO1gxNlaDaQNrHvUCr7k=; b=HetCAoyqPPDB5U4+7T/mC4VyHy DynxZQSWIpKumcCMi4tmiizCAkpJwf/ot1KDH9ZoWj9pOzq7H43HqLxCk76J7ZZdwf1ZKwt/C+lBn XyG8nLcyHGBSbBoxu1tm6LCTW8tl8ict848X14JGW2ZVzhKm6Hs1qkLZNyLFfEj41LE9BEbxVbXR+ SR2GJMskMwB2n6L3vekyCAGWUUZv19heWg3fNdYOaacqe/IefQsMvilpP+ga8421J6I0LSI0I/cHl Aao3YBQJ310GiJIjKakabTU4SQJgPG4C35E3aSwVVbChOSGxJzFMtcbzku8/RGOdvSXoKmcZwd39p otujJIcA==; From: Stephen Finucane To: dev@openvswitch.org Date: Mon, 16 Apr 2018 15:30:22 +0100 Message-Id: <20180416143026.24561-6-stephen@that.guru> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180416143026.24561-1-stephen@that.guru> References: <20180416143026.24561-1-stephen@that.guru> X-AuthUser: stephen@that.guru X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_NONE,T_DKIM_INVALID autolearn=no version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Subject: [ovs-dev] [PATCH v2 5/9] doc: Move "QoS" guide to its own document X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: ovs-dev-bounces@openvswitch.org Errors-To: ovs-dev-bounces@openvswitch.org Again, this stuff is too detailed for a high-level howto. Signed-off-by: Stephen Finucane --- v2: - Keep flow control section in 'phy' document --- Documentation/howto/dpdk.rst | 42 -------------------- Documentation/topics/dpdk/index.rst | 1 + Documentation/topics/dpdk/phy.rst | 2 + Documentation/topics/dpdk/qos.rst | 76 +++++++++++++++++++++++++++++++++++++ 4 files changed, 79 insertions(+), 42 deletions(-) create mode 100644 Documentation/topics/dpdk/qos.rst diff --git a/Documentation/howto/dpdk.rst b/Documentation/howto/dpdk.rst index 9cb76b7e1..3e04d8627 100644 --- a/Documentation/howto/dpdk.rst +++ b/Documentation/howto/dpdk.rst @@ -85,48 +85,6 @@ To stop ovs-vswitchd & delete bridge, run:: $ ovs-appctl -t ovsdb-server exit $ ovs-vsctl del-br br0 -QoS ---- - -Assuming you have a vhost-user port transmitting traffic consisting of packets -of size 64 bytes, the following command would limit the egress transmission -rate of the port to ~1,000,000 packets per second:: - - $ ovs-vsctl set port vhost-user0 qos=@newqos -- \ - --id=@newqos create qos type=egress-policer other-config:cir=46000000 \ - other-config:cbs=2048` - -To examine the QoS configuration of the port, run:: - - $ ovs-appctl -t ovs-vswitchd qos/show vhost-user0 - -To clear the QoS configuration from the port and ovsdb, run:: - - $ ovs-vsctl destroy QoS vhost-user0 -- clear Port vhost-user0 qos - -Refer to vswitch.xml for more details on egress-policer. - -Rate Limiting --------------- - -Here is an example on Ingress Policing usage. Assuming you have a vhost-user -port receiving traffic consisting of packets of size 64 bytes, the following -command would limit the reception rate of the port to ~1,000,000 packets per -second:: - - $ ovs-vsctl set interface vhost-user0 ingress_policing_rate=368000 \ - ingress_policing_burst=1000` - -To examine the ingress policer configuration of the port:: - - $ ovs-vsctl list interface vhost-user0 - -To clear the ingress policer configuration from the port:: - - $ ovs-vsctl set interface vhost-user0 ingress_policing_rate=0 - -Refer to vswitch.xml for more details on ingress-policer. - pdump ----- diff --git a/Documentation/topics/dpdk/index.rst b/Documentation/topics/dpdk/index.rst index c1e6ea78c..d3c1e2099 100644 --- a/Documentation/topics/dpdk/index.rst +++ b/Documentation/topics/dpdk/index.rst @@ -36,3 +36,4 @@ The DPDK Datapath /topics/dpdk/ring /topics/dpdk/vdev /topics/dpdk/pmd + /topics/dpdk/qos diff --git a/Documentation/topics/dpdk/phy.rst b/Documentation/topics/dpdk/phy.rst index 929f394ea..581984b63 100644 --- a/Documentation/topics/dpdk/phy.rst +++ b/Documentation/topics/dpdk/phy.rst @@ -126,6 +126,8 @@ DPDK acceleration. It is possible to configure multiple Rx queues for ``dpdk`` ports, thus ensuring this is not a bottleneck for performance. For information on configuring PMD threads, refer to :doc:`pmd`. +.. _dpdk-phy-flow-control: + Flow Control ------------ diff --git a/Documentation/topics/dpdk/qos.rst b/Documentation/topics/dpdk/qos.rst new file mode 100644 index 000000000..b42140515 --- /dev/null +++ b/Documentation/topics/dpdk/qos.rst @@ -0,0 +1,76 @@ +.. + Licensed under the Apache License, Version 2.0 (the "License"); you may + not use this file except in compliance with the License. You may obtain + a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + License for the specific language governing permissions and limitations + under the License. + + Convention for heading levels in Open vSwitch documentation: + + ======= Heading 0 (reserved for the title in a document) + ------- Heading 1 + ~~~~~~~ Heading 2 + +++++++ Heading 3 + ''''''' Heading 4 + + Avoid deeper levels because they do not render well. + +======================== +Quality of Service (QoS) +======================== + +It is possible to apply both ingress and egress limiting when using the DPDK +datapath. These are referred to as *QoS* and *Rate Limiting*, respectively. + +QoS (Egress Policing) +--------------------- + +Assuming you have a :doc:`vhost-user port ` transmitting traffic +consisting of packets of size 64 bytes, the following command would limit the +egress transmission rate of the port to ~1,000,000 packets per second:: + + $ ovs-vsctl set port vhost-user0 qos=@newqos -- \ + --id=@newqos create qos type=egress-policer other-config:cir=46000000 \ + other-config:cbs=2048` + +To examine the QoS configuration of the port, run:: + + $ ovs-appctl -t ovs-vswitchd qos/show vhost-user0 + +To clear the QoS configuration from the port and ovsdb, run:: + + $ ovs-vsctl destroy QoS vhost-user0 -- clear Port vhost-user0 qos + +Refer to ``vswitch.xml`` for more details on egress policer. + +Rate Limiting (Ingress Policing) +-------------------------------- + +Assuming you have a :doc:`vhost-user port ` receiving traffic +consisting of packets of size 64 bytes, the following command would limit the +reception rate of the port to ~1,000,000 packets per second:: + + $ ovs-vsctl set interface vhost-user0 ingress_policing_rate=368000 \ + ingress_policing_burst=1000` + +To examine the ingress policer configuration of the port:: + + $ ovs-vsctl list interface vhost-user0 + +To clear the ingress policer configuration from the port:: + + $ ovs-vsctl set interface vhost-user0 ingress_policing_rate=0 + +Refer to ``vswitch.xml`` for more details on ingress policer. + +Flow Control +------------ + +Flow control is available for :doc:`DPDK physical ports `. For more +information, refer to :ref:`dpdk-phy-flow-control`.