All of lore.kernel.org
 help / color / mirror / Atom feed
From: William Dauchy <william@gandi.net>
To: Ian Campbell <Ian.Campbell@citrix.com>
Cc: Ahmed Amamou <ahmed@gandi.net>, Kamel Haddadou <kamel@gandi.net>,
	Wei Liu <wei.liu2@citrix.com>, William Dauchy <william@gandi.net>,
	xen-devel <xen-devel@lists.xen.org>
Subject: [PATCH v4 3/3] netif documentation
Date: Mon,  5 Aug 2013 17:13:10 +0200	[thread overview]
Message-ID: <1375715590-1539-4-git-send-email-william@gandi.net> (raw)
In-Reply-To: <1375715590-1539-1-git-send-email-william@gandi.net>

add netif old rate limit documentation
add new pps limit documentation

Signed-off-by: Ahmed Amamou <ahmed@gandi.net>
Signed-off-by: William Dauchy <william@gandi.net>
Signed-off-by: Kamel Haddadou <kamel@gandi.net>
---
 docs/misc/xl-network-configuration.markdown |   18 +++++++++++++-----
 xen/include/public/io/netif.h               |   27 +++++++++++++++++++++++++++
 2 files changed, 40 insertions(+), 5 deletions(-)

diff --git a/docs/misc/xl-network-configuration.markdown b/docs/misc/xl-network-configuration.markdown
index e0d3d2a..1f4ffff 100644
--- a/docs/misc/xl-network-configuration.markdown
+++ b/docs/misc/xl-network-configuration.markdown
@@ -141,25 +141,33 @@ domain which is outside the scope of this document.
 Specifies the rate at which the outgoing traffic will be limited to.
 The default if this keyword is not specified is unlimited.
 
-The rate may be specified as "<RATE>/s" or optionally "<RATE>/s@<INTERVAL>".
+The rate may be specified as "<RATE>/s" or optionally
+"<RATE>/s@<INTERVAL>" or "<RATE>/s&<PPS>pps" or "<RATE>/s&<PPS>pps@<INTERVAL>".
 
   * `RATE` is in bytes and can accept suffixes:
       * GB, MB, KB, B for bytes.
       * Gb, Mb, Kb, b for bits.
+
+  * `PPS` is in packet and can accept suffixes:
+      * Gpps, Mpps, Kpps, pps.
+    It determines the packets per second that outgoing traffic will be
+    limited to.
+
   * `INTERVAL` is in microseconds and can accept suffixes: ms, us, s.
     It determines the frequency at which the vif transmission credit
     is replenished. The default is 50ms.
 
-Vif rate limiting is credit-based. It means that for "1MB/s@20ms", the
+Vif rate limiting is credit-based. It means that for "1MB/s&50Kpps@20ms", the
 available credit will be equivalent of the traffic you would have done
-at "1MB/s" during 20ms. This will results in a credit of 20,000 bytes
-replenished every 20,000 us.
+at "1MB/s" or 50,000 pps during 20ms. This will results in a credit of 20,000
+bytes or 1000 packets replenished every 20,000 us.
 
 For example:
 
         'rate=10Mb/s' -- meaning up to 10 megabits every second
         'rate=250KB/s' -- meaning up to 250 kilobytes every second
-        'rate=1MB/s@20ms' -- meaning 20,000 bytes in every 20 millisecond period
+        'rate=1MB/s&10Kpps@20ms' -- meaning 20,000 bytes or 200 packets in
+every 20 millisecond period
 
 NOTE: The actual underlying limits of rate limiting are dependent
 on the underlying netback implementation.
diff --git a/xen/include/public/io/netif.h b/xen/include/public/io/netif.h
index d477751..8bd112f 100644
--- a/xen/include/public/io/netif.h
+++ b/xen/include/public/io/netif.h
@@ -79,6 +79,33 @@
  *  Request N: netif_tx_request -- 0
  */
 
+/*
+ * ------------------------- Backend Device Properties -------------------------
+ *
+ * interval
+ *      Values:         <uint64_t>
+ *      Default Value:  0
+ *
+ *      Used time interval in usecond for throughput and pps limits. The
+ * same interval is used for both of them in order to simplify the
+ * implementation. Using the same check interval also avoid possible bugs
+ * that invole bypassing these limits
+ *
+ * rate
+ *      Values:         <uint64_t>
+ *      Default Value:  ~0
+ *
+ *      The netback reading rate in bytes from the shared ring. This rate is
+ * represented in bytes per interval.
+ *
+ * pps
+ *      Values:         <uint64_t>
+ *      Default Value:  ~0
+ *
+ *      The netback reading rate in tx slots from the shared ring.This rate is
+ * represented in request per interval.
+ */
+
 /* Protocol checksum field is blank in the packet (hardware offload)? */
 #define _NETTXF_csum_blank     (0)
 #define  NETTXF_csum_blank     (1U<<_NETTXF_csum_blank)
-- 
1.7.9.5

  parent reply	other threads:[~2013-08-05 15:13 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-05 15:13 [PATCH v4 0/3][xen-netback][toolstack] add a pseudo pps limit to netback William Dauchy
2013-08-05 15:13 ` [PATCH v4 1/3] xen netback: add a pseudo pps rate limit William Dauchy
2013-08-09  6:03   ` Wei Liu
2013-08-05 15:13 ` [PATCH v4 2/3] handle pps limit parameter William Dauchy
2013-08-09  5:59   ` Wei Liu
2013-08-19 14:18     ` Ian Jackson
2013-08-05 15:13 ` William Dauchy [this message]
2013-08-09  6:02   ` [PATCH v4 3/3] netif documentation Wei Liu
2013-08-09  6:00 ` [PATCH v4 0/3][xen-netback][toolstack] add a pseudo pps limit to netback Wei Liu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1375715590-1539-4-git-send-email-william@gandi.net \
    --to=william@gandi.net \
    --cc=Ian.Campbell@citrix.com \
    --cc=ahmed@gandi.net \
    --cc=kamel@gandi.net \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.