GithubHelp home page GithubHelp logo

dtaht / tc-adv Goto Github PK

View Code? Open in Web Editor NEW
13.0 11.0 13.0 4.92 MB

Iproute2 patched to support variants of codel, cake, and fq_pie

License: GNU General Public License v2.0

Makefile 0.58% C 96.66% Shell 1.68% Yacc 0.29% Lex 0.12% Roff 0.66% C++ 0.02%

tc-adv's Introduction

This is a set of utilities for Linux networking.

Information:
    https://wiki.linuxfoundation.org/networking/iproute2

Download:
    http://www.kernel.org/pub/linux/utils/net/iproute2/

Stable version repository:
    git://git.kernel.org/pub/scm/network/iproute2/iproute2.git

Development repository:
    git://git.kernel.org/pub/scm/network/iproute2/iproute2-next.git

How to compile this.
--------------------
1. libdbm

arpd needs to have the db4 development libraries. For Debian
users this is the package with a name like libdb4.x-dev.
DBM_INCLUDE points to the directory with db_185.h which
is the include file used by arpd to get to the old format Berkeley
database routines.  Often this is in the db-devel package.

2. make

The makefile will automatically build a config.mk file which
contains definitions of libraries that may or may not be available
on the system such as: ATM, ELF, MNL, and SELINUX.

3. To make documentation, cd to doc/ directory , then
   look at start of Makefile and set correct values for
   PAGESIZE=a4		, ie: a4 , letter ...	(string)
   PAGESPERPAGE=2	, ie: 1 , 2 ...		(numeric)
   and make there. It assumes, that latex, dvips and psnup
   are in your path.

4. This package includes matching sanitized kernel headers because
   the build environment may not have up to date versions. See Makefile
   if you have special requirements and need to point at different
   kernel include files.

Stephen Hemminger
[email protected]

Alexey Kuznetsov
[email protected]

tc-adv's People

Contributors

amirv avatar andhe avatar asbjornst avatar borkmann avatar chromi avatar contyk avatar dcaratti avatar dpward avatar dsahern avatar ebiederm avatar jhsmt avatar jpirko avatar julienfortin avatar kaber avatar ldir-edb0 avatar liuhangbin avatar masatake avatar nicolasdichtel avatar roidayan avatar roopa-prabhu avatar serhepopovych avatar shemminger avatar shorman-netronome avatar subrav avatar thomasjfox avatar tohojo avatar vapier avatar vkochan avatar xemul avatar yotamgi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tc-adv's Issues

Negative deficit overflow

print_int(PRINT_ANY, "deficit", " deficit %u",

15cbec5

I have observed overflowing deficit values and wondering if the commit above neglected to change the printf format from unsigned to signed?

# tc -s class show dev eth0
class cake 8005:42b parent 8005:
 (dropped 44, overlimits 0 requeues 0)
 backlog 10598b 7p requeues 0
  deficit 4294967060 count 16 dropping drop_next -4295.0s blue_prob 0
class cake 8005:4e5 parent 8005:
 (dropped 48, overlimits 0 requeues 0)
 backlog 6056b 4p requeues 0
  deficit 4294967226 count 17 dropping drop_next -4294.9s blue_prob 0
class cake 8005:7b2 parent 8005:
 (dropped 55, overlimits 0 requeues 0)
 backlog 4542b 3p requeues 0
  deficit 4294965931 count 21 dropping drop_next -4294.9s blue_prob 0

# tc -s class show dev ifb4eth0
class cake 8006:a1 parent 8006:
 (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
  deficit 4294966517 count 1 dropping drop_next 1.1s blue_prob 0
class cake 8006:fc parent 8006:
 (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
  deficit 1449 count 0 blue_prob 0

Overhead and compensated overhead reporting seems a bit too terse

Maybe we could change:

	if (!atm && overhead == ethernet) {
		fprintf(f, "raw ");
	} else {
		if (atm == 1)
			fprintf(f, "atm ");
		else if (atm == 2)
			fprintf(f, "ptm ");
		else
			fprintf(f, "noatm ");

		fprintf(f, "overhead %d ", overhead);

		// This is actually the *amount* of automatic compensation, so
		// also report the actual number... keep it short
		if (ethernet) {
			 fprintf(f, "via-ethernet(%d) ", ethernet);
	}

to:

	if (!atm) {
		fprintf(f, "raw ");
	} else {
		if (atm == 1)
			fprintf(f, "atm ");
		else if (atm == 2)
			fprintf(f, "ptm ");
		else
			fprintf(f, "noatm ");
    }
    
    // unconditionally report the total accounted overhead
    // as well as the auto compensated for amount
    fprintf(f, "overhead %d ", overhead);
    fprintf(f, "(auto-compensated overhead: %d) ", ethernet);
    
    // This is actually the *amount* of automatic compensation
    if (ethernet) {
        fprintf(f, "via-ethernet ");
	}

So that total compensated overhead and automatically compensated overhead are reported unconditionally. For debugging this would help quite a lot...

Note via-ethernet then is redundant, but it might be oaky to keep it for backward compatibility with scripts parsing "tc -s" output...

Never ever change an API in the middle

@kdarbyshirebryant @rmounce

I just pulled this to see this

   TCA_CAKE_OVERHEAD,
    TCA_CAKE_MPU, nonononono
    TCA_CAKE_RTT,

When it needed to be at the end (after wash), so as to not break userspace. Is this new MPU param, in this order, in any form, anywhere we can't fix it? (e.g. lede?).

Also the pull I just merged had no wash in it in the first place for tc, and it's inserted in the wrong place on cake, also. So what I want to do is pull wash for tc-adv (where is it?), then move MPU to after wash, in both the sch_cake and tc cases.

doing a "make install DESTDIR=..\tc-adv-made" is not moving the executables into the DESTIDIR

Hi, I'm tryin to build on one machine, and transfer to another, so I'm using the DESTDIR= parameter.

The problem is that none of the executables are being installed into the DESTDIR, only all the supporting files. The executables are still being installed into their "production" locations.

I'm just not familiar enough with editing the Makefile to spot the necessary changes needed.

Or am I missing something?

pppoe-ptm overhead values seem to be off

As written elsewhere, the following section of tc/q_cake.c seems to require more explanation:

} else if (strcmp(*argv, "pppoe-ptm") == 0) {
atm = 2;
overhead += 27;

This is somewhat unexpected. Could you explain how you reached 27? I believe that the following to be true:

PPPoE: 2 Byte PPP + 6 Byte PPPoE = 8 Byte
VDSL2 (see IEEE 802.3-2012 61.3 and Rec. ITU-T G.992.3 (04/2009) Annex N relevant for VDSL2):
VDSL2-PTM: 1 Byte Start of Frame (S), 1 Byte End of Frame (Ck), 2 Byte TC-CRC (PTM-FCS), = 1 + 1 + 2 = 4 Byte
included ethernet header parts: 4 Byte Frame Check Sequence (FCS) + 6 Byte (dest MAC) + 6 Byte (src MAC) + 2 Byte (ethertype) = 4 + 6 + 6 + 2 = 18 Byte

Total: 8 + 4 + 18 = 30 Byte

Now, all of this could be wrong, but could you please describe why 27 is a better match for what happens on a PPPoE-PTM link?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.