{
    "content": [
        {
            "type": "text",
            "text": "# MQPRIO (man)\n\n## NAME\n\nMQPRIO - Multiqueue Priority Qdisc (Offloaded Hardware QOS)\n\n## SYNOPSIS\n\ntc  qdisc  ... dev dev ( parent classid | root) [ handle major: ] mqprio [ numtc tcs ] [ map\nP0 P1 P2...  ] [ queues count1@offset1 count2@offset2 ...  ] [ hw 1|0 ] [ mode dcb|channel] ]\n[  shaper dcb| [ bwrlimit minrate minrate1 minrate2 ...  maxrate maxrate1 maxrate2 ...\n]]\n\n## DESCRIPTION\n\nThe MQPRIO qdisc is a simple queuing discipline that allows mapping traffic flows to hardware\nqueue ranges using priorities and a configurable priority to traffic class mapping. A traffic\nclass in this context is a set of contiguous qdisc classes which map 1:1 to a set of hardware\nexposed queues.\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **ALGORITHM**\n- **CLASSIFICATION**\n- **QDISC PARAMETERS**\n- **AUTHORS**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "MQPRIO",
        "section": "",
        "mode": "man",
        "summary": "MQPRIO - Multiqueue Priority Qdisc (Offloaded Hardware QOS)",
        "synopsis": "tc  qdisc  ... dev dev ( parent classid | root) [ handle major: ] mqprio [ numtc tcs ] [ map\nP0 P1 P2...  ] [ queues count1@offset1 count2@offset2 ...  ] [ hw 1|0 ] [ mode dcb|channel] ]\n[  shaper dcb| [ bwrlimit minrate minrate1 minrate2 ...  maxrate maxrate1 maxrate2 ...\n]]",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 7,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 19,
                "subsections": []
            },
            {
                "name": "ALGORITHM",
                "lines": 17,
                "subsections": []
            },
            {
                "name": "CLASSIFICATION",
                "lines": 16,
                "subsections": []
            },
            {
                "name": "QDISC PARAMETERS",
                "lines": 32,
                "subsections": []
            },
            {
                "name": "AUTHORS",
                "lines": 5,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "MQPRIO - Multiqueue Priority Qdisc (Offloaded Hardware QOS)\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "tc  qdisc  ... dev dev ( parent classid | root) [ handle major: ] mqprio [ numtc tcs ] [ map\nP0 P1 P2...  ] [ queues count1@offset1 count2@offset2 ...  ] [ hw 1|0 ] [ mode dcb|channel] ]\n[  shaper dcb| [ bwrlimit minrate minrate1 minrate2 ...  maxrate maxrate1 maxrate2 ...\n]]\n\n\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "The MQPRIO qdisc is a simple queuing discipline that allows mapping traffic flows to hardware\nqueue ranges using priorities and a configurable priority to traffic class mapping. A traffic\nclass in this context is a set of contiguous qdisc classes which map 1:1 to a set of hardware\nexposed queues.\n\nBy  default  the qdisc allocates a pfifo qdisc (packet limited first in, first out queue) per\nTX queue exposed by the lower layer device. Other queuing disciplines  may  be  added  subse‐\nquently.  Packets are enqueued using the map parameter and hashed across the indicated queues\nin the offset and count.  By default these parameters are configured by the  hardware  driver\nto match the hardware QOS structures.\n\nChannel mode supports full offload of the mqprio options, the traffic classes, the queue con‐\nfigurations and QOS attributes to the hardware. Enabled hardware  can  provide  hardware  QOS\nwith the ability to steer traffic flows to designated traffic classes provided by this qdisc.\nHardware based QOS is configured using the shaper parameter.  bwrlimit with minimum and max‐\nimum  bandwidth  rates can be used for setting transmission rates on each traffic class. Also\nfurther qdiscs may be added to the classes of MQPRIO to create more complex configurations.\n\n",
                "subsections": []
            },
            "ALGORITHM": {
                "content": "On creation with 'tc qdisc add', eight traffic classes are created mapping priorities 0..7 to\ntraffic  classes  0..7  and  priorities greater than 7 to traffic class 0. This requires base\ndriver support and the creation will fail  on  devices  that  do  not  support  hardware  QOS\nschemes.\n\nThese defaults can be overridden using the qdisc parameters. Providing the 'hw 0' flag allows\nsoftware to run without hardware coordination.\n\nIf hardware coordination is being used and arguments are provided that the hardware  can  not\nsupport  then  an  error is returned. For many users hardware defaults should work reasonably\nwell.\n\nAs one specific example numerous Ethernet cards  support  the  802.1Q  link  strict  priority\ntransmission selection algorithm (TSA). MQPRIO enabled hardware in conjunction with the clas‐\nsification methods below can provide hardware offloaded support for this TSA.\n\n",
                "subsections": []
            },
            "CLASSIFICATION": {
                "content": "Multiple methods are available to set the SKB priority which  MQPRIO  uses  to  select  which\ntraffic class to enqueue the packet.\n\nFrom user space\nA  process  with  sufficient privileges can encode the destination class directly with\nSOPRIORITY, see socket(7).\n\nwith iptables/nftables\nAn iptables/nftables rule can be created to match traffic flows and set the  priority.\niptables(8)\n\nwith netprio cgroups\nThe netprio cgroup can be used to set the priority of all sockets belong to an appli‐\ncation. See kernel and cgroup documentation for details.\n\n",
                "subsections": []
            },
            "QDISC PARAMETERS": {
                "content": "numtc Number of traffic classes to use. Up to 16 classes supported.\n\n\nmap    The priority to traffic class map. Maps priorities 0..15 to a specified traffic class.\n\n\nqueues Provide count and offset of queue  range  for  each  traffic  class.  In  the  format,\ncount@offset.  Queue ranges for each traffic classes cannot overlap and must be a con‐\ntiguous range of queues.\n\n\nhw     Set to 1 to support hardware offload. Set to 0 to configure user specified  values  in\nsoftware only.\n\n\nmode   Set  to  channel for full use of the mqprio options. Use dcb to offload only TC values\nand use hardware QOS defaults. Supported with 'hw' set to 1 only.\n\n\nshaper Use bwrlimit to set bandwidth rate limits for a traffic class. Use dcb  for  hardware\nQOS defaults. Supported with 'hw' set to 1 only.\n\n\nminrate\nMinimum value of bandwidth rate limit for a traffic class.\n\n\nmaxrate\nMaximum value of bandwidth rate limit for a traffic class.\n\n\n",
                "subsections": []
            },
            "AUTHORS": {
                "content": "John Fastabend, <john.r.fastabend@intel.com>\n\n\n\niproute2                                    24 Sept 2013                                   MQPRIO(8)",
                "subsections": []
            }
        }
    }
}