From owner-svn-src-stable-11@freebsd.org Mon Mar 19 07:28:55 2018 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 10678F576F8; Mon, 19 Mar 2018 07:28:55 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B80A9802F2; Mon, 19 Mar 2018 07:28:54 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B2F353C5E; Mon, 19 Mar 2018 07:28:54 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2J7Ss9e017192; Mon, 19 Mar 2018 07:28:54 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2J7SsOF017190; Mon, 19 Mar 2018 07:28:54 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201803190728.w2J7SsOF017190@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Mon, 19 Mar 2018 07:28:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r331194 - stable/11/sbin/ipfw X-SVN-Group: stable-11 X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: stable/11/sbin/ipfw X-SVN-Commit-Revision: 331194 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Mar 2018 07:28:55 -0000 Author: eadler Date: Mon Mar 19 07:28:54 2018 New Revision: 331194 URL: https://svnweb.freebsd.org/changeset/base/331194 Log: MFC r320268,r320276: ipfw: dummynet: Add 'G' and 'g' suffix for bandwidth configuration/display Modified: stable/11/sbin/ipfw/dummynet.c stable/11/sbin/ipfw/ipfw.8 Directory Properties: stable/11/ (props changed) Modified: stable/11/sbin/ipfw/dummynet.c ============================================================================== --- stable/11/sbin/ipfw/dummynet.c Mon Mar 19 07:08:14 2018 (r331193) +++ stable/11/sbin/ipfw/dummynet.c Mon Mar 19 07:28:54 2018 (r331194) @@ -626,6 +626,8 @@ list_pipes(struct dn_id *oid, struct dn_id *end) /* data rate */ if (b == 0) sprintf(bwbuf, "unlimited "); + else if (b >= 1000000000) + sprintf(bwbuf, "%7.3f Gbit/s", b/1000000000); else if (b >= 1000000) sprintf(bwbuf, "%7.3f Mbit/s", b/1000000); else if (b >= 1000) @@ -818,6 +820,9 @@ read_bandwidth(char *arg, int *bandwidth, char *if_nam } else if (*end == 'M' || *end == 'm') { end++; bw *= 1000000; + } else if (*end == 'G' || *end == 'g') { + end++; + bw *= 1000000000; } if ((*end == 'B' && _substrcmp2(end, "Bi", "Bit/s") != 0) || Modified: stable/11/sbin/ipfw/ipfw.8 ============================================================================== --- stable/11/sbin/ipfw/ipfw.8 Mon Mar 19 07:08:14 2018 (r331193) +++ stable/11/sbin/ipfw/ipfw.8 Mon Mar 19 07:28:54 2018 (r331194) @@ -2499,7 +2499,7 @@ The following parameters can be configured for a pipe: .It Cm bw Ar bandwidth | device Bandwidth, measured in .Sm off -.Op Cm K | M +.Op Cm K | M | G .Brq Cm bit/s | Byte/s . .Sm on .Pp