From patchwork Tue Nov 7 21:16:56 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dave Taht X-Patchwork-Id: 835473 X-Patchwork-Delegate: shemminger@vyatta.com Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=netdev-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="hydJcrtH"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3yWj1S0whLz9s3w for ; Wed, 8 Nov 2017 08:17:16 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934002AbdKGVRO (ORCPT ); Tue, 7 Nov 2017 16:17:14 -0500 Received: from mail-pf0-f194.google.com ([209.85.192.194]:46182 "EHLO mail-pf0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933968AbdKGVRG (ORCPT ); Tue, 7 Nov 2017 16:17:06 -0500 Received: by mail-pf0-f194.google.com with SMTP id p87so426830pfj.3 for ; Tue, 07 Nov 2017 13:17:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=84cVYcHBazJGyIJYYVpn2jwK8uQB11/eZUt22S1ryrs=; b=hydJcrtHO7QRG/3bLESIWb422QOj/Ir+f/jqpMnsQKf+xKudUEL6kQIni5gEuEKnlX leCkv3+57vJpXxmHJkeGhKq3pPZdOza60r7ZGVfEktKokl/kFkpgHTKf80+doRPyBTQY mNQdhW/r+Yy5DrHTnCBgEYDoIf9fSuyTLTsrWfKAPaR3IwY87UZ1WSQB2ifAKx7Ovsuo P7/mmZtAB0bF8CMULE5AtYR9TJ54IGos5yKBtt31of2WgMkZQj+4NW6GD3RB9c+5cne+ iazslNoVNSJbRpro02ELj17BYMrOswyKjuGJxOTSvpc6Rk7qLFg85EGjfKJrPcRHkpFd 5I3A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=84cVYcHBazJGyIJYYVpn2jwK8uQB11/eZUt22S1ryrs=; b=tSTr0sGn1puM4OECsV9F9meoTqtvWuALoXTJcHF8a9CJSqPnTXF8adguvgrO7jzpNj 1EOWVSUNDd705cvW4nP45g9Pr40ysXx1OdvmNYMjE11jUQ0arRah/UKg64yazc2EeSri LRnTohPhAscwwdVUY/joqi7WwgIZD029ZBZlu7jfWSQhuGNsdMjVERIj7zcg7ekW88j5 bo7NKBLEoN3XPi0PZNHlbwBwl/c1ma4YDMd0PyiEjP9Zw6DSodeiGxgoDlVpEv7dgE9a /tDuLwSwRleyls1jdVlo/PTrCV2rXOZ9YDR7JRSOz6BvdkqQtKEmeTk8p6dFkaWaxaP1 0NFg== X-Gm-Message-State: AJaThX55dHTVrVorI5uNZF+xyCPcKyPVwry3EbgQX3u8axSDdFrROq+1 QPROqIIgL6SX1m3J5AaFDAEC0A== X-Google-Smtp-Source: ABhQp+Tpm1aK/QMZxaknfAlYiA4OP5oubN1+j8qSp2xPdfzYvNCXkn/AKJXhY5q+JiLwTwiQ4VHjjA== X-Received: by 10.159.216.145 with SMTP id s17mr61962plp.297.1510089425686; Tue, 07 Nov 2017 13:17:05 -0800 (PST) Received: from nemesis.lab.teklibre.com ([2603:3024:1536:86f0:2e0:4cff:fec1:1206]) by smtp.gmail.com with ESMTPSA id h29sm4993197pfd.65.2017.11.07.13.17.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 07 Nov 2017 13:17:05 -0800 (PST) From: Dave Taht To: netdev@vger.kernel.org Cc: Dave Taht Subject: [PATCH iproute2 4/4] netem: add documentation for the new slotting feature Date: Tue, 7 Nov 2017 13:16:56 -0800 Message-Id: <1510089416-5945-5-git-send-email-dave.taht@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1510089416-5945-1-git-send-email-dave.taht@gmail.com> References: <1510089416-5945-1-git-send-email-dave.taht@gmail.com> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Signed-off-by: Dave Taht --- man/man8/tc-netem.8 | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/man/man8/tc-netem.8 b/man/man8/tc-netem.8 index b31384f..8c41d77 100644 --- a/man/man8/tc-netem.8 +++ b/man/man8/tc-netem.8 @@ -8,7 +8,8 @@ NetEm \- Network Emulator .I OPTIONS .IR OPTIONS " := [ " LIMIT " ] [ " DELAY " ] [ " LOSS \ -" ] [ " CORRUPT " ] [ " DUPLICATION " ] [ " REORDERING " ][ " RATE " ]" +" ] [ " CORRUPT " ] [ " DUPLICATION " ] [ " REORDERING " ] [ " RATE \ +" ] [ " SLOT " ]" .IR LIMIT " := " .B limit @@ -51,6 +52,14 @@ NetEm \- Network Emulator .B rate .IR RATE " [ " PACKETOVERHEAD " [ " CELLSIZE " [ " CELLOVERHEAD " ]]]]" +.IR SLOT " := " +.BR slot +.IR MIN_DELAY " [ " MAX_DELAY " ] {[" +.BR packets +.IR PACKETS " ] [ " +.BR bytes +.IR BYTES " ] }]" + .SH DESCRIPTION NetEm is an enhancement of the Linux traffic control facilities @@ -162,6 +171,27 @@ granularity avoid a perfect shaping at a specific level. This will show up in an artificial packet compression (bursts). Another influence factor are network adapter buffers which can also add artificial delay. +.SS slot +defer delivering accumulated packets to within a slot, with each available slot +configured with a minimum delay to acquire, and an optional maximum delay. Slot +delays can be specified in nanoseconds, microseconds, milliseconds or seconds +(e.g. 800us). Values for the optional parameters +.I BYTES +will limit the number of bytes delivered per slot, and/or +.I PACKETS +will limit the number of packets delivered per slot. + +These slot options can provide a crude approximation of bursty MACs such as +DOCSIS, WiFi, and LTE. + +Note that slotting is limited by several factors: the kernel clock granularity, +as with a rate, and attempts to deliver many packets within a slot will be +smeared by the timer resolution, and by the underlying native bandwidth also. + +It is possible to combine slotting with a rate, in which case complex behaviors +where either the rate, or the slot limits on bytes or packets per slot, govern +the actual delivered rate. + .SH LIMITATIONS The main known limitation of Netem are related to timer granularity, since Linux is not a real-time operating system.