€•S7Œsphinx.addnodes”Œdocument”“”)”}”(Œ rawsource”Œ”Œchildren”]”(Œ translations”Œ LanguagesNode”“”)”}”(hhh]”(hŒ pending_xref”“”)”}”(hhh]”Œdocutils.nodes”ŒText”“”ŒChinese (Simplified)”…””}”Œparent”hsbaŒ attributes”}”(Œids”]”Œclasses”]”Œnames”]”Œdupnames”]”Œbackrefs”]”Œ refdomain”Œstd”Œreftype”Œdoc”Œ reftarget”Œ)/translations/zh_CN/networking/multiqueue”Œmodname”NŒ classname”NŒ refexplicit”ˆuŒtagname”hhh ubh)”}”(hhh]”hŒChinese (Traditional)”…””}”hh2sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ)/translations/zh_TW/networking/multiqueue”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒItalian”…””}”hhFsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ)/translations/it_IT/networking/multiqueue”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒJapanese”…””}”hhZsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ)/translations/ja_JP/networking/multiqueue”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒKorean”…””}”hhnsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ)/translations/ko_KR/networking/multiqueue”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒPortuguese (Brazilian)”…””}”hh‚sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ)/translations/pt_BR/networking/multiqueue”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒSpanish”…””}”hh–sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ)/translations/sp_SP/networking/multiqueue”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubeh}”(h]”h ]”h"]”h$]”h&]”Œcurrent_language”ŒEnglish”uh1h hhŒ _document”hŒsource”NŒline”NubhŒcomment”“”)”}”(hŒ SPDX-License-Identifier: GPL-2.0”h]”hŒ SPDX-License-Identifier: GPL-2.0”…””}”hh·sbah}”(h]”h ]”h"]”h$]”h&]”Œ xml:space”Œpreserve”uh1hµhhh²hh³ŒC/var/lib/git/docbuild/linux/Documentation/networking/multiqueue.rst”h´KubhŒsection”“”)”}”(hhh]”(hŒtitle”“”)”}”(hŒ+HOWTO for multiqueue network device support”h]”hŒ+HOWTO for multiqueue network device support”…””}”(hhÏh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhhÊh²hh³hÇh´KubhÉ)”}”(hhh]”(hÎ)”}”(hŒGSection 1: Base driver requirements for implementing multiqueue support”h]”hŒGSection 1: Base driver requirements for implementing multiqueue support”…””}”(hhàh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhhÝh²hh³hÇh´KubhÉ)”}”(hhh]”(hÎ)”}”(hŒ,Intro: Kernel support for multiqueue devices”h]”hŒ,Intro: Kernel support for multiqueue devices”…””}”(hhñh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhhîh²hh³hÇh´K ubhŒ paragraph”“”)”}”(hŒ8Kernel support for multiqueue devices is always present.”h]”hŒ8Kernel support for multiqueue devices is always present.”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÿh³hÇh´K hhîh²hubj)”}”(hX/Base drivers are required to use the new alloc_etherdev_mq() or alloc_netdev_mq() functions to allocate the subqueues for the device. The underlying kernel API will take care of the allocation and deallocation of the subqueue memory, as well as netdev configuration of where the queues exist in memory.”h]”hX/Base drivers are required to use the new alloc_etherdev_mq() or alloc_netdev_mq() functions to allocate the subqueues for the device. The underlying kernel API will take care of the allocation and deallocation of the subqueue memory, as well as netdev configuration of where the queues exist in memory.”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÿh³hÇh´Khhîh²hubj)”}”(hXqThe base driver will also need to manage the queues as it does the global netdev->queue_lock today. Therefore base drivers should use the netif_{start|stop|wake}_subqueue() functions to manage each queue while the device is still operational. netdev->queue_lock is still used when the device comes online or when it's completely shut down (unregister_netdev(), etc.).”h]”hXsThe base driver will also need to manage the queues as it does the global netdev->queue_lock today. Therefore base drivers should use the netif_{start|stop|wake}_subqueue() functions to manage each queue while the device is still operational. netdev->queue_lock is still used when the device comes online or when it’s completely shut down (unregister_netdev(), etc.).”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÿh³hÇh´Khhîh²hubeh}”(h]”Œ+intro-kernel-support-for-multiqueue-devices”ah ]”h"]”Œ,intro: kernel support for multiqueue devices”ah$]”h&]”uh1hÈhhÝh²hh³hÇh´K ubeh}”(h]”ŒFsection-1-base-driver-requirements-for-implementing-multiqueue-support”ah ]”h"]”ŒGsection 1: base driver requirements for implementing multiqueue support”ah$]”h&]”uh1hÈhhÊh²hh³hÇh´KubhÉ)”}”(hhh]”(hÎ)”}”(hŒ/Section 2: Qdisc support for multiqueue devices”h]”hŒ/Section 2: Qdisc support for multiqueue devices”…””}”(hj>h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhj;h²hh³hÇh´Kubj)”}”(hXÃCurrently two qdiscs are optimized for multiqueue devices. The first is the default pfifo_fast qdisc. This qdisc supports one qdisc per hardware queue. A new round-robin qdisc, sch_multiq also supports multiple hardware queues. The qdisc is responsible for classifying the skb's and then directing the skb's to bands and queues based on the value in skb->queue_mapping. Use this field in the base driver to determine which queue to send the skb to.”h]”hXÇCurrently two qdiscs are optimized for multiqueue devices. The first is the default pfifo_fast qdisc. This qdisc supports one qdisc per hardware queue. A new round-robin qdisc, sch_multiq also supports multiple hardware queues. The qdisc is responsible for classifying the skb’s and then directing the skb’s to bands and queues based on the value in skb->queue_mapping. Use this field in the base driver to determine which queue to send the skb to.”…””}”(hjLh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÿh³hÇh´Khj;h²hubj)”}”(hŒÚsch_multiq has been added for hardware that wishes to avoid head-of-line blocking. It will cycle though the bands and verify that the hardware queue associated with the band is not stopped prior to dequeuing a packet.”h]”hŒÚsch_multiq has been added for hardware that wishes to avoid head-of-line blocking. It will cycle though the bands and verify that the hardware queue associated with the band is not stopped prior to dequeuing a packet.”…””}”(hjZh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÿh³hÇh´K&hj;h²hubj)”}”(hŒ×On qdisc load, the number of bands is based on the number of queues on the hardware. Once the association is made, any skb with skb->queue_mapping set, will be queued to the band associated with the hardware queue.”h]”hŒ×On qdisc load, the number of bands is based on the number of queues on the hardware. Once the association is made, any skb with skb->queue_mapping set, will be queued to the band associated with the hardware queue.”…””}”(hjhh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÿh³hÇh´K*hj;h²hubeh}”(h]”Œ.section-2-qdisc-support-for-multiqueue-devices”ah ]”h"]”Œ/section 2: qdisc support for multiqueue devices”ah$]”h&]”uh1hÈhhÊh²hh³hÇh´KubhÉ)”}”(hhh]”(hÎ)”}”(hŒ:Section 3: Brief howto using MULTIQ for multiqueue devices”h]”hŒ:Section 3: Brief howto using MULTIQ for multiqueue devices”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhj~h²hh³hÇh´K0ubj)”}”(hŒÇThe userspace command 'tc,' part of the iproute2 package, is used to configure qdiscs. To add the MULTIQ qdisc to your network device, assuming the device is called eth0, run the following command::”h]”hŒÊThe userspace command ‘tc,’ part of the iproute2 package, is used to configure qdiscs. To add the MULTIQ qdisc to your network device, assuming the device is called eth0, run the following command:”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÿh³hÇh´K2hj~h²hubhŒ literal_block”“”)”}”(hŒ-# tc qdisc add dev eth0 root handle 1: multiq”h]”hŒ-# tc qdisc add dev eth0 root handle 1: multiq”…””}”hjŸsbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jh³hÇh´K6hj~h²hubj)”}”(hŒÁThe qdisc will allocate the number of bands to equal the number of queues that the device reports, and bring the qdisc online. Assuming eth0 has 4 Tx queues, the band mapping would look like::”h]”hŒÀThe qdisc will allocate the number of bands to equal the number of queues that the device reports, and bring the qdisc online. Assuming eth0 has 4 Tx queues, the band mapping would look like:”…””}”(hj­h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÿh³hÇh´K8hj~h²hubjž)”}”(hŒGband 0 => queue 0 band 1 => queue 1 band 2 => queue 2 band 3 => queue 3”h]”hŒGband 0 => queue 0 band 1 => queue 1 band 2 => queue 2 band 3 => queue 3”…””}”hj»sbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jh³hÇh´Kselect_queue() if you have it defined.”h]”hŒ”Traffic will begin flowing through each queue based on either the simple_tx_hash function or based on netdev->select_queue() if you have it defined.”…””}”(hjÉh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÿh³hÇh´KAhj~h²hubj)”}”(hX The behavior of tc filters remains the same. However a new tc action, skbedit, has been added. Assuming you wanted to route all traffic to a specific host, for example 192.168.0.3, through a specific queue you could use this action and establish a filter such as::”h]”hX The behavior of tc filters remains the same. However a new tc action, skbedit, has been added. Assuming you wanted to route all traffic to a specific host, for example 192.168.0.3, through a specific queue you could use this action and establish a filter such as:”…””}”(hj×h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÿh³hÇh´KDhj~h²hubjž)”}”(hŒƒtc filter add dev eth0 parent 1: protocol ip prio 1 u32 \ match ip dst 192.168.0.3 \ action skbedit queue_mapping 3”h]”hŒƒtc filter add dev eth0 parent 1: protocol ip prio 1 u32 \ match ip dst 192.168.0.3 \ action skbedit queue_mapping 3”…””}”hjåsbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jh³hÇh´KIhj~h²hubhŒ field_list”“”)”}”(hhh]”(hŒfield”“”)”}”(hhh]”(hŒ field_name”“”)”}”(hŒAuthor”h]”hŒAuthor”…””}”(hjÿh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jýhjúh³hÇh´KubhŒ field_body”“”)”}”(hŒ-Alexander Duyck ”h]”j)”}”(hjh]”(hŒAlexander Duyck <”…””}”(hjh²hh³Nh´NubhŒ reference”“”)”}”(hŒalexander.h.duyck@intel.com”h]”hŒalexander.h.duyck@intel.com”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”Œrefuri”Œ"mailto:alexander.h.duyck@intel.com”uh1jhjubhŒ>”…””}”(hjh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÿh³hÇh´KMhjubah}”(h]”h ]”h"]”h$]”h&]”uh1j hjúubeh}”(h]”h ]”h"]”h$]”h&]”uh1jøh³hÇh´KMhjõh²hubjù)”}”(hhh]”(jþ)”}”(hŒOriginal Author”h]”hŒOriginal Author”…””}”(hjEh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jýhjBh³hÇh´Kubj)”}”(hŒ9Peter P. Waskiewicz Jr. ”h]”j)”}”(hjUh]”(hŒPeter P. Waskiewicz Jr. <”…””}”(hjWh²hh³Nh´Nubj)”}”(hŒpeter.p.waskiewicz.jr@intel.com”h]”hŒpeter.p.waskiewicz.jr@intel.com”…””}”(hj^h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”Œrefuri”Œ&mailto:peter.p.waskiewicz.jr@intel.com”uh1jhjWubhŒ>”…””}”(hjWh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÿh³hÇh´KNhjSubah}”(h]”h ]”h"]”h$]”h&]”uh1j hjBubeh}”(h]”h ]”h"]”h$]”h&]”uh1jøh³hÇh´KNhjõh²hubeh}”(h]”h ]”h"]”h$]”h&]”uh1jóhj~h²hh³hÇh´KMubeh}”(h]”Œ9section-3-brief-howto-using-multiq-for-multiqueue-devices”ah ]”h"]”Œ:section 3: brief howto using multiq for multiqueue devices”ah$]”h&]”uh1hÈhhÊh²hh³hÇh´K0ubeh}”(h]”Œ+howto-for-multiqueue-network-device-support”ah ]”h"]”Œ+howto for multiqueue network device support”ah$]”h&]”uh1hÈhhh²hh³hÇh´Kubeh}”(h]”h ]”h"]”h$]”h&]”Œsource”hÇuh1hŒcurrent_source”NŒ current_line”NŒsettings”Œdocutils.frontend”ŒValues”“”)”}”(hÍNŒ generator”NŒ datestamp”NŒ source_link”NŒ source_url”NŒ toc_backlinks”Œentry”Œfootnote_backlinks”KŒ sectnum_xform”KŒstrip_comments”NŒstrip_elements_with_classes”NŒ strip_classes”NŒ report_level”KŒ halt_level”KŒexit_status_level”KŒdebug”NŒwarning_stream”NŒ traceback”ˆŒinput_encoding”Œ utf-8-sig”Œinput_encoding_error_handler”Œstrict”Œoutput_encoding”Œutf-8”Œoutput_encoding_error_handler”j½Œerror_encoding”Œutf-8”Œerror_encoding_error_handler”Œbackslashreplace”Œ language_code”Œen”Œrecord_dependencies”NŒconfig”NŒ id_prefix”hŒauto_id_prefix”Œid”Œ dump_settings”NŒdump_internals”NŒdump_transforms”NŒdump_pseudo_xml”NŒexpose_internals”NŒstrict_visitor”NŒ_disable_config”NŒ_source”hÇŒ _destination”NŒ _config_files”]”Œ7/var/lib/git/docbuild/linux/Documentation/docutils.conf”aŒfile_insertion_enabled”ˆŒ raw_enabled”KŒline_length_limit”M'Œpep_references”NŒ pep_base_url”Œhttps://peps.python.org/”Œpep_file_url_template”Œpep-%04d”Œrfc_references”NŒ rfc_base_url”Œ&https://datatracker.ietf.org/doc/html/”Œ tab_width”KŒtrim_footnote_reference_space”‰Œsyntax_highlight”Œlong”Œ smart_quotes”ˆŒsmartquotes_locales”]”Œcharacter_level_inline_markup”‰Œdoctitle_xform”‰Œ docinfo_xform”KŒsectsubtitle_xform”‰Œ image_loading”Œlink”Œembed_stylesheet”‰Œcloak_email_addresses”ˆŒsection_self_link”‰Œenv”NubŒreporter”NŒindirect_targets”]”Œsubstitution_defs”}”Œsubstitution_names”}”Œrefnames”}”Œrefids”}”Œnameids”}”(j—j”j8j5j0j-j{jxjjŒuŒ nametypes”}”(j—‰j8‰j0‰j{‰j‰uh}”(j”hÊj5hÝj-hîjxj;jŒj~uŒ footnote_refs”}”Œ citation_refs”}”Œ autofootnotes”]”Œautofootnote_refs”]”Œsymbol_footnotes”]”Œsymbol_footnote_refs”]”Œ footnotes”]”Œ citations”]”Œautofootnote_start”KŒsymbol_footnote_start”KŒ id_counter”Œ collections”ŒCounter”“”}”…”R”Œparse_messages”]”Œtransform_messages”]”Œ transformer”NŒ include_log”]”Œ decoration”Nh²hub.