sphinx.addnodesdocument)}( rawsourcechildren]( translations LanguagesNode)}(hhh](h pending_xref)}(hhh]docutils.nodesTextChinese (Simplified)}parenthsba attributes}(ids]classes]names]dupnames]backrefs] refdomainstdreftypedoc reftargetE/translations/zh_CN/networking/device_drivers/ethernet/freescale/dpaamodnameN classnameN refexplicitutagnamehhh ubh)}(hhh]hChinese (Traditional)}hh2sbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftargetE/translations/zh_TW/networking/device_drivers/ethernet/freescale/dpaamodnameN classnameN refexplicituh1hhh ubh)}(hhh]hItalian}hhFsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftargetE/translations/it_IT/networking/device_drivers/ethernet/freescale/dpaamodnameN classnameN refexplicituh1hhh ubh)}(hhh]hJapanese}hhZsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftargetE/translations/ja_JP/networking/device_drivers/ethernet/freescale/dpaamodnameN classnameN refexplicituh1hhh ubh)}(hhh]hKorean}hhnsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftargetE/translations/ko_KR/networking/device_drivers/ethernet/freescale/dpaamodnameN classnameN refexplicituh1hhh ubh)}(hhh]hSpanish}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftargetE/translations/sp_SP/networking/device_drivers/ethernet/freescale/dpaamodnameN classnameN refexplicituh1hhh ubeh}(h]h ]h"]h$]h&]current_languageEnglishuh1h hh _documenthsourceNlineNubhcomment)}(h SPDX-License-Identifier: GPL-2.0h]h SPDX-License-Identifier: GPL-2.0}hhsbah}(h]h ]h"]h$]h&] xml:spacepreserveuh1hhhhhh_/var/lib/git/docbuild/linux/Documentation/networking/device_drivers/ethernet/freescale/dpaa.rsthKubhsection)}(hhh](htitle)}(hThe QorIQ DPAA Ethernet Driverh]hThe QorIQ DPAA Ethernet Driver}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhKubh paragraph)}(hXAuthors: - Madalin Bucur - Camelia Groza h](hAuthors: - Madalin Bucur <}(hhhhhNhNubh reference)}(hmadalin.bucur@nxp.comh]hmadalin.bucur@nxp.com}(hhhhhNhNubah}(h]h ]h"]h$]h&]refurimailto:madalin.bucur@nxp.comuh1hhhubh> - Camelia Groza <}(hhhhhNhNubh)}(hcamelia.groza@nxp.comh]hcamelia.groza@nxp.com}(hhhhhNhNubah}(h]h ]h"]h$]h&]refurimailto:camelia.groza@nxp.comuh1hhhubh>}(hhhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(hContents - DPAA Ethernet Overview - DPAA Ethernet Supported SoCs - Configuring DPAA Ethernet in your kernel - DPAA Ethernet Frame Processing - DPAA Ethernet Features - DPAA IRQ Affinity and Receive Side Scaling - Debuggingh]hContents - DPAA Ethernet Overview - DPAA Ethernet Supported SoCs - Configuring DPAA Ethernet in your kernel - DPAA Ethernet Frame Processing - DPAA Ethernet Features - DPAA IRQ Affinity and Receive Side Scaling - Debugging}hjsbah}(h]h ]h"]h$]h&]hhuh1hhhhhhhhKubh)}(hhh](h)}(hDPAA Ethernet Overviewh]hDPAA Ethernet Overview}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubh)}(hDPAA stands for Data Path Acceleration Architecture and it is a set of networking acceleration IPs that are available on several generations of SoCs, both on PowerPC and ARM64.h]hDPAA stands for Data Path Acceleration Architecture and it is a set of networking acceleration IPs that are available on several generations of SoCs, both on PowerPC and ARM64.}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(hThe Freescale DPAA architecture consists of a series of hardware blocks that support Ethernet connectivity. The Ethernet driver depends upon the following drivers in the Linux kernel:h]hThe Freescale DPAA architecture consists of a series of hardware blocks that support Ethernet connectivity. The Ethernet driver depends upon the following drivers in the Linux kernel:}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh block_quote)}(h- Peripheral Access Memory Unit (PAMU) (* needed only for PPC platforms) drivers/iommu/fsl_* - Frame Manager (FMan) drivers/net/ethernet/freescale/fman - Queue Manager (QMan), Buffer Manager (BMan) drivers/soc/fsl/qbman h]h bullet_list)}(hhh](h list_item)}(h[Peripheral Access Memory Unit (PAMU) (* needed only for PPC platforms) drivers/iommu/fsl_*h]hdefinition_list)}(hhh]hdefinition_list_item)}(hZPeripheral Access Memory Unit (PAMU) (* needed only for PPC platforms) drivers/iommu/fsl_*h](hterm)}(hFPeripheral Access Memory Unit (PAMU) (* needed only for PPC platforms)h]hFPeripheral Access Memory Unit (PAMU) (* needed only for PPC platforms)}(hj\hhhNhNubah}(h]h ]h"]h$]h&]uh1jZhhhK hjVubh definition)}(hhh]h)}(hdrivers/iommu/fsl_*h]hdrivers/iommu/fsl_*}(hjohhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK!hjlubah}(h]h ]h"]h$]h&]uh1jjhjVubeh}(h]h ]h"]h$]h&]uh1jThhhK hjQubah}(h]h ]h"]h$]h&]uh1jOhjKubah}(h]h ]h"]h$]h&]uh1jIhjFubjJ)}(h9Frame Manager (FMan) drivers/net/ethernet/freescale/fmanh]jP)}(hhh]jU)}(h8Frame Manager (FMan) drivers/net/ethernet/freescale/fmanh](j[)}(hFrame Manager (FMan)h]hFrame Manager (FMan)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jZhhhK"hjubjk)}(hhh]h)}(h#drivers/net/ethernet/freescale/fmanh]h#drivers/net/ethernet/freescale/fman}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK#hjubah}(h]h ]h"]h$]h&]uh1jjhjubeh}(h]h ]h"]h$]h&]uh1jThhhK"hjubah}(h]h ]h"]h$]h&]uh1jOhjubah}(h]h ]h"]h$]h&]uh1jIhjFubjJ)}(hCQueue Manager (QMan), Buffer Manager (BMan) drivers/soc/fsl/qbman h]jP)}(hhh]jU)}(hBQueue Manager (QMan), Buffer Manager (BMan) drivers/soc/fsl/qbman h](j[)}(h+Queue Manager (QMan), Buffer Manager (BMan)h]h+Queue Manager (QMan), Buffer Manager (BMan)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jZhhhK%hjubjk)}(hhh]h)}(hdrivers/soc/fsl/qbmanh]hdrivers/soc/fsl/qbman}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK%hjubah}(h]h ]h"]h$]h&]uh1jjhjubeh}(h]h ]h"]h$]h&]uh1jThhhK%hjubah}(h]h ]h"]h$]h&]uh1jOhjubah}(h]h ]h"]h$]h&]uh1jIhjFubeh}(h]h ]h"]h$]h&]bullet-uh1jDhhhK hj@ubah}(h]h ]h"]h$]h&]uh1j>hhhK hjhhubh)}(hBA simplified view of the dpaa_eth interfaces mapped to FMan MACs::h]hAA simplified view of the dpaa_eth interfaces mapped to FMan MACs:}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK'hjhhubh literal_block)}(hXdpaa_eth /eth0\ ... /ethN\ driver | | | | ------------- ---- ----------- ---- ------------- -Ports / Tx Rx \ ... / Tx Rx \ FMan | | | | -MACs | MAC0 | | MACN | / dtsec0 \ ... / dtsecN \ (or tgec) / \ / \(or memac) --------- -------------- --- -------------- --------- FMan, FMan Port, FMan SP, FMan MURAM drivers --------------------------------------------------------- FMan HW blocks: MURAM, MACs, Ports, SP ---------------------------------------------------------h]hXdpaa_eth /eth0\ ... /ethN\ driver | | | | ------------- ---- ----------- ---- ------------- -Ports / Tx Rx \ ... / Tx Rx \ FMan | | | | -MACs | MAC0 | | MACN | / dtsec0 \ ... / dtsecN \ (or tgec) / \ / \(or memac) --------- -------------- --- -------------- --------- FMan, FMan Port, FMan SP, FMan MURAM drivers --------------------------------------------------------- FMan HW blocks: MURAM, MACs, Ports, SP ---------------------------------------------------------}hj7sbah}(h]h ]h"]h$]h&]hhuh1j5hhhK)hjhhubh)}(h2The dpaa_eth relation to the QMan, BMan and FMan::h]h1The dpaa_eth relation to the QMan, BMan and FMan:}(hjEhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK7hjhhubj6)}(hXf ________________________________ dpaa_eth / eth0 \ driver / \ --------- -^- -^- -^- --- --------- QMan driver / \ / \ / \ \ / | BMan | |Rx | |Rx | |Tx | |Tx | | driver | --------- |Dfl| |Err| |Cnf| |FQs| | | QMan HW |FQ | |FQ | |FQs| | | | | / \ / \ / \ \ / | | --------- --- --- --- -v- --------- | FMan QMI | | | FMan HW FMan BMI | BMan HW | ----------------------- --------h]hXf ________________________________ dpaa_eth / eth0 \ driver / \ --------- -^- -^- -^- --- --------- QMan driver / \ / \ / \ \ / | BMan | |Rx | |Rx | |Tx | |Tx | | driver | --------- |Dfl| |Err| |Cnf| |FQs| | | QMan HW |FQ | |FQ | |FQs| | | | | / \ / \ / \ \ / | | --------- --- --- --- -v- --------- | FMan QMI | | | FMan HW FMan BMI | BMan HW | ----------------------- --------}hjSsbah}(h]h ]h"]h$]h&]hhuh1j5hhhK9hjhhubh)}(h4where the acronyms used above (and in the code) are:h]h4where the acronyms used above (and in the code) are:}(hjahhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKGhjhhubhtable)}(hhh]htgroup)}(hhh](hcolspec)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jyhjvubjz)}(hhh]h}(h]h ]h"]h$]h&]colwidthK;uh1jyhjvubhtbody)}(hhh](hrow)}(hhh](hentry)}(hhh]h)}(hDPAAh]hDPAA}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKJhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h#Data Path Acceleration Architectureh]h#Data Path Acceleration Architecture}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKJhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(hFManh]hFMan}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKKhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hDPAA Frame Managerh]hDPAA Frame Manager}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(hQManh]hQMan}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKLhj ubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hDPAA Queue Managerh]hDPAA Queue Manager}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKLhj ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(hBManh]hBMan}(hjChhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKMhj@ubah}(h]h ]h"]h$]h&]uh1jhj=ubj)}(hhh]h)}(hDPAA Buffers Managerh]hDPAA Buffers Manager}(hjZhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKMhjWubah}(h]h ]h"]h$]h&]uh1jhj=ubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(hQMIh]hQMI}(hjzhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKNhjwubah}(h]h ]h"]h$]h&]uh1jhjtubj)}(hhh]h)}(hQMan interface in FManh]hQMan interface in FMan}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKNhjubah}(h]h ]h"]h$]h&]uh1jhjtubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(hBMIh]hBMI}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKOhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hBMan interface in FManh]hBMan interface in FMan}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKOhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(hFMan SPh]hFMan SP}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKPhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hFMan Storage Profilesh]hFMan Storage Profiles}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKPhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(hMURAMh]hMURAM}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKQhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hMulti-user RAM in FManh]hMulti-user RAM in FMan}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKQhj3ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(hFQh]hFQ}(hjVhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKRhjSubah}(h]h ]h"]h$]h&]uh1jhjPubj)}(hhh]h)}(hQMan Frame Queueh]hQMan Frame Queue}(hjmhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKRhjjubah}(h]h ]h"]h$]h&]uh1jhjPubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(h Rx Dfl FQh]h Rx Dfl FQ}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKShjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hdefault reception FQh]hdefault reception FQ}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKShjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(h Rx Err FQh]h Rx Err FQ}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKThjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hRx error frames FQh]hRx error frames FQ}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKThjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(h Tx Cnf FQh]h Tx Cnf FQ}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKUhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hTx confirmation FQsh]hTx confirmation FQs}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKUhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(hTx FQsh]hTx FQs}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKVhj/ubah}(h]h ]h"]h$]h&]uh1jhj,ubj)}(hhh]h)}(htransmission frame queuesh]htransmission frame queues}(hjIhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKVhjFubah}(h]h ]h"]h$]h&]uh1jhj,ubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(hdtsech]hdtsec}(hjihhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKWhjfubah}(h]h ]h"]h$]h&]uh1jhjcubj)}(hhh]h)}(h;datapath three speed Ethernet controller (10/100/1000 Mbps)h]h;datapath three speed Ethernet controller (10/100/1000 Mbps)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKWhj}ubah}(h]h ]h"]h$]h&]uh1jhjcubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(htgech]htgec}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKXhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h)ten gigabit Ethernet controller (10 Gbps)h]h)ten gigabit Ethernet controller (10 Gbps)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKXhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(hmemach]hmemac}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKYhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h*multirate Ethernet MAC (10/100/1000/10000)h]h*multirate Ethernet MAC (10/100/1000/10000)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKYhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjvubeh}(h]h ]h"]h$]h&]colsKuh1jthjqubah}(h]h ]h"]h$]h&]uh1johjhhhhhNubeh}(h]dpaa-ethernet-overviewah ]h"]dpaa ethernet overviewah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(hDPAA Ethernet Supported SoCsh]hDPAA Ethernet Supported SoCs}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj#hhhhhK]ubh)}(hOThe DPAA drivers enable the Ethernet controllers present on the following SoCs:h]hOThe DPAA drivers enable the Ethernet controllers present on the following SoCs:}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK_hj#hhubh)}(hkPPC - P1023 - P2041 - P3041 - P4080 - P5020 - P5040 - T1023 - T1024 - T1040 - T1042 - T2080 - T4240 - B4860h]hkPPC - P1023 - P2041 - P3041 - P4080 - P5020 - P5040 - T1023 - T1024 - T1040 - T1042 - T2080 - T4240 - B4860}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKahj#hhubh)}(hARM - LS1043A - LS1046Ah]hARM - LS1043A - LS1046A}(hjPhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKphj#hhubeh}(h]dpaa-ethernet-supported-socsah ]h"]dpaa ethernet supported socsah$]h&]uh1hhhhhhhhK]ubh)}(hhh](h)}(h(Configuring DPAA Ethernet in your kernelh]h(Configuring DPAA Ethernet in your kernel}(hjihhhNhNubah}(h]h ]h"]h$]h&]uh1hhjfhhhhhKuubh)}(hPTo enable the DPAA Ethernet driver, the following Kconfig options are required::h]hOTo enable the DPAA Ethernet driver, the following Kconfig options are required:}(hjwhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKwhjfhhubj6)}(hX&# common for arch/arm64 and arch/powerpc platforms CONFIG_FSL_DPAA=y CONFIG_FSL_FMAN=y CONFIG_FSL_DPAA_ETH=y CONFIG_FSL_XGMAC_MDIO=y # for arch/powerpc only CONFIG_FSL_PAMU=y # common options needed for the PHYs used on the RDBs CONFIG_VITESSE_PHY=y CONFIG_REALTEK_PHY=y CONFIG_AQUANTIA_PHY=yh]hX&# common for arch/arm64 and arch/powerpc platforms CONFIG_FSL_DPAA=y CONFIG_FSL_FMAN=y CONFIG_FSL_DPAA_ETH=y CONFIG_FSL_XGMAC_MDIO=y # for arch/powerpc only CONFIG_FSL_PAMU=y # common options needed for the PHYs used on the RDBs CONFIG_VITESSE_PHY=y CONFIG_REALTEK_PHY=y CONFIG_AQUANTIA_PHY=y}hjsbah}(h]h ]h"]h$]h&]hhuh1j5hhhKyhjfhhubeh}(h](configuring-dpaa-ethernet-in-your-kernelah ]h"](configuring dpaa ethernet in your kernelah$]h&]uh1hhhhhhhhKuubh)}(hhh](h)}(hDPAA Ethernet Frame Processingh]hDPAA Ethernet Frame Processing}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubh)}(hOn Rx, buffers for the incoming frames are retrieved from the buffers found in the dedicated interface buffer pool. The driver initializes and seeds these with one page buffers.h]hOn Rx, buffers for the incoming frames are retrieved from the buffers found in the dedicated interface buffer pool. The driver initializes and seeds these with one page buffers.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(hXdOn Tx, all transmitted frames are returned to the driver through Tx confirmation frame queues. The driver is then responsible for freeing the buffers. In order to do this properly, a backpointer is added to the buffer before transmission that points to the skb. When the buffer returns to the driver on a confirmation FQ, the skb can be correctly consumed.h]hXdOn Tx, all transmitted frames are returned to the driver through Tx confirmation frame queues. The driver is then responsible for freeing the buffers. In order to do this properly, a backpointer is added to the buffer before transmission that points to the skb. When the buffer returns to the driver on a confirmation FQ, the skb can be correctly consumed.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubeh}(h]dpaa-ethernet-frame-processingah ]h"]dpaa ethernet frame processingah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(hDPAA Ethernet Featuresh]hDPAA Ethernet Features}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubh)}(hCurrently the DPAA Ethernet driver enables the basic features required for a Linux Ethernet driver. The support for advanced features will be added gradually.h]hCurrently the DPAA Ethernet driver enables the basic features required for a Linux Ethernet driver. The support for advanced features will be added gradually.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(hXThe driver has Rx and Tx checksum offloading for UDP and TCP. Currently the Rx checksum offload feature is enabled by default and cannot be controlled through ethtool. Also, rx-flow-hash and rx-hashing was added. The addition of RSS provides a big performance boost for the forwarding scenarios, allowing different traffic flows received by one interface to be processed by different CPUs in parallel.h]hXThe driver has Rx and Tx checksum offloading for UDP and TCP. Currently the Rx checksum offload feature is enabled by default and cannot be controlled through ethtool. Also, rx-flow-hash and rx-hashing was added. The addition of RSS provides a big performance boost for the forwarding scenarios, allowing different traffic flows received by one interface to be processed by different CPUs in parallel.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(hX*The driver has support for multiple prioritized Tx traffic classes. Priorities range from 0 (lowest) to 3 (highest). These are mapped to HW workqueues with strict priority levels. Each traffic class contains NR_CPU TX queues. By default, only one traffic class is enabled and the lowest priority Tx queues are used. Higher priority traffic classes can be enabled with the mqprio qdisc. For example, all four traffic classes are enabled on an interface with the following command. Furthermore, skb priority levels are mapped to traffic classes as follows:h]hX*The driver has support for multiple prioritized Tx traffic classes. Priorities range from 0 (lowest) to 3 (highest). These are mapped to HW workqueues with strict priority levels. Each traffic class contains NR_CPU TX queues. By default, only one traffic class is enabled and the lowest priority Tx queues are used. Higher priority traffic classes can be enabled with the mqprio qdisc. For example, all four traffic classes are enabled on an interface with the following command. Furthermore, skb priority levels are mapped to traffic classes as follows:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubj?)}(h* priorities 0 to 3 - traffic class 0 (low priority) * priorities 4 to 7 - traffic class 1 (medium-low priority) * priorities 8 to 11 - traffic class 2 (medium-high priority) * priorities 12 to 15 - traffic class 3 (high priority) h]jE)}(hhh](jJ)}(h2priorities 0 to 3 - traffic class 0 (low priority)h]h)}(hjh]h2priorities 0 to 3 - traffic class 0 (low priority)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jIhjubjJ)}(h9priorities 4 to 7 - traffic class 1 (medium-low priority)h]h)}(hj+h]h9priorities 4 to 7 - traffic class 1 (medium-low priority)}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj)ubah}(h]h ]h"]h$]h&]uh1jIhjubjJ)}(h;priorities 8 to 11 - traffic class 2 (medium-high priority)h]h)}(hjBh]h;priorities 8 to 11 - traffic class 2 (medium-high priority)}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj@ubah}(h]h ]h"]h$]h&]uh1jIhjubjJ)}(h6priorities 12 to 15 - traffic class 3 (high priority) h]h)}(h5priorities 12 to 15 - traffic class 3 (high priority)h]h5priorities 12 to 15 - traffic class 3 (high priority)}(hj[hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjWubah}(h]h ]h"]h$]h&]uh1jIhjubeh}(h]h ]h"]h$]h&]j*uh1jDhhhKhj ubah}(h]h ]h"]h$]h&]uh1j>hhhKhjhhubj6)}(hgtc qdisc add dev root handle 1: \ mqprio num_tc 4 map 0 0 0 0 1 1 1 1 2 2 2 2 3 3 3 3 hw 1h]hgtc qdisc add dev root handle 1: \ mqprio num_tc 4 map 0 0 0 0 1 1 1 1 2 2 2 2 3 3 3 3 hw 1}hj|sbah}(h]h ]h"]h$]h&]hhuh1j5hhhKhjhhubeh}(h]dpaa-ethernet-featuresah ]h"]dpaa ethernet featuresah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(h*DPAA IRQ Affinity and Receive Side Scalingh]h*DPAA IRQ Affinity and Receive Side Scaling}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubh)}(hX Traffic coming on the DPAA Rx queues or on the DPAA Tx confirmation queues is seen by the CPU as ingress traffic on a certain portal. The DPAA QMan portal interrupts are affined each to a certain CPU. The same portal interrupt services all the QMan portal consumers.h]hX Traffic coming on the DPAA Rx queues or on the DPAA Tx confirmation queues is seen by the CPU as ingress traffic on a certain portal. The DPAA QMan portal interrupts are affined each to a certain CPU. The same portal interrupt services all the QMan portal consumers.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(hX_By default the DPAA Ethernet driver enables RSS, making use of the DPAA FMan Parser and Keygen blocks to distribute traffic on 128 hardware frame queues using a hash on IP v4/v6 source and destination and L4 source and destination ports, in present in the received frame. When RSS is disabled, all traffic received by a certain interface is received on the default Rx frame queue. The default DPAA Rx frame queues are configured to put the received traffic into a pool channel that allows any available CPU portal to dequeue the ingress traffic. The default frame queues have the HOLDACTIVE option set, ensuring that traffic bursts from a certain queue are serviced by the same CPU. This ensures a very low rate of frame reordering. A drawback of this is that only one CPU at a time can service the traffic received by a certain interface when RSS is not enabled.h]hX_By default the DPAA Ethernet driver enables RSS, making use of the DPAA FMan Parser and Keygen blocks to distribute traffic on 128 hardware frame queues using a hash on IP v4/v6 source and destination and L4 source and destination ports, in present in the received frame. When RSS is disabled, all traffic received by a certain interface is received on the default Rx frame queue. The default DPAA Rx frame queues are configured to put the received traffic into a pool channel that allows any available CPU portal to dequeue the ingress traffic. The default frame queues have the HOLDACTIVE option set, ensuring that traffic bursts from a certain queue are serviced by the same CPU. This ensures a very low rate of frame reordering. A drawback of this is that only one CPU at a time can service the traffic received by a certain interface when RSS is not enabled.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(hXTo implement RSS, the DPAA Ethernet driver allocates an extra set of 128 Rx frame queues that are configured to dedicated channels, in a round-robin manner. The mapping of the frame queues to CPUs is now hardcoded, there is no indirection table to move traffic for a certain FQ (hash result) to another CPU. The ingress traffic arriving on one of these frame queues will arrive at the same portal and will always be processed by the same CPU. This ensures intra-flow order preservation and workload distribution for multiple traffic flows.h]hXTo implement RSS, the DPAA Ethernet driver allocates an extra set of 128 Rx frame queues that are configured to dedicated channels, in a round-robin manner. The mapping of the frame queues to CPUs is now hardcoded, there is no indirection table to move traffic for a certain FQ (hash result) to another CPU. The ingress traffic arriving on one of these frame queues will arrive at the same portal and will always be processed by the same CPU. This ensures intra-flow order preservation and workload distribution for multiple traffic flows.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(hCRSS can be turned off for a certain interface using ethtool, i.e.::h]hBRSS can be turned off for a certain interface using ethtool, i.e.:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubj6)}(h*# ethtool -N fm1-mac9 rx-flow-hash tcp4 ""h]h*# ethtool -N fm1-mac9 rx-flow-hash tcp4 ""}hjsbah}(h]h ]h"]h$]h&]hhuh1j5hhhKhjhhubh)}(hHTo turn it back on, one needs to set rx-flow-hash for tcp4/6 or udp4/6::h]hGTo turn it back on, one needs to set rx-flow-hash for tcp4/6 or udp4/6:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubj6)}(h,# ethtool -N fm1-mac9 rx-flow-hash udp4 sfdnh]h,# ethtool -N fm1-mac9 rx-flow-hash udp4 sfdn}hjsbah}(h]h ]h"]h$]h&]hhuh1j5hhhKhjhhubh)}(hThere is no independent control for individual protocols, any command run for one of tcp4|udp4|ah4|esp4|sctp4|tcp6|udp6|ah6|esp6|sctp6 is going to control the rx-flow-hashing for all protocols on that interface.h]hThere is no independent control for individual protocols, any command run for one of tcp4|udp4|ah4|esp4|sctp4|tcp6|udp6|ah6|esp6|sctp6 is going to control the rx-flow-hashing for all protocols on that interface.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(hBesides using the FMan Keygen computed hash for spreading traffic on the 128 Rx FQs, the DPAA Ethernet driver also sets the skb hash value when the NETIF_F_RXHASH feature is on (active by default). This can be turned on or off through ethtool, i.e.::h]hBesides using the FMan Keygen computed hash for spreading traffic on the 128 Rx FQs, the DPAA Ethernet driver also sets the skb hash value when the NETIF_F_RXHASH feature is on (active by default). This can be turned on or off through ethtool, i.e.:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubj6)}(h# ethtool -K fm1-mac9 rx-hashing off # ethtool -k fm1-mac9 | grep hash receive-hashing: off # ethtool -K fm1-mac9 rx-hashing on Actual changes: receive-hashing: on # ethtool -k fm1-mac9 | grep hash receive-hashing: onh]h# ethtool -K fm1-mac9 rx-hashing off # ethtool -k fm1-mac9 | grep hash receive-hashing: off # ethtool -K fm1-mac9 rx-hashing on Actual changes: receive-hashing: on # ethtool -k fm1-mac9 | grep hash receive-hashing: on}hj!sbah}(h]h ]h"]h$]h&]hhuh1j5hhhKhjhhubh)}(hPlease note that Rx hashing depends upon the rx-flow-hashing being on for that interface - turning off rx-flow-hashing will also disable the rx-hashing (without ethtool reporting it as off as that depends on the NETIF_F_RXHASH feature flag).h]hPlease note that Rx hashing depends upon the rx-flow-hashing being on for that interface - turning off rx-flow-hashing will also disable the rx-hashing (without ethtool reporting it as off as that depends on the NETIF_F_RXHASH feature flag).}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubeh}(h]*dpaa-irq-affinity-and-receive-side-scalingah ]h"]*dpaa irq affinity and receive side scalingah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(h Debuggingh]h Debugging}(hjHhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjEhhhhhKubh)}(hIThe following statistics are exported for each interface through ethtool:h]hIThe following statistics are exported for each interface through ethtool:}(hjVhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjEhhubj?)}(hX- interrupt count per CPU - Rx packets count per CPU - Tx packets count per CPU - Tx confirmed packets count per CPU - Tx S/G frames count per CPU - Tx error count per CPU - Rx error count per CPU - Rx error count per type - congestion related statistics: - congestion status - time spent in congestion - number of time the device entered congestion - dropped packets count per cause h]jE)}(hhh](jJ)}(hinterrupt count per CPUh]h)}(hjmh]hinterrupt count per CPU}(hjohhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjkubah}(h]h ]h"]h$]h&]uh1jIhjhubjJ)}(hRx packets count per CPUh]h)}(hjh]hRx packets count per CPU}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jIhjhubjJ)}(hTx packets count per CPUh]h)}(hjh]hTx packets count per CPU}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jIhjhubjJ)}(h"Tx confirmed packets count per CPUh]h)}(hjh]h"Tx confirmed packets count per CPU}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jIhjhubjJ)}(hTx S/G frames count per CPUh]h)}(hjh]hTx S/G frames count per CPU}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jIhjhubjJ)}(hTx error count per CPUh]h)}(hjh]hTx error count per CPU}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jIhjhubjJ)}(hRx error count per CPUh]h)}(hjh]hRx error count per CPU}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jIhjhubjJ)}(hRx error count per typeh]h)}(hj h]hRx error count per type}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jIhjhubjJ)}(hcongestion related statistics: - congestion status - time spent in congestion - number of time the device entered congestion - dropped packets count per cause h](h)}(hcongestion related statistics:h]hcongestion related statistics:}(hj' hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj# ubj?)}(h- congestion status - time spent in congestion - number of time the device entered congestion - dropped packets count per cause h]jE)}(hhh](jJ)}(hcongestion statush]h)}(hj> h]hcongestion status}(hj@ hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj< ubah}(h]h ]h"]h$]h&]uh1jIhj9 ubjJ)}(htime spent in congestionh]h)}(hjU h]htime spent in congestion}(hjW hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjS ubah}(h]h ]h"]h$]h&]uh1jIhj9 ubjJ)}(h,number of time the device entered congestionh]h)}(hjl h]h,number of time the device entered congestion}(hjn hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjj ubah}(h]h ]h"]h$]h&]uh1jIhj9 ubjJ)}(h dropped packets count per cause h]h)}(hdropped packets count per causeh]hdropped packets count per cause}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1jIhj9 ubeh}(h]h ]h"]h$]h&]jj uh1jDhhhMhj5 ubah}(h]h ]h"]h$]h&]uh1j>hhhMhj# ubeh}(h]h ]h"]h$]h&]uh1jIhjhubeh}(h]h ]h"]h$]h&]jj uh1jDhhhKhjdubah}(h]h ]h"]h$]h&]uh1j>hhhKhjEhhubh)}(h;The driver also exports the following information in sysfs:h]h;The driver also exports the following information in sysfs:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjEhhubj?)}(hX - the FQ IDs for each FQ type /sys/devices/platform/soc/.fman/.ethernet/dpaa-ethernet./net/fm-mac/fqids - the ID of the buffer pool in use /sys/devices/platform/soc/.fman/.ethernet/dpaa-ethernet./net/fm-mac/bpidsh]jE)}(hhh](jJ)}(h~the FQ IDs for each FQ type /sys/devices/platform/soc/.fman/.ethernet/dpaa-ethernet./net/fm-mac/fqids h]h)}(h}the FQ IDs for each FQ type /sys/devices/platform/soc/.fman/.ethernet/dpaa-ethernet./net/fm-mac/fqidsh]h}the FQ IDs for each FQ type /sys/devices/platform/soc/.fman/.ethernet/dpaa-ethernet./net/fm-mac/fqids}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj ubah}(h]h ]h"]h$]h&]uh1jIhj ubjJ)}(hthe ID of the buffer pool in use /sys/devices/platform/soc/.fman/.ethernet/dpaa-ethernet./net/fm-mac/bpidsh]h)}(hthe ID of the buffer pool in use /sys/devices/platform/soc/.fman/.ethernet/dpaa-ethernet./net/fm-mac/bpidsh]hthe ID of the buffer pool in use /sys/devices/platform/soc/.fman/.ethernet/dpaa-ethernet./net/fm-mac/bpids}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj ubah}(h]h ]h"]h$]h&]uh1jIhj ubeh}(h]h ]h"]h$]h&]jj uh1jDhhhM hj ubah}(h]h ]h"]h$]h&]uh1j>hhhM hjEhhubeh}(h] debuggingah ]h"] debuggingah$]h&]uh1hhhhhhhhKubeh}(h]the-qoriq-dpaa-ethernet-driverah ]h"]the qoriq dpaa ethernet driverah$]h&]uh1hhhhhhhhKubeh}(h]h ]h"]h$]h&]sourcehuh1hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(hN generatorN datestampN source_linkN source_urlN toc_backlinksjfootnote_backlinksK sectnum_xformKstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerj: error_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh _destinationN _config_files]7/var/lib/git/docbuild/linux/Documentation/docutils.confafile_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformKsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}nameids}(j j j jjcj`jjjjjjjBj?j j u nametypes}(j j jcjjjjBj uh}(j hjjj`j#jjfjjjjj?jj jEu footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}Rparse_messages]transform_messages] transformerN include_log] decorationNhhub.