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 0/3][xen-netback][toolstack] add a pseudo pps limit to netback
Date: Mon,  5 Aug 2013 17:13:07 +0200	[thread overview]
Message-ID: <1375715590-1539-1-git-send-email-william@gandi.net> (raw)

VM traffic is already limited by a throughput limit, but there is no
control over the maximum packet per second (PPS).
In DDOS attack the major issue is rather PPS than throughput.
With provider offering more bandwidth to VMs, it becames easy to
coordinate a massive attack using VMs. Example: 100Mbits ~ 200kpps using
64B packets.
This patch provides a new option to limit VMs maximum packets per second
emission rate.
It follows the same credits logic used for throughput shaping. For the
moment we have considered each "txreq" as a packet.
PPS limits is passed to VIF at connection time via xenstore.
PPS credit uses the same usecond period used by rate shaping check.

known limitations:
- by using the same usecond period, PPS shaping depends on throughput
  shaping.
- it is not always true that a "txreq" correspond to a paquet
  (fragmentation cases) but as this shaping is meant to avoid DDOS
  (small paquets) such an pproximation should not impact the results.
- Some help on burst handling will be appreciated.

v2:
- fix some typo

v3:

- fix some typo
- add toolstack patch

v4:
- fix toolstack memleak
Ahmed Amamou (1):
  xen netback: add a pseudo pps rate limit

 drivers/net/xen-netback/common.h    |    2 ++
 drivers/net/xen-netback/interface.c |    1 +
 drivers/net/xen-netback/netback.c   |   41 +++++++++++++++++++++++++++++++++++
 drivers/net/xen-netback/xenbus.c    |   31 +++++++++++++++++++++-----
 4 files changed, 70 insertions(+), 5 deletions(-)

[toolstack]
This patch will update the libxl in order to provide the new pps limit
new pps limit can be defined as follow
YYMb/s&XXKpps@ZZms
or
YYMb/s@ZZms&XXKpps
or
YYMb/s&XXKpps in such case default 50ms interval will be used

Ahmed Amamou (2):
  handle pps limit parameter
  netif documentation

 docs/misc/xl-network-configuration.markdown |   18 +++++--
 tools/libxl/libxl.c                         |    3 ++
 tools/libxl/libxl_types.idl                 |    1 +
 tools/libxl/libxlu_vif.c                    |   70 +++++++++++++++++++++++++--
 xen/include/public/io/netif.h               |   27 +++++++++++
 5 files changed, 111 insertions(+), 8 deletions(-)

-- 
1.7.9.5

             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 William Dauchy [this message]
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 ` [PATCH v4 3/3] netif documentation William Dauchy
2013-08-09  6:02   ` 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-1-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.