{
    "content": [
        {
            "type": "text",
            "text": "# tc-ets (man)\n\n## NAME\n\nETS - Enhanced Transmission Selection scheduler\n\n## SYNOPSIS\n\ntc  qdisc  ... ets [ bands number ] [ strict number ] [ quanta bytes bytes bytes...  ] [ pri‐‐\nomap band band band...  ]\ntc class ... ets [ quantum bytes ]\n\n## DESCRIPTION\n\nThe Enhanced Transmission Selection scheduler is a classful queuing  discipline  that  merges\nfunctionality  of  PRIO and DRR qdiscs in one scheduler. ETS makes it easy to configure a set\nof strict and bandwidth-sharing bands to implement the transmission  selection  described  in\n802.1Qaz.\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **ALGORITHM**\n- **CLASSIFICATION**\n- **PARAMETERS** (1 subsections)\n- **SEE ALSO**\n- **AUTHOR**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "tc-ets",
        "section": "",
        "mode": "man",
        "summary": "ETS - Enhanced Transmission Selection scheduler",
        "synopsis": "tc  qdisc  ... ets [ bands number ] [ strict number ] [ quanta bytes bytes bytes...  ] [ pri‐‐\nomap band band band...  ]\ntc class ... ets [ quantum bytes ]",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [
            {
                "name": "tc",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/tc/8/json"
            },
            {
                "name": "tc-prio",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/tc-prio/8/json"
            },
            {
                "name": "tc-drr",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/tc-drr/8/json"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 6,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 17,
                "subsections": []
            },
            {
                "name": "ALGORITHM",
                "lines": 18,
                "subsections": []
            },
            {
                "name": "CLASSIFICATION",
                "lines": 14,
                "subsections": []
            },
            {
                "name": "PARAMETERS",
                "lines": 29,
                "subsections": [
                    {
                        "name": "EXAMPLE & USAGE",
                        "lines": 48
                    }
                ]
            },
            {
                "name": "SEE ALSO",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "AUTHOR",
                "lines": 6,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "ETS - Enhanced Transmission Selection scheduler\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "tc  qdisc  ... ets [ bands number ] [ strict number ] [ quanta bytes bytes bytes...  ] [ pri‐‐\nomap band band band...  ]\n\ntc class ... ets [ quantum bytes ]\n\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "The Enhanced Transmission Selection scheduler is a classful queuing  discipline  that  merges\nfunctionality  of  PRIO and DRR qdiscs in one scheduler. ETS makes it easy to configure a set\nof strict and bandwidth-sharing bands to implement the transmission  selection  described  in\n802.1Qaz.\n\nOn  creation  with  'tc qdisc add', a fixed number of bands is created. Each band is a class,\nalthough it is not possible to directly add and remove bands with 'tc  class'  commands.  The\nnumber  of  bands to be created must instead be specified on the command line as the qdisc is\nadded.\n\nThe minor number of classid to use when referring to a band is the band number  increased  by\none. Thus band 0 will have classid of major:1, band 1 that of major:2, etc.\n\nETS  bands  are  of  two  types: some number may be in strict mode, the remaining ones are in\nbandwidth-sharing mode.\n\n",
                "subsections": []
            },
            "ALGORITHM": {
                "content": "When dequeuing, strict bands are tried first, if there are any. Band 0 is tried first. If  it\ndid  not  deliver a packet, band 1 is tried next, and so on until one of the bands delivers a\npacket, or the strict bands are exhausted.\n\nIf no packet has been dequeued from any of the strict bands, if there are any bandwidth-shar‐\ning bands, the dequeuing proceeds according to the DRR algorithm. Each bandwidth-sharing band\nis assigned a deficit counter, initialized to quantum assigned by a quanta element. ETS main‐\ntains  an  (internal)  ''active'' list of bandwidth-sharing bands whose qdiscs are non-empty.\nThis list is used for dequeuing. A packet is dequeued from the band at the head of  the  list\nif  the  packet size is smaller or equal to the deficit counter. If the counter is too small,\nit is increased by quantum and the scheduler moves on to the next band in the active list.\n\nOnly qdiscs that own their queue should be added below the bandwidth-sharing bands. Attaching\nto them non-work-conserving qdiscs like TBF does not make sense -- other qdiscs in the active\nlist will be skipped until the dequeue operation succeeds. This  limitation  does  not  exist\nwith the strict bands.\n\n",
                "subsections": []
            },
            "CLASSIFICATION": {
                "content": "The ETS qdisc allows three ways to decide which band to enqueue a packet to:\n\n- Packet priority can be directly set to a class handle, in which case that\nis the queue where the packet will be put. For example, band number 2 of\na qdisc with handle of 11: will have classid 11:3. To mark a packet for\nqueuing to this band, the packet priority should be set to 0x110003.\n\n- A tc filter attached to the qdisc can put the packet to a band by using\nthe flowid keyword.\n\n- As a last resort, the ETS qdisc consults its priomap (see below), which\nmaps packets to bands based on packet priority.\n\n",
                "subsections": []
            },
            "PARAMETERS": {
                "content": "strict The number of bands that should be created in strict mode. If not given, this value is\n0.\n\n\nquanta Each bandwidth-sharing band needs to know its quantum, which is the amount of bytes  a\nband  is  allowed  to dequeue before the scheduler moves to the next bandwidth-sharing\nband. The quanta argument lists quanta for  the  individual  bandwidth-sharing  bands.\nThe  minimum  value  of  each  quantum is 1. If quanta is not given, the default is no\nbandwidth-sharing bands, but note that when specifying a large number  of  bands,  the\nextra ones are in bandwidth-sharing mode by default.\n\n\nbands  Number  of bands given explicitly. This value has to be at least large enough to cover\nthe strict bands specified through the  strict  keyword  and  bandwidth-sharing  bands\nspecified  in  quanta.   If a larger value is given, any extra bands are in bandwidth-\nsharing mode, and their quanta are deduced from the interface  MTU.  If  no  value  is\ngiven, as many bands are created as necessary to cover all bands implied by the strict\nand quanta keywords.\n\n\npriomap\nThe priomap maps the priority of a packet to a band. The argument is a  list  of  num‐\nbers.  The first number indicates which band the packets with priority 0 should be put\nto, the second is for priority 1, and so on.\n\nThere can be up to 16 numbers in the list. If there are fewer, the default  band  that\ntraffic with one of the unmentioned priorities goes to is the last one.\n\n",
                "subsections": [
                    {
                        "name": "EXAMPLE & USAGE",
                        "content": "Add  a  qdisc  with 8 bandwidth-sharing bands, using the interface MTU as their quanta. Since\nall quanta are the same, this will lead to equal distribution of bandwidth between the bands,\neach  will  get about 12.5% of the link. The low 8 priorities go to individual bands in a re‐\nverse 1:1 fashion (such that the highest priority goes to the first band).\n\n\n# tc qdisc add dev eth0 root handle 1: ets bands 8 priomap 7 6 5 4 3 2 1 0\n# tc qdisc show dev eth0\nqdisc ets 1: root refcnt 2 bands 8 quanta 1514 1514 1514 1514 1514 1514 1514 1514 priomap 7 6\n5 4 3 2 1 0 7 7 7 7 7 7 7 7\n\n\nTweak  the  first  band  of  the above qdisc to give it a quantum of 2650, which will give it\nabout 20% of the link (and about 11.5% to the remaining bands):\n\n\n# tc class change dev eth0 classid 1:1 ets quantum 2650\n# tc qdisc show dev eth0\nqdisc ets 1: root refcnt 2 bands 8 quanta 2650 1514 1514 1514 1514 1514 1514 1514 priomap 7 6\n5 4 3 2 1 0 7 7 7 7 7 7 7 7\n\n\nCreate a purely strict Qdisc with reverse 1:1 mapping between priorities and bands:\n\n\n# tc qdisc add dev eth0 root handle 1: ets strict 8 priomap 7 6 5 4 3 2 1 0\n# tc qdisc sh dev eth0\nqdisc ets 1: root refcnt 2 bands 8 strict 8 priomap 7 6 5 4 3 2 1 0 7 7 7 7 7 7 7 7\n\n\nAdd a Qdisc with 6 bands, 3 strict and 3 ETS with 35%-30%-25% weights:\n\n# tc qdisc add dev eth0 root handle 1: ets strict 3 quanta 3500 3000 2500 priomap 0 1 1 1 2 3\n4 5\n# tc qdisc sh dev eth0\nqdisc ets 1: root refcnt 2 bands 6 strict 3 quanta 3500 3000 2500 priomap 0 1 1 1 2 3 4 5 5 5\n5 5 5 5 5 5\n\n\nCreate  a  Qdisc  such  that traffic with priorities 2, 3 and 4 are strictly prioritized over\nother traffic, and the rest goes into bandwidth-sharing classes with equal weights:\n\n# tc qdisc add dev eth0 root handle 1: ets bands 8 strict 3 priomap 3 4 0 1 2 5 6 7\n# tc qdisc sh dev eth0\nqdisc ets 1: root refcnt 2 bands 8 strict 3 quanta 1514 1514 1514 1514 1514 priomap 3 4 0 1 2\n5 6 7 7 7 7 7 7 7 7 7\n\n"
                    }
                ]
            },
            "SEE ALSO": {
                "content": "tc(8), tc-prio(8), tc-drr(8)\n\n",
                "subsections": []
            },
            "AUTHOR": {
                "content": "Parts of both this manual page and the code itself are taken from PRIO and DRR qdiscs.\nETS qdisc itself was written by Petr Machata.\n\n\n\niproute2                                    December 2019                                      TC(8)",
                "subsections": []
            }
        }
    }
}